pion::platform::BasicEvent< CharType, AllocType > Class Template Reference

#include <Event.hpp>

List of all members.


Detailed Description

template<typename CharType, typename AllocType>
class pion::platform::BasicEvent< CharType, AllocType >

Event: an item of structured data that represents something of interest

Definition at line 68 of file Event.hpp.

Public Types

typedef Vocabulary::TermRef EventType
 used to identify the type of Event (TermRef maps to Terms of type OBJECT)
typedef PionBlob< CharType,
AllocType > 
BlobType
 data type used for storing strings & BLOBs as Event parameter values
typedef BlobType::BlobParams BlobParams
 data type used for parameters that construct BLOBs
typedef boost::variant< boost::int32_t,
boost::uint32_t, boost::int64_t,
boost::uint64_t, float, double,
long double, PionDateTime,
BlobType
ParameterValue
typedef IteratorBase< ParameterNodeIterator
 data type used to iterate mutable Event parameters
typedef IteratorBase< ParameterNode
const > 
ConstIterator
 data type used to iterate const Event parameters
typedef std::pair< ConstIterator,
ConstIterator
ValuesRange
 data type for a range of values assigned to a Vocabulary Term

Public Member Functions

 BasicEvent (const EventType t, AllocType *alloc_ptr)
 ~BasicEvent ()
 non-virtual destructor: this class should not be extended
EventType getType (void) const
 returns the type of Event that this is
bool empty (void) const
 returns true if the Event has no parameters defined
ConstIterator begin (void) const
 returns an iterator for the first Event parameter defined
ConstIterator end (void) const
 returns an const iterator representing the end of Event parameters
void clear (void)
 clear all data contained within the Event
void clear (const Vocabulary::TermRef &term_ref)
ConstIterator find (const Vocabulary::TermRef &term_ref) const
ValuesRange equal_range (const Vocabulary::TermRef &term_ref) const
void for_each (boost::function2< void, Vocabulary::TermRef, const ParameterValue & > f) const
BasicEventoperator+= (const BasicEvent &e)
void copyValues (const BasicEvent &e, const Vocabulary::TermRef &term_ref)
const ParameterValuegetPointer (const Vocabulary::TermRef &term_ref) const
bool isDefined (const Vocabulary::TermRef &term_ref) const
const boost::int32_t & getInt (const Vocabulary::TermRef &term_ref) const
const boost::uint32_t & getUInt (const Vocabulary::TermRef &term_ref) const
const boost::int64_t & getBigInt (const Vocabulary::TermRef &term_ref) const
const boost::uint64_t & getUBigInt (const Vocabulary::TermRef &term_ref) const
const float & getFloat (const Vocabulary::TermRef &term_ref) const
const double & getDouble (const Vocabulary::TermRef &term_ref) const
const long double & getLongDouble (const Vocabulary::TermRef &term_ref) const
const PionDateTimegetDateTime (const Vocabulary::TermRef &term_ref) const
const CharType * getString (const Vocabulary::TermRef &term_ref) const
const BlobTypegetBlob (const Vocabulary::TermRef &term_ref) const
template<typename T>
bool getInt (const Vocabulary::TermRef &term_ref, T &v) const
template<typename T>
bool getUInt (const Vocabulary::TermRef &term_ref, T &v) const
template<typename T>
bool getBigInt (const Vocabulary::TermRef &term_ref, T &v) const
template<typename T>
bool getUBigInt (const Vocabulary::TermRef &term_ref, T &v) const
template<typename T>
bool getFloat (const Vocabulary::TermRef &term_ref, T &v) const
template<typename T>
bool getDouble (const Vocabulary::TermRef &term_ref, T &v) const
template<typename T>
bool getLongDouble (const Vocabulary::TermRef &term_ref, T &v) const
template<typename T>
bool getDateTime (const Vocabulary::TermRef &term_ref, T &v) const
template<typename T>
bool getBlob (const Vocabulary::TermRef &term_ref, T &v) const
bool getBlob (const Vocabulary::TermRef &term_ref, std::string &str) const
template<typename T>
bool getString (const Vocabulary::TermRef &term_ref, T &v) const
bool getString (const Vocabulary::TermRef &term_ref, std::string &str) const
template<typename T>
void setInt (const Vocabulary::TermRef &term_ref, T value)
void setInt (const Vocabulary::TermRef &term_ref, const std::string &value)
template<typename T>
void setUInt (const Vocabulary::TermRef &term_ref, T value)
void setUInt (const Vocabulary::TermRef &term_ref, const std::string &value)
template<typename T>
void setBigInt (const Vocabulary::TermRef &term_ref, T value)
void setBigInt (const Vocabulary::TermRef &term_ref, const std::string &value)
template<typename T>
void setUBigInt (const Vocabulary::TermRef &term_ref, T value)
void setUBigInt (const Vocabulary::TermRef &term_ref, const std::string &value)
void setFloat (const Vocabulary::TermRef &term_ref, const float value)
void setFloat (const Vocabulary::TermRef &term_ref, const std::string &value)
void setDouble (const Vocabulary::TermRef &term_ref, const double value)
void setDouble (const Vocabulary::TermRef &term_ref, const std::string &value)
void setLongDouble (const Vocabulary::TermRef &term_ref, const long double value)
void setLongDouble (const Vocabulary::TermRef &term_ref, const std::string &value)
void setDateTime (const Vocabulary::TermRef &term_ref, const PionDateTime &value)
void setBlob (const Vocabulary::TermRef &term_ref, const CharType *value, std::size_t len)
void setBlob (const Vocabulary::TermRef &term_ref, const CharType *value)
void setBlob (const Vocabulary::TermRef &term_ref, const std::string &value)
void setBlob (const Vocabulary::TermRef &term_ref, const BlobType &value)
void setString (const Vocabulary::TermRef &term_ref, const CharType *value, std::size_t len)
void setString (const Vocabulary::TermRef &term_ref, const CharType *value)
void setString (const Vocabulary::TermRef &term_ref, const std::string &value)
void setString (const Vocabulary::TermRef &term_ref, const BlobType &value)
void set (const Vocabulary::Term &t, const std::string &value)
BlobParams make_blob (const std::string &str) const
 can be used to construct a new BLOB object based upon an existing std::string
BlobParams make_blob (const CharType *ptr, const std::size_t len) const
 can be used to construct a new BLOB object based upon an existing memory buffer
BlobParams make_blob (const CharType *ptr) const
 can be used to construct a new BLOB object based upon a c-style string
boost::uint32_t getReferences (void) const
 returns the number of references to this Event

Static Public Member Functions

static bool write (std::ostream &str, const ParameterValue &value, const Vocabulary::Term &t)
static std::string & write (std::string &str, const ParameterValue &value, const Vocabulary::Term &t)

Protected Types

typedef boost::intrusive::rbtree_algorithms<
ParameterNodeTraits
tree_algo
 algorithms used to manipulate the parameter binary tree

Protected Member Functions

void addReference (void)
 increments the reference count for this Event
boost::uint32_t removeReference (void)
 decrements the reference count for this Event
AllocType * getAllocator (void)
 returns a pointer to the Event's allocator
template<typename T>
void insert (const Vocabulary::TermRef &term_ref, const T &value)
template<typename T>
ParameterNodecreateParameter (const Vocabulary::TermRef &term_ref, const T &value)
void destroyParameter (ParameterNode *param_ptr)

Friends

class EventPtr
 allow the EventPtr class to update references, etc.
class EventFactory
 allow the EventFactory class to access the Event's allocator

Classes

class  IteratorBase
 base class used to define Event parameter iterator types More...
struct  ParameterKeyCompare
 function object used to compare two parameter items for ordering More...
struct  ParameterNode
struct  ParameterNodeCompare
 function object used to compare two parameter items for ordering More...
struct  ParameterNodeTraits
 traits class used by the boost.intrusive rbtree algorithms More...
class  TermTypeNotSerializableException
 exception thrown if you try to serialize a term that cannot be serialized More...


Member Typedef Documentation

template<typename CharType, typename AllocType>
typedef boost::variant<boost::int32_t, boost::uint32_t, boost::int64_t, boost::uint64_t, float, double, long double, PionDateTime, BlobType> pion::platform::BasicEvent< CharType, AllocType >::ParameterValue

data type that holds the values for Event parameters. a variant is used to avoid unnecessary heap allocations; it works similar to a union in that the allocation of a ParameterValue reserves enough space for any of the possible values assigned to it

Definition at line 170 of file Event.hpp.


Constructor & Destructor Documentation

template<typename CharType, typename AllocType>
pion::platform::BasicEvent< CharType, AllocType >::BasicEvent ( const EventType  t,
AllocType *  alloc_ptr 
) [inline]

constructs a new BasicEvent object

Parameters:
type the type of Event that is being created
alloc_ptr pointer to the Event's allocator

Definition at line 219 of file Event.hpp.


Member Function Documentation

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::clear ( const Vocabulary::TermRef term_ref  )  [inline]

clear all parameters defined for a particular Term

Parameters:
term_ref numeric identifier for the term

Definition at line 258 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::destroyParameter().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::copyValues ( const BasicEvent< CharType, AllocType > &  e,
const Vocabulary::TermRef term_ref 
) [inline]

copies all values for a particular term from one event into this one

Parameters:
e the event to copy terms from
term_ref numeric identifier for the term to copy

Definition at line 333 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::createParameter(), pion::platform::BasicEvent< CharType, AllocType >::m_key_compare, and pion::platform::BasicEvent< CharType, AllocType >::m_param_tree.

template<typename CharType, typename AllocType>
template<typename T>
ParameterNode* pion::platform::BasicEvent< CharType, AllocType >::createParameter ( const Vocabulary::TermRef term_ref,
const T &  value 
) [inline, protected]

allocates a new parameter node object

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term
Returns:
ParameterNode* pointer to a new parameter node object

Definition at line 1162 of file Event.hpp.

Referenced by pion::platform::BasicEvent< CharType, AllocType >::copyValues(), pion::platform::BasicEvent< CharType, AllocType >::insert(), and pion::platform::BasicEvent< CharType, AllocType >::operator+=().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::destroyParameter ( ParameterNode param_ptr  )  [inline, protected]

deallocates a parameter node object

Parameters:
param_ptr pointer to the parameter node object

Definition at line 1172 of file Event.hpp.

Referenced by pion::platform::BasicEvent< CharType, AllocType >::clear().

template<typename CharType, typename AllocType>
ValuesRange pion::platform::BasicEvent< CharType, AllocType >::equal_range ( const Vocabulary::TermRef term_ref  )  const [inline]

returns a range of Event parameters defined for a Term NOTE: if none found, first does not necessarily equal end() -> check first == second!

Parameters:
term_ref numeric identifier for the term
Returns:
std::pair<Iterator,Iterator> range of parameter iterators for the term

Definition at line 287 of file Event.hpp.

Referenced by pion::platform::Comparison::evaluate(), pion::platform::HideCreditCardNumbers(), pion::plugins::XMLCodec::write(), and pion::plugins::JSONCodec::write().

template<typename CharType, typename AllocType>
ConstIterator pion::platform::BasicEvent< CharType, AllocType >::find ( const Vocabulary::TermRef term_ref  )  const [inline]

returns an iterator pointing to a parameter for a given Term

Parameters:
term_ref numeric identifier for the term
Returns:
Iterator references the given Term

Definition at line 276 of file Event.hpp.

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::for_each ( boost::function2< void, Vocabulary::TermRef, const ParameterValue & >  f  )  const [inline]

