All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
openfluid::core::Event Class Reference

Class defining a discrete event, including attached information. More...

#include <core/Event.hpp>

List of all members.

Public Types

typedef std::map< std::string,
openfluid::core::StringValue
EventInfosMap_t

Public Member Functions

 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

Detailed Description

Class defining a discrete event, including attached information.

Each event attached information is represented by a Key-Value couple :


Member Typedef Documentation


Constructor & Destructor Documentation

Default constructor

Constructor

Parameters:
[in]Datethe date and time of the event

Destructor


Member Function Documentation

bool openfluid::core::Event::addInfo ( const std::string  Key,
const std::string  Info 
)

Adds an information to the event

Parameters:
[in]Keythe key of the added information
[in]Infothe value of the added information
Returns:
true if the adding is correct (key does not already exists)

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]Keythe requested information key
[out]Infothe 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]Keythe requested information key
[out]Infothe 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]Keythe requested information key
[out]Infothe 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]Keythe requested information key
[out]Infothe 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]Keythe requested information key
[out]Infothe 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]Keythe requested information key
[out]Infothe 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]Keythe requested information key
[out]Infothe 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]Keythe requested information key
[in]Valuethe 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]Keythe requested information key
[in]Valuethe 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]Keythe requested information key
[in]Valuethe 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]Keythe requested information key
[in]Infothe 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]Keythe requested information key
[in]Infothe requested value
bool openfluid::core::Event::isInfoExist ( const std::string  Key) const

Returns true if the information exists

Parameters:
[in]Keythe requested information key

Prints the content of the event to stdout


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines