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