Class defining a discrete event, including attached information. More...
Public Types | |
typedef std::map< std::string, std::string > | EventInfosMap_t |
Public Member Functions | |
Event () | |
Event (DateTime Date) | |
~Event () | |
bool | isInfoExist (std::string Key) |
bool | isInfoEqual (std::string Key, std::string Value) |
bool | isInfoEqual (std::string Key, long Value) |
bool | isInfoEqual (std::string Key, double Value) |
bool | isInfoEqual (std::string Key, ScalarValue *Info) |
int | getInfosCount () |
EventInfosMap_t | getInfos () |
DateTime | getDateTime () |
bool | getInfoAsString (std::string Key, std::string *Info) |
bool | getInfoAsLong (std::string Key, long *Info) |
bool | getInfoAsDouble (std::string Key, double *Info) |
bool | getInfoAsScalarValue (std::string Key, ScalarValue *Info) |
bool | addInfo (std::string Key, std::string Info) |
void | println () |
Class defining a discrete event, including attached information.
Each event attached information is represented by a Key-Value couple :
typedef std::map<std::string, std::string> openfluid::core::Event::EventInfosMap_t |
openfluid::core::Event::Event | ( | ) |
Default constructor
openfluid::core::Event::Event | ( | DateTime | Date | ) |
Constructor
[in] | Date | the date and time of the event |
openfluid::core::Event::~Event | ( | ) |
Destructor
bool openfluid::core::Event::addInfo | ( | std::string | Key, |
std::string | Info | ||
) |
Adds an information to the event
[in] | Key | the key of the added information |
[in] | Info | the value of the added information |
DateTime openfluid::core::Event::getDateTime | ( | ) | [inline] |
Returns the date and time of the event
bool openfluid::core::Event::getInfoAsDouble | ( | std::string | Key, |
double * | Info | ||
) |
Gets an information as a double
[in] | Key | the requested information key |
[out] | Info | the value corresponding to the requested key |
bool openfluid::core::Event::getInfoAsLong | ( | std::string | Key, |
long * | Info | ||
) |
Gets an information as a long integer
[in] | Key | the requested information key |
[out] | Info | the value corresponding to the requested key |
bool openfluid::core::Event::getInfoAsScalarValue | ( | std::string | Key, |
ScalarValue * | Info | ||
) |
Gets an information as a ScalarValue
[in] | Key | the requested information key |
[out] | Info | the value corresponding to the requested key |
bool openfluid::core::Event::getInfoAsString | ( | std::string | Key, |
std::string * | Info | ||
) |
Gets an information as a string
[in] | Key | the requested information key |
[out] | Info | the value corresponding to the requested key |
EventInfosMap_t openfluid::core::Event::getInfos | ( | ) | [inline] |
Returns all the informations as an EventInfosMap
int openfluid::core::Event::getInfosCount | ( | ) | [inline] |
Returns the number of information
bool openfluid::core::Event::isInfoEqual | ( | std::string | Key, |
double | Value | ||
) |
Returns true if the information exists and equals the given double value
[in] | Key | the requested information key |
[in] | Value | the requested value |
bool openfluid::core::Event::isInfoEqual | ( | std::string | Key, |
ScalarValue * | Info | ||
) |
Returns true if the information exists and equals the given ScalarValue value
[in] | Key | the requested information key |
[in] | Info | the requested value |
bool openfluid::core::Event::isInfoEqual | ( | std::string | Key, |
long | Value | ||
) |
Returns true if the information exists and equals the given long value
[in] | Key | the requested information key |
[in] | Value | the requested value |
bool openfluid::core::Event::isInfoEqual | ( | std::string | Key, |
std::string | Value | ||
) |
Returns true if the information exists and equals the given string value
[in] | Key | the requested information key |
[in] | Value | the requested value |
bool openfluid::core::Event::isInfoExist | ( | std::string | Key | ) |
Returns true if the information exists
[in] | Key | the requested information key |
void openfluid::core::Event::println | ( | ) |
Prints the content of the event to stdout