20 Event() : fQoS(0), fEmpty(true) { }
22 Event(
const std::string &name,
const std::string &fmt=
"");
36 const void *
GetData()
const {
return &*fData.begin(); }
38 size_t GetSize()
const {
return fData.size(); }
49 void SetData(
const void *ptr,
size_t siz) {
50 const char *c =
reinterpret_cast<const char*
>(ptr);
51 fData = std::vector<char>(c, c+siz); }
bool fEmpty
Quality of service.
A general base-class describing events issues in a state machine.
std::string GetFormat() const
Return the stored format of the data.
Adds some functionality to boost::posix_time::ptime for our needs.
std::vector< char > fData
A human readable description of the event.
int GetQoS() const
Return Quality of Service.
void SetText(const char *txt)
void SetDescription(const std::string &str)
const void * GetData() const
Return a pointer to the data region.
size_t GetSize() const
Return the size of the data.
std::string GetName() const
Return the stored name of the event.
std::string fDescription
A string describing the format of the data.
void SetData(const std::vector< char > &data)
Event()
Empty is true if received event was a NULL pointer.
std::string GetDescription() const
Concerete implementation of an EventImp stroring name, format, data and time.
bool IsEmpty() const
Return if event is not just zero size but empty.
Time GetTime() const
Return reference to a time stamp.
std::string fFormat
A name associated with the event.
void SetData(const void *ptr, size_t siz)
Time fTime
Data associated with this event.
void SetString(const std::string &str)