triggers function object for each parameter in the Event

Parameters:
f callback function triggered for each parameter

Definition at line 299 of file Event.hpp.

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getBigInt ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) value of a big integer field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 523 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const boost::int64_t& pion::platform::BasicEvent< CharType, AllocType >::getBigInt ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) value of a big integer field

Parameters:
term_ref numeric identifier for the term
Returns:
const boost::int64_t& the value of the field

Definition at line 396 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
bool pion::platform::BasicEvent< CharType, AllocType >::getBlob ( const Vocabulary::TermRef term_ref,
std::string &  str 
) const [inline]

shorthand for retrieving the (const) BlobType value of field (specialization for std::string)

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 648 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getBlob ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) BlobType value of field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 631 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const BlobType& pion::platform::BasicEvent< CharType, AllocType >::getBlob ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) BlobType value of field

Parameters:
term_ref numeric identifier for the term
Returns:
const BlobType& the value of the field

Definition at line 473 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

Referenced by pion::platform::BasicEvent< CharType, AllocType >::getString().

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getDateTime ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) value date_time field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 613 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const PionDateTime& pion::platform::BasicEvent< CharType, AllocType >::getDateTime ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) value date_time field

Parameters:
term_ref numeric identifier for the term
Returns:
const PionDateTime& the value of the field

Definition at line 451 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getDouble ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) value of a double floating point number field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 577 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const double& pion::platform::BasicEvent< CharType, AllocType >::getDouble ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) value of a double floating point number field

Parameters:
term_ref numeric identifier for the term
Returns:
const double& the value of the field

Definition at line 429 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getFloat ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) value of a floating point number field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 559 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const float& pion::platform::BasicEvent< CharType, AllocType >::getFloat ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) value of a floating point number field

Parameters:
term_ref numeric identifier for the term
Returns:
const float& the value of the field

Definition at line 418 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getInt ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) value of an integer field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 487 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const boost::int32_t& pion::platform::BasicEvent< CharType, AllocType >::getInt ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) value of an integer field

Parameters:
term_ref numeric identifier for the term
Returns:
const boost::int32_t& the value of the field

Definition at line 374 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getLongDouble ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) value of a long double floating point number field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 595 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const long double& pion::platform::BasicEvent< CharType, AllocType >::getLongDouble ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) value of a long double floating point number field

Parameters:
term_ref numeric identifier for the term
Returns:
const long double& the value of the field

Definition at line 440 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const ParameterValue* pion::platform::BasicEvent< CharType, AllocType >::getPointer ( const Vocabulary::TermRef term_ref  )  const [inline]

returns the value for a particular term, or null if it does not exist

Parameters:
term_ref numeric identifier for the term
Returns:
const ParameterValue* pointer to the value currently assigned to the term (null if not found)

Definition at line 353 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::ParameterNode::value.

Referenced by pion::platform::Query::bindEvent(), pion::platform::BasicEvent< CharType, AllocType >::getBigInt(), pion::platform::BasicEvent< CharType, AllocType >::getBlob(), pion::platform::BasicEvent< CharType, AllocType >::getDateTime(), pion::platform::BasicEvent< CharType, AllocType >::getDouble(), pion::platform::BasicEvent< CharType, AllocType >::getFloat(), pion::platform::BasicEvent< CharType, AllocType >::getInt(), pion::platform::BasicEvent< CharType, AllocType >::getLongDouble(), pion::plugins::PythonReactor::getSession(), pion::platform::BasicEvent< CharType, AllocType >::getString(), pion::platform::BasicEvent< CharType, AllocType >::getUBigInt(), pion::platform::BasicEvent< CharType, AllocType >::getUInt(), and pion::plugins::LogCodec::write().

template<typename CharType, typename AllocType>
bool pion::platform::BasicEvent< CharType, AllocType >::getString ( const Vocabulary::TermRef term_ref,
std::string &  str 
) const [inline]

shorthand for retrieving the (const) value of a string field (specialization for std::string)

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 678 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getBlob().

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getString ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) value of a string field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 666 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getBlob().

template<typename CharType, typename AllocType>
const CharType* pion::platform::BasicEvent< CharType, AllocType >::getString ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) value of a string field

Parameters:
term_ref numeric identifier for the term
Returns:
const CharType * the value of the field

Definition at line 462 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getUBigInt ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) value of an unsigned big integer field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 541 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const boost::uint64_t& pion::platform::BasicEvent< CharType, AllocType >::getUBigInt ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) value of an unsigned big integer field

Parameters:
term_ref numeric identifier for the term
Returns:
const boost::uint64_t& the value of the field

Definition at line 407 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
template<typename T>
bool pion::platform::BasicEvent< CharType, AllocType >::getUInt ( const Vocabulary::TermRef term_ref,
T &  v 
) const [inline]

shorthand for retrieving the (const) value of an unsigned integer field

Parameters:
term_ref numeric identifier for the term
v will be set to the value of the term if it is defined
Returns:
true if the term is defined and v was set to its value, or false if not

Definition at line 505 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
const boost::uint32_t& pion::platform::BasicEvent< CharType, AllocType >::getUInt ( const Vocabulary::TermRef term_ref  )  const [inline]

shorthand for retrieving the (const) value of an unsigned integer field

Parameters:
term_ref numeric identifier for the term
Returns:
const boost::uint32_t& the value of the field

Definition at line 385 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::getPointer().

template<typename CharType, typename AllocType>
template<typename T>
void pion::platform::BasicEvent< CharType, AllocType >::insert ( const Vocabulary::TermRef term_ref,
const T &  value 
) [inline, protected]

inserts a new parameter into the Event

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 1146 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::createParameter(), and pion::platform::Vocabulary::UNDEFINED_TERM_REF.

Referenced by pion::platform::BasicEvent< CharType, AllocType >::setBigInt(), pion::platform::BasicEvent< CharType, AllocType >::setBlob(), pion::platform::BasicEvent< CharType, AllocType >::setDateTime(), pion::platform::BasicEvent< CharType, AllocType >::setDouble(), pion::platform::BasicEvent< CharType, AllocType >::setFloat(), pion::platform::BasicEvent< CharType, AllocType >::setInt(), pion::platform::BasicEvent< CharType, AllocType >::setLongDouble(), pion::platform::BasicEvent< CharType, AllocType >::setUBigInt(), and pion::platform::BasicEvent< CharType, AllocType >::setUInt().

template<typename CharType, typename AllocType>
bool pion::platform::BasicEvent< CharType, AllocType >::isDefined ( const Vocabulary::TermRef term_ref  )  const [inline]

returns true if a Term has at least one definition

Parameters:
term_ref numeric identifier for the term
Returns:
true if the Term has at least one definition

Definition at line 364 of file Event.hpp.

template<typename CharType, typename AllocType>
BasicEvent& pion::platform::BasicEvent< CharType, AllocType >::operator+= ( const BasicEvent< CharType, AllocType > &  e  )  [inline]

adds all the terms from another Event into this one

Parameters:
e the event to copy terms from
Returns:
BasicEvent& reference to this event

Definition at line 314 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::createParameter(), and pion::platform::BasicEvent< CharType, AllocType >::m_param_tree.

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::set ( const Vocabulary::Term t,
const std::string &  value 
) [inline]

sets the value for a particular term (casts if necessary, may throw)

Parameters:
term_ref numeric identifier for the term
term_type data type for the term
value new value assigned to the term

Definition at line 929 of file Event.hpp.

References pion::PionTimeFacet::fromString(), pion::platform::BasicEvent< CharType, AllocType >::setBigInt(), pion::platform::BasicEvent< CharType, AllocType >::setDateTime(), pion::platform::BasicEvent< CharType, AllocType >::setDouble(), pion::platform::BasicEvent< CharType, AllocType >::setFloat(), pion::platform::BasicEvent< CharType, AllocType >::setInt(), pion::platform::BasicEvent< CharType, AllocType >::setLongDouble(), pion::platform::BasicEvent< CharType, AllocType >::setString(), pion::platform::BasicEvent< CharType, AllocType >::setUBigInt(), pion::platform::BasicEvent< CharType, AllocType >::setUInt(), pion::platform::Vocabulary::Term::term_format, pion::platform::Vocabulary::Term::term_ref, pion::platform::Vocabulary::Term::term_type, pion::platform::Vocabulary::TYPE_BLOB, pion::platform::Vocabulary::TYPE_CHAR, pion::platform::Vocabulary::TYPE_DATE, pion::platform::Vocabulary::TYPE_DATE_TIME, pion::platform::Vocabulary::TYPE_DOUBLE, pion::platform::Vocabulary::TYPE_FLOAT, pion::platform::Vocabulary::TYPE_INT16, pion::platform::Vocabulary::TYPE_INT32, pion::platform::Vocabulary::TYPE_INT64, pion::platform::Vocabulary::TYPE_INT8, pion::platform::Vocabulary::TYPE_LONG_DOUBLE, pion::platform::Vocabulary::TYPE_LONG_STRING, pion::platform::Vocabulary::TYPE_NULL, pion::platform::Vocabulary::TYPE_OBJECT, pion::platform::Vocabulary::TYPE_SHORT_STRING, pion::platform::Vocabulary::TYPE_STRING, pion::platform::Vocabulary::TYPE_TIME, pion::platform::Vocabulary::TYPE_UINT16, pion::platform::Vocabulary::TYPE_UINT32, pion::platform::Vocabulary::TYPE_UINT64, pion::platform::Vocabulary::TYPE_UINT8, and pion::platform::Vocabulary::TYPE_ZBLOB.

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setBigInt ( const Vocabulary::TermRef term_ref,
const std::string &  value 
) [inline]

sets the value for a particular term to a big integer

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 741 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

template<typename CharType, typename AllocType>
template<typename T>
void pion::platform::BasicEvent< CharType, AllocType >::setBigInt ( const Vocabulary::TermRef term_ref,
value 
) [inline]

sets the value for a particular term to a big integer

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 731 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

Referenced by pion::plugins::XMLCodec::read(), pion::plugins::JSONCodec::read(), and pion::platform::BasicEvent< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setBlob ( const Vocabulary::TermRef term_ref,
const BlobType value 
) [inline]

sets the value for a particular term to an existing BlobType value

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 875 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setBlob ( const Vocabulary::TermRef term_ref,
const std::string &  value 
) [inline]

sets the value for a particular term to a string using a std::string

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 865 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert(), and pion::platform::BasicEvent< CharType, AllocType >::make_blob().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setBlob ( const Vocabulary::TermRef term_ref,
const CharType *  value 
) [inline]

sets the value for a particular term to a string using a character array

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 855 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert(), and pion::platform::BasicEvent< CharType, AllocType >::make_blob().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setBlob ( const Vocabulary::TermRef term_ref,
const CharType *  value,
std::size_t  len 
) [inline]

sets the value for a particular term to a string using a character array

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term
len length of the string object, in bytes

Definition at line 843 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert(), and pion::platform::BasicEvent< CharType, AllocType >::make_blob().

Referenced by pion::platform::BasicEvent< CharType, AllocType >::setString().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setDateTime ( const Vocabulary::TermRef term_ref,
const PionDateTime value 
) [inline]

sets the value for a particular term to a date_time value

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 832 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

Referenced by pion::plugins::XMLCodec::read(), pion::plugins::JSONCodec::read(), and pion::platform::BasicEvent< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setDouble ( const Vocabulary::TermRef term_ref,
const std::string &  value 
) [inline]

sets the value for a particular term to a double floating point number

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 802 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setDouble ( const Vocabulary::TermRef term_ref,
const double  value 
) [inline]

sets the value for a particular term to a double floating point number

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 792 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

Referenced by pion::plugins::XMLCodec::read(), pion::plugins::JSONCodec::read(), and pion::platform::BasicEvent< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setFloat ( const Vocabulary::TermRef term_ref,
const std::string &  value 
) [inline]

sets the value for a particular term to a floating point number

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 782 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setFloat ( const Vocabulary::TermRef term_ref,
const float  value 
) [inline]

sets the value for a particular term to a floating point number

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 772 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

Referenced by pion::plugins::XMLCodec::read(), pion::plugins::JSONCodec::read(), and pion::platform::BasicEvent< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setInt ( const Vocabulary::TermRef term_ref,
const std::string &  value 
) [inline]

sets the value for a particular term to an integer

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 699 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

template<typename CharType, typename AllocType>
template<typename T>
void pion::platform::BasicEvent< CharType, AllocType >::setInt ( const Vocabulary::TermRef term_ref,
value 
) [inline]

sets the value for a particular term to an integer

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 689 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

Referenced by pion::plugins::XMLCodec::read(), pion::plugins::JSONCodec::read(), and pion::platform::BasicEvent< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setLongDouble ( const Vocabulary::TermRef term_ref,
const std::string &  value 
) [inline]

sets the value for a particular term to a long double floating point number

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 822 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setLongDouble ( const Vocabulary::TermRef term_ref,
const long double  value 
) [inline]

sets the value for a particular term to a long double floating point number

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 812 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

Referenced by pion::plugins::XMLCodec::read(), pion::plugins::JSONCodec::read(), and pion::platform::BasicEvent< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setString ( const Vocabulary::TermRef term_ref,
const BlobType value 
) [inline]

sets the value for a particular term to an existing BlobType value (alias for setBlob)

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 918 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::setBlob().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setString ( const Vocabulary::TermRef term_ref,
const std::string &  value 
) [inline]

sets the value for a particular term to a string using a std::string (alias for setBlob)

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 908 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::setBlob().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setString ( const Vocabulary::TermRef term_ref,
const CharType *  value 
) [inline]

sets the value for a particular term to a string using a character array (alias for setBlob)

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 898 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::setBlob().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setString ( const Vocabulary::TermRef term_ref,
const CharType *  value,
std::size_t  len 
) [inline]

sets the value for a particular term to a string using a character array (alias for setBlob)

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term
len length of the string object, in bytes

Definition at line 886 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::setBlob().

Referenced by pion::plugins::XMLCodec::read(), pion::plugins::JSONCodec::read(), and pion::platform::BasicEvent< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setUBigInt ( const Vocabulary::TermRef term_ref,
const std::string &  value 
) [inline]

sets the value for a particular term to an unsigned big integer

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 762 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

template<typename CharType, typename AllocType>
template<typename T>
void pion::platform::BasicEvent< CharType, AllocType >::setUBigInt ( const Vocabulary::TermRef term_ref,
value 
) [inline]

sets the value for a particular term to an unsigned big integer

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 752 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

Referenced by pion::plugins::XMLCodec::read(), pion::plugins::JSONCodec::read(), and pion::platform::BasicEvent< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
void pion::platform::BasicEvent< CharType, AllocType >::setUInt ( const Vocabulary::TermRef term_ref,
const std::string &  value 
) [inline]

sets the value for a particular term to an unsigned integer

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 720 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

template<typename CharType, typename AllocType>
template<typename T>
void pion::platform::BasicEvent< CharType, AllocType >::setUInt ( const Vocabulary::TermRef term_ref,
value 
) [inline]

sets the value for a particular term to an unsigned integer

Parameters:
term_ref numeric identifier for the term
value new value assigned to the term

Definition at line 710 of file Event.hpp.

References pion::platform::BasicEvent< CharType, AllocType >::insert().

Referenced by pion::plugins::XMLCodec::read(), pion::plugins::JSONCodec::read(), and pion::platform::BasicEvent< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
static std::string& pion::platform::BasicEvent< CharType, AllocType >::write ( std::string &  str,
const ParameterValue value,
const Vocabulary::Term t 
) [inline, static]

writes a parameter value to a string

Parameters:
str the output string to write to
value the ParameterValue to write
t the Vocabulary Term associated with the ParameterValue

Definition at line 1049 of file Event.hpp.

References pion::platform::Vocabulary::Term::term_format, pion::platform::Vocabulary::Term::term_type, pion::PionTimeFacet::toString(), pion::platform::Vocabulary::TYPE_BLOB, pion::platform::Vocabulary::TYPE_CHAR, pion::platform::Vocabulary::TYPE_DATE, pion::platform::Vocabulary::TYPE_DATE_TIME, pion::platform::Vocabulary::TYPE_DOUBLE, pion::platform::Vocabulary::TYPE_FLOAT, pion::platform::Vocabulary::TYPE_INT16, pion::platform::Vocabulary::TYPE_INT32, pion::platform::Vocabulary::TYPE_INT64, pion::platform::Vocabulary::TYPE_INT8, pion::platform::Vocabulary::TYPE_LONG_DOUBLE, pion::platform::Vocabulary::TYPE_LONG_STRING, pion::platform::Vocabulary::TYPE_NULL, pion::platform::Vocabulary::TYPE_OBJECT, pion::platform::Vocabulary::TYPE_SHORT_STRING, pion::platform::Vocabulary::TYPE_STRING, pion::platform::Vocabulary::TYPE_TIME, pion::platform::Vocabulary::TYPE_UINT16, pion::platform::Vocabulary::TYPE_UINT32, pion::platform::Vocabulary::TYPE_UINT64, pion::platform::Vocabulary::TYPE_UINT8, and pion::platform::Vocabulary::TYPE_ZBLOB.

template<typename CharType, typename AllocType>
static bool pion::platform::BasicEvent< CharType, AllocType >::write ( std::ostream &  str,
const ParameterValue value,
const Vocabulary::Term t 
) [inline, static]

writes a parameter value to a stream

Parameters:
str the output stream to write to
value the ParameterValue to write
t the Vocabulary Term associated with the ParameterValue

Definition at line 989 of file Event.hpp.

References pion::platform::Vocabulary::Term::term_format, pion::platform::Vocabulary::Term::term_type, pion::platform::Vocabulary::TYPE_BLOB, pion::platform::Vocabulary::TYPE_CHAR, pion::platform::Vocabulary::TYPE_DATE, pion::platform::Vocabulary::TYPE_DATE_TIME, pion::platform::Vocabulary::TYPE_DOUBLE, pion::platform::Vocabulary::TYPE_FLOAT, pion::platform::Vocabulary::TYPE_INT16, pion::platform::Vocabulary::TYPE_INT32, pion::platform::Vocabulary::TYPE_INT64, pion::platform::Vocabulary::TYPE_INT8, pion::platform::Vocabulary::TYPE_LONG_DOUBLE, pion::platform::Vocabulary::TYPE_LONG_STRING, pion::platform::Vocabulary::TYPE_NULL, pion::platform::Vocabulary::TYPE_OBJECT, pion::platform::Vocabulary::TYPE_SHORT_STRING, pion::platform::Vocabulary::TYPE_STRING, pion::platform::Vocabulary::TYPE_TIME, pion::platform::Vocabulary::TYPE_UINT16, pion::platform::Vocabulary::TYPE_UINT32, pion::platform::Vocabulary::TYPE_UINT64, pion::platform::Vocabulary::TYPE_UINT8, pion::platform::Vocabulary::TYPE_ZBLOB, and pion::PionTimeFacet::write().


The documentation for this class was generated from the following file:
Generated on Wed Apr 13 16:38:35 2011 for pion-platform by  doxygen 1.4.7