openfluid::core::DistributedEvent Class Reference
Class defining a discrete event, including attached information.
More...
List of all members.
Detailed Description
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
Constructor & Destructor Documentation
| openfluid::core::DistributedEvent::DistributedEvent |
( |
|
) |
|
| openfluid::core::DistributedEvent::DistributedEvent |
( |
DateTime |
Date |
) |
|
Constructor
- Parameters:
-
| [in] | Date | the date and time of the event |
| openfluid::core::DistributedEvent::~DistributedEvent |
( |
|
) |
|
Member Function Documentation
| bool openfluid::core::DistributedEvent::addInfo |
( |
std::string |
Key, |
|
|
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::DistributedEvent::getDateTime |
( |
|
) |
[inline] |
Returns the date and time of the event
| bool openfluid::core::DistributedEvent::getInfoAsDouble |
( |
std::string |
Key, |
|
|
double * |
Info | |
|
) |
| | |
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::DistributedEvent::getInfoAsLong |
( |
std::string |
Key, |
|
|
long * |
Info | |
|
) |
| | |
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::DistributedEvent::getInfoAsScalarValue |
( |
std::string |
Key, |
|
|
ScalarValue * |
Info | |
|
) |
| | |
Gets an information as a ScalarValue
- 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::DistributedEvent::getInfoAsString |
( |
std::string |
Key, |
|
|
std::string * |
Info | |
|
) |
| | |
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
| EventInfosMap_t openfluid::core::DistributedEvent::getInfos |
( |
|
) |
[inline] |
Returns all the informations as an EventInfosMap
| int openfluid::core::DistributedEvent::getInfosCount |
( |
|
) |
[inline] |
Returns the number of information
| bool openfluid::core::DistributedEvent::isInfoEquals |
( |
std::string |
Key, |
|
|
ScalarValue * |
Info | |
|
) |
| | |
Returns true if the information exists and equals the given ScalarValue value
- Parameters:
-
| [in] | Key | the requested information key |
| [in] | Info | the requested value |
| bool openfluid::core::DistributedEvent::isInfoEquals |
( |
std::string |
Key, |
|
|
double |
Value | |
|
) |
| | |
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::DistributedEvent::isInfoEquals |
( |
std::string |
Key, |
|
|
long |
Value | |
|
) |
| | |
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::DistributedEvent::isInfoEquals |
( |
std::string |
Key, |
|
|
std::string |
Value | |
|
) |
| | |
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::DistributedEvent::isInfoExists |
( |
std::string |
Key |
) |
|
Returns true if the information exists
- Parameters:
-
| [in] | Key | the requested information key |
| void openfluid::core::DistributedEvent::println |
( |
|
) |
|
Prints the content of the event to stdout