A virtual base class for pieces of "mail". Used by the mailbox object. More...
Public Member Functions
|letter (int type=0, int start_after=0)|
|constructs a letter with the "type" and initial pause of "start_after". |
|letter (const letter &to_copy)|
|copy constructor for base parts. |
|derived classes should also implement this. |
|letter &||operator= (const letter &to_copy)|
|assignment operator for base object. |
|virtual void||text_form (basis::base_string &fill) const =0|
|derived letters must print a status blurb describing their contents. |
|int||type () const|
|returns the type of letter held here. |
|returns true if this letter is ready to |
|void||set_ready_time (int start_after)|
|resets the time when this letter is ready to be sent. |
A virtual base class for pieces of "mail". Used by the mailbox object.
|processes::letter::letter||(||int|| type =
|int|| start_after = |
constructs a letter with the "type" and initial pause of "start_after".
a "type" for this letter must be specified, even if it is not intended to be used. some letter managers may rely on this number identifying different kinds of mail. the types should be unique within one mailbox. a "type" of zero indicates an invalid letter. if the "start_after" is non-zero, then it indicates that this letter should not be sent until that many milliseconds have elapsed.
|processes::letter::letter||(||const letter &||to_copy||)|
derived classes should also implement this.
a virtual destructor should be implemented by each derived class to take care of class specific cleaning. note that the destructor should NEVER attempt to use the mailbox system that it was stored in (or any other mailbox system for that matter). this is necessary for prohibiting deadlock conditions, but it's not that much of a restriction usually.
|virtual void processes::letter::text_form||(||basis::base_string &||fill||)|| const
|int processes::letter::type||(||)|| const