feisty meow concerns codebase  2.140
processes::mail_stop Class Referenceabstract

Base class for routes on which letters are automatically delivered. More...

#include <mail_stop.h>

Inheritance diagram for processes::mail_stop:
Collaboration diagram for processes::mail_stop:

Classes

class  items_to_deliver
 

Public Member Functions

virtual void delivery_for_you (const structures::unique_int &id, letter *package)=0
 the derived object must provide this function. More...
 
- Public Member Functions inherited from processes::safe_callback
 safe_callback ()
 construction signifies that the callback is now in operation. More...
 
void end_availability ()
 prepares to shut down this object. More...
 
virtual ~safe_callback ()
 actually destroys the object. More...
 
 DEFINE_CLASS_NAME ("safe_callback")
 
bool decoupled () const
 if true, then end_availability() was already invoked on the object. More...
 
bool invoke_callback (callback_data_block &new_data)
 this function is invoked by a user of the safe_callback derived object. More...
 
global_live_objects & _invocables ()
 provides access to the program-wide list of healthy callback objects. More...
 

Protected Member Functions

virtual void real_callback (callback_data_block &data)
 invoked by the safe callback machinery. More...
 

Detailed Description

Base class for routes on which letters are automatically delivered.

The letters will show up for a particular unique id at this mail stop. They are delivered by the object serving as the post office.

Definition at line 33 of file mail_stop.h.

Member Function Documentation

◆ delivery_for_you()

virtual void processes::mail_stop::delivery_for_you ( const structures::unique_int id,
letter package 
)
pure virtual

the derived object must provide this function.

prompts the recipient with the "id" to accept delivery of a "package". the package can be modified as desired and MUST be recycled before returning from this function. IMPORTANT NOTE: the receiver MUST be thread-safe with respect to the objects that it uses to handle this delivery! this is because mail is delivered on a thread other than the main program thread.

Referenced by real_callback().

◆ real_callback()

virtual void processes::mail_stop::real_callback ( callback_data_block data)
inlineprotectedvirtual

invoked by the safe callback machinery.

this is implemented in this class and merely re-routes the call to the more specific delivery_for_you() method.

Implements processes::safe_callback.

Definition at line 61 of file mail_stop.h.

References processes::mail_stop::items_to_deliver::_id, processes::mail_stop::items_to_deliver::_package, and delivery_for_you().


The documentation for this class was generated from the following file: