Class defining a discrete event, including attached information.
More...
#include <core/Event.hpp>
|
| | Event () |
| |
| | Event (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 :
- Key is the name given to the information
- Value is the value of the information and can be numeric or text information
| openfluid::core::Event::Event |
( |
| ) |
|
| openfluid::core::Event::Event |
( |
DateTime |
Date | ) |
|
Constructor
- Parameters
-
| [in] | Date | the date and time of the event |
| openfluid::core::Event::~Event |
( |
| ) |
|
| bool openfluid::core::Event::addInfo |
( |
const std::string |
Key, |
|
|
const std::string |
Info |
|
) |
| |
Adds an information to the event
- Parameters
-
| [in] | Key | the key of the added information |
| [in] | Info | the value of the added information |
- Returns
- true if the adding is correct (key does not already exists)
| DateTime openfluid::core::Event::getDateTime |
( |
| ) |
const |
|
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
- Parameters
-
| [in] | Key | the requested information key |
| [out] | Info | the value corresponding to the requested key |
- Returns
- true if the key exists and the conversion to the requested type is correct
- Deprecated:
| bool openfluid::core::Event::getInfoAsDouble |
( |
const std::string |
Key, |
|
|
double & |
Info |
|
) |
| const |
Gets an information as a double
- Parameters
-
| [in] | Key | the requested information key |
| [out] | Info | the value corresponding to the requested key |
- Returns
- true if the key exists and the conversion to the requested type is correct
| bool openfluid::core::Event::getInfoAsDoubleValue |
( |
const std::string |
Key, |
|
|
DoubleValue & |
Info |
|
) |
| const |
Gets an information as a DoubleValue
- Parameters
-
| [in] | Key | the requested information key |
| [out] | Info | the value corresponding to the requested key |
- Returns
- true if the key exists and the conversion to the requested type is correct
| bool openfluid::core::Event::getInfoAsLong |
( |
const std::string |
Key, |
|
|
long * |
Info |
|
) |
| const |
Gets an information as a long integer
- Parameters
-
| [in] | Key | the requested information key |
| [out] | Info | the value corresponding to the requested key |
- Returns
- true if the key exists and the conversion to the requested type is correct
- Deprecated:
| bool openfluid::core::Event::getInfoAsLong |
( |
const std::string |
Key, |
|
|
long & |
Info |
|
) |
| const |
Gets an information as a long integer
- Parameters
-
| [in] | Key | the requested information key |
| [out] | Info | the value corresponding to the requested key |
- Returns
- true if the key exists and the conversion to the requested type is correct
| bool openfluid::core::Event::getInfoAsString |
( |
const std::string |
Key, |
|
|
std::string * |
Info |
|
) |
| const |
Gets an information as a string
- Parameters
-
| [in] | Key | the requested information key |
| [out] | Info | the value corresponding to the requested key |
- Returns
- true if the key exists and the conversion to the requested type is correct
- Deprecated:
| bool openfluid::core::Event::getInfoAsString |
( |
const std::string |
Key, |
|
|
std::string & |
Info |
|
) |
| const |
Gets an information as a string
- Parameters
-
| [in] | Key | the requested information key |
| [out] | Info | the value corresponding to the requested key |
- Returns
- true if the key exists and the conversion to the requested type is correct
Returns all the informations as an EventInfosMap
| int openfluid::core::Event::getInfosCount |
( |
| ) |
const |
|
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
- Parameters
-
| [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
- Parameters
-
| [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
- Parameters
-
| [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
- Parameters
-
| [in] | Key | the requested information key |
| [in] | Info | the requested value |
- Deprecated:
| 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
- Parameters
-
| [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
- Parameters
-
| [in] | Key | the requested information key |
| void openfluid::core::Event::println |
( |
| ) |
const |
Prints the content of the event to stdout
The documentation for this class was generated from the following file: