FACT++  1.0
Event Class Reference

Concerete implementation of an EventImp stroring name, format, data and time. More...

#include <Event.h>

+ Inheritance diagram for Event:
+ Collaboration diagram for Event:

Public Member Functions

 Event ()
 Empty is true if received event was a NULL pointer. More...
 
 Event (const std::string &name, const std::string &fmt="")
 Constructs an event as a combination of an EventImp and a DimCommand. More...
 
 Event (const EventImp &imp)
 Copy constructor. More...
 
 Event (const EventImp &imp, const char *ptr, size_t siz)
 
void SetDescription (const std::string &str)
 
std::string GetDescription () const
 
std::string GetName () const
 Return the stored name of the event. More...
 
std::string GetFormat () const
 Return the stored format of the data. More...
 
const void * GetData () const
 Return a pointer to the data region. More...
 
size_t GetSize () const
 Return the size of the data. More...
 
Time GetTime () const
 Return reference to a time stamp. More...
 
int GetQoS () const
 Return Quality of Service. More...
 
bool IsEmpty () const
 Return if event is not just zero size but empty. More...
 
void SetTime ()
 
void SetData (const std::vector< char > &data)
 
void SetData (const void *ptr, size_t siz)
 
void SetInt (int i)
 
void SetFloat (float f)
 
void SetDouble (float d)
 
void SetShort (short s)
 
void SetText (const char *txt)
 
void SetString (const std::string &str)
 
- Public Member Functions inherited from EventImp
 EventImp ()
 Constructor. Stores the target state given. More...
 
 EventImp (const EventImp &cmd)
 Copy constructor. More...
 
virtual ~EventImp ()
 
EventImpAssignFunction (const std::function< int(const EventImp &)> &func=std::function< int(const EventImp &)>())
 
bool HasFunc () const
 
int ExecFunc () const
 
EventImpoperator() (const std::function< int(const EventImp &)> &func)
 
EventImpoperator() (const std::string str)
 
EventImpoperator() (const char *str)
 
EventImpoperator() (int state)
 
virtual void Print (std::ostream &out, bool strip=false) const
 
virtual void Print (bool strip=false) const
 
void AddAllowedState (int state)
 
void AddAllowedStates (const std::string &states)
 
bool IsStateAllowed (int state) const
 
std::string GetTimeAsStr (const char *fmt) const
 
uint64_t GetJavaDate () const
 
template<typename T >
Get (size_t offset=0) const
 
template<typename T >
const T * Ptr (size_t offset=0) const
 
template<typename T >
const T & Ref (size_t offset=0) const
 
const char * GetText () const
 
bool GetBool () const
 
int16_t GetShort () const
 
uint16_t GetUShort () const
 
int32_t GetInt () const
 
uint32_t GetUInt () const
 
int64_t GetXtra () const
 
uint64_t GetUXtra () const
 
float GetFloat () const
 
double GetDouble () const
 
std::vector< char > GetVector () const
 
std::string GetString () const
 

Private Attributes

std::string fName
 
std::string fFormat
 A name associated with the event. More...
 
std::string fDescription
 A string describing the format of the data. More...
 
std::vector< char > fData
 A human readable description of the event. More...
 
Time fTime
 Data associated with this event. More...
 
int fQoS
 Time stamp. More...
 
bool fEmpty
 Quality of service. More...
 

Detailed Description

Concerete implementation of an EventImp stroring name, format, data and time.

This is the implementation of an event which can be posted to a state machine, hosting all the data itself. In addition to the base class it has storage for name, format, the data and a time stamp.

Definition at line 6 of file Event.h.


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