DUECA/DUSIME
|
Generic event class. More...
#include <GenericEvent.hxx>
Public Member Functions | |
virtual | ~GenericEvent () |
Destructor. | |
const TimeTickType & | getTime () const |
Return the time associated with the event. | |
const GlobalId & | getMaker () const |
Return the ID of the maker of the event. | |
void | packData (AmorphStore &target) const |
Packs the data of the GenericEvent into an amorphous storage object. | |
ostream & | print (ostream &os) const |
Print the generic event to stream. | |
bool | operator< (const GenericEvent &e2) const |
Returns true if this event is earlier than another one. | |
bool | operator> (const GenericEvent &e2) const |
Returns true if this event is later than another one. | |
bool | operator== (const GenericEvent &e2) const |
Returns true if this event from the same time as another one. | |
void | assumeDataOwnership (const GlobalId &new_owner) const |
This is a very dangerous function. | |
Protected Member Functions | |
GenericEvent (const GlobalId &maker_id, const TimeTickType &time_stamp) | |
Constructor. | |
GenericEvent (const GenericEvent &ev) | |
Copy constructor. | |
GenericEvent (AmorphReStore &source) | |
Constructs a GenericEvent from amorphous storage. | |
Protected Attributes | |
GlobalId | maker_id |
the maker of the event | |
TimeTickType | time_stamp |
the time at which this event was created | |
bool | own_event_data |
A flag to indicate whether event data is owned by this event, if this is so, the event data is deleted upon event deletion. | |
Generic event class.
Defines the generic event data, such as time stamp and originator of the event
|
protected |
Constructor.
Note that making GenericEvent events is not useful, this constructur is usually called from a derived event. Application-level code seldom or never needs to construct events. Instead send (and implicitly create) events by using an EventWriter object.
|
inline |
Packs the data of the GenericEvent into an amorphous storage object.
Note that a GenericEvent by itself is not useful. Specific event types derived from it are useful, and this function is called by the packData function packing the derived event type.
This is a very dangerous function.
It is used by DUECA itself to avoid copying huge objects (typically activity log data). It can only be used if the calling function is the only user of the event channel. Responsibility for destroying the event data will lie with the caller that took over ownership. Do not consider using this unless you are really really sure of yourself.