#include <event_record.h>
Inheritance diagram for event_record:


Public Types | |
| enum | events |
Public Member Functions | |
| event_record (int id=0, int event=0) | |
| event_record (int id, int event, const byte_array &data, const int_set &targets=int_set()) | |
| ~event_record () | |
| void | pack (byte_array &packed_form) const |
| Creates a packed form of the packable object in "packed_form". | |
| bool | unpack (byte_array &packed_form) |
| Restores the packable from the "packed_form". | |
Public Attributes | |
| int | _id |
| the program-wide unique id for the object to deliver this to. | |
| int | _event |
| the numerical identifier of the event that occurred. | |
| byte_array | _data |
| the data, if any. | |
| int_set | _targets |
| the list of recipients for this. | |
NOTE: this is a heavy-weight header and it should not be included in other headers. instead, forward define the event_record class.
Definition at line 30 of file event_record.h.
| enum event_record::events |
Definition at line 44 of file event_record.h.
| event_record::event_record | ( | int | id = 0, |
|
| int | event = 0 | |||
| ) |
Definition at line 24 of file event_record.cpp.
| event_record::event_record | ( | int | id, | |
| int | event, | |||
| const byte_array & | data, | |||
| const int_set & | targets = int_set() | |||
| ) |
Definition at line 27 of file event_record.cpp.
| event_record::~event_record | ( | ) |
Definition at line 31 of file event_record.cpp.
| void event_record::pack | ( | byte_array & | packed_form | ) | const [virtual] |
Creates a packed form of the packable object in "packed_form".
This must append to the data in "packed_form" rather than clearing prior contents.
Implements packable.
Definition at line 33 of file event_record.cpp.
References _data, _event, _id, _targets, basis::attach(), and basis::pack_simple().
Referenced by zing_table::zing_event().
| bool event_record::unpack | ( | byte_array & | packed_form | ) | [virtual] |
Restores the packable from the "packed_form".
This object becomes the unpacked form, and therefore must lose any of its prior contents that depend on the data in "packed_form". This is up to the derived unpack function to figure out. The "packed_form" is modified by extracting all of the pieces that are used for this object; the remainder stays in "packed_form". true is returned if the unpacking was successful.
Implements packable.
Definition at line 41 of file event_record.cpp.
References _data, _event, _id, _targets, basis::detach(), and basis::unpack_simple().
the program-wide unique id for the object to deliver this to.
Definition at line 33 of file event_record.h.
the numerical identifier of the event that occurred.
Definition at line 34 of file event_record.h.
Referenced by pack(), zing_table::peek_event(), zing_table::pop_event(), and unpack().
the data, if any.
Definition at line 35 of file event_record.h.
Referenced by pack(), zing_table::peek_event(), zing_table::pop_event(), and unpack().
the list of recipients for this.
Definition at line 36 of file event_record.h.
Referenced by pack(), zing_table::peek_event(), zing_table::pop_event(), and unpack().
1.5.1