feisty meow concerns codebase  2.140
letter.h
Go to the documentation of this file.
1 #ifndef LETTER_CLASS
2 #define LETTER_CLASS
3 
4 /*****************************************************************************\
5 * *
6 * Name : letter *
7 * Author : Chris Koeritz *
8 * *
9 *******************************************************************************
10 * Copyright (c) 1998-$now By Author. This program is free software; you can *
11 * redistribute it and/or modify it under the terms of the GNU General Public *
12 * License as published by the Free Software Foundation; either version 2 of *
13 * the License or (at your option) any later version. This is online at: *
14 * http://www.fsf.org/copyleft/gpl.html *
15 * Please send any updates to: fred@gruntose.com *
16 \*****************************************************************************/
17 
18 #include <timely/time_stamp.h>
19 
20 namespace processes {
21 
23 
24 class letter : public virtual basis::text_formable
25 {
26 public:
27  letter(int type = 0, int start_after = 0);
29 
36  letter(const letter &to_copy);
38 
39  virtual ~letter();
41 
47  letter &operator =(const letter &to_copy);
49 
50  virtual void text_form(basis::base_string &fill) const = 0;
52 
53  int type() const { return _type; }
55 
56  bool ready_to_send();
58 
59  void set_ready_time(int start_after);
61 
65 private:
66  int _type;
67  timely::time_stamp *_ready_time;
68 };
69 
70 } //namespace.
71 
72 #endif
73 
Defines the base class for all string processing objects in hoople.
Definition: base_string.h:28
A base class for objects that can provide a synopsis of their current state.
Definition: contracts.h:142
A virtual base class for pieces of "mail". Used by the mailbox object.
Definition: letter.h:25
bool ready_to_send()
returns true if this letter is ready to
Definition: letter.cpp:43
virtual ~letter()
derived classes should also implement this.
Definition: letter.cpp:37
letter(int type=0, int start_after=0)
constructs a letter with the "type" and initial pause of "start_after".
Definition: letter.cpp:26
int type() const
returns the type of letter held here.
Definition: letter.h:53
virtual void text_form(basis::base_string &fill) const =0
derived letters must print a status blurb describing their contents.
void set_ready_time(int start_after)
resets the time when this letter is ready to be sent.
Definition: letter.cpp:45
letter & operator=(const letter &to_copy)
assignment operator for base object.
Definition: letter.cpp:48
Represents a point in time relative to the operating system startup time.
Definition: time_stamp.h:38