com::pcbsys::nirvana::client::nEventProperties Class Reference

This class contains a collection of key-value pairs, defining event meta data which can be used to create filter rules. More...

#include <nEventProperties.h>

Inherits fObject.

Public Member Functions

bool containsKey (const std::string &key)
 Returns true if the key is contained within the dictionary. More...
 
void copy (nEventProperties *pDictionary)
 Copies the properties from one to this. More...
 
fObject * get (const std::string &key)
 Retrieves an fObject* by the key given. More...
 
fObject * get (fObject *pKey)
 Retrieves an fObject* by the key given. More...
 
bool getBoolean (const std::string &key)
 Retrieves the data from the table based on the key as a bool. More...
 
bool * getBooleanArray (const std::string &key, int &nBoolean)
 Retrieves a bool[] from the properties. More...
 
unsigned char getByte (const std::string &key)
 Retrieves a byte by the name given. More...
 
unsigned char * getByteArray (const std::string &key, int &nByte)
 Retrieves a byte[] from the dictionary. More...
 
char getChar (const std::string &key)
 Retrieves a char from the properties. More...
 
char * getCharArray (const std::string &key, int &nChar)
 Retrieves a char[] from the properties. More...
 
const std::string getClass (const std::string &key)
 Get the class name of the value represented by the key. More...
 
nEventPropertiesgetDictionary (const std::string &key)
 Retrieve nEventProperties from this one. More...
 
nEventProperties ** getDictionaryArray (const std::string &key, int &nDict)
 Return an array of nEventProperties. More...
 
double getDouble (const std::string &key)
 Retrieves the data from the table based on the key as a double. More...
 
double * getDoubleArray (const std::string &key, int &nDouble)
 Retrieves a double[] from the properties. More...
 
std::map< std::string, fObject * > & getEntrySet ()
 Get an iterator of the key and values in an Map.Entry. More...
 
float getFloat (const std::string &key)
 Retrieves a float from the properties. More...
 
float * getFloatArray (const std::string &key, int &nFloat)
 Retrieves a float[] from the properties. More...
 
int getInt (const std::string &key)
 Retrieves an int by the name given. More...
 
int * getIntArray (const std::string &key, int &nInt)
 Gets an int[] from the properties. More...
 
nEventPropertiesIteratorgetIterator ()
 Retrieves an nEventPropertiesIterator*. More...
 
std::map< std::string, fObject * >
::iterator 
getKeys ()
 Get an enumeration of keys. More...
 
std::map< std::string, fObject * >
::iterator 
getKeysAsStrings ()
 Get an enumeration of keys as Strings. More...
 
longlong getLong (const std::string &key)
 Retrieves a longlong by the name given. More...
 
longlong * getLongArray (const std::string &key, int &nLong)
 Retrieves a long[] from the properties. More...
 
short getShort (const std::string &key)
 Retrieves a short from the properties. More...
 
short * getShortArray (const std::string &key, int &nShort)
 Retrieves an array of shorts. More...
 
int getSize ()
 Return the number of properties held. More...
 
std::string getString (const std::string &key)
 Retrieves a string by the name given. More...
 
std::string * getStringArray (const std::string &key, int &nString)
 Retrieves a string array by the name given. More...
 
void merge (nEventProperties *pProps, bool overwrite)
 Adds the values from the supplied properties to this object. More...
 
 nEventProperties (void)
 Default constructor.
 
 nEventProperties (nEventProperties *pEd, bool bCopyNew=true)
 Constructs an event properties object that is a copy of the specified event properties. More...
 
void put (const std::string &key, const std::string &value)
 Places a String into the properties. More...
 
void put (const std::string &key, int value)
 Places an int into the properties. More...
 
void put (const std::string &key, longlong value)
 Places a longlong into the properties. More...
 
void put (const std::string &key, short value)
 Places a short into the properties. More...
 
void put (const std::string &key, bool value)
 Places a bool into the properties. More...
 
void put (const std::string &key, float value)
 Places a float into the properties. More...
 
void put (const std::string &key, double value)
 Places a double into the properties. More...
 
void put (const std::string &key, char value)
 Places a char into the properties. More...
 
void put (const std::string &key, unsigned char value)
 Places an unsigned char into the properties. More...
 
void put (const std::string &key, nEventProperties *pValue)
 Put an nEventProperties into this one to enable nested properties. More...
 
void put (const std::string &key, double *value, int nValue)
 Places a double[] into the properties. More...
 
void put (const std::string &key, float *value, int nValue)
 Puts a float[] into the properties. More...
 
void put (const std::string &key, longlong *value, int nValue)
 Places a long[] into the properties. More...
 
void put (const std::string &key, int *value, int nValue)
 Places a int[] into the properties. More...
 
void put (const std::string &key, bool *value, int nValue)
 Places a bool[] into the properties. More...
 
void put (const std::string &key, char *c, int nValue)
 Puts an array of chars into the properties. More...
 
void put (const std::string &key, unsigned char *b, int nValue)
 Places a byte[] into the properties. More...
 
void put (const std::string &key, short *s, int nValue)
 Places an array of shorts into the properties. More...
 
void put (const std::string &key, std::string *value, int nValue)
 Places a String[] into the properties. More...
 
void put (const std::string &key, nEventProperties **value, int nValue)
 Put an nEventProperties[] into this property to enable nested properties. More...
 
void remove (const std::string &key)
 Removes the value indexed by the key. More...
 

Detailed Description

This class contains a collection of key-value pairs, defining event meta data which can be used to create filter rules.

Constructor & Destructor Documentation

com::pcbsys::nirvana::client::nEventProperties::nEventProperties ( nEventProperties pEd,
bool  bCopyNew = true 
)

Constructs an event properties object that is a copy of the specified event properties.

Parameters
*pEdthe event properties object to be copied

Member Function Documentation

bool com::pcbsys::nirvana::client::nEventProperties::containsKey ( const std::string &  key)

Returns true if the key is contained within the dictionary.

Parameters
keyName of the key to search for
Returns
True if the properties contains the key
void com::pcbsys::nirvana::client::nEventProperties::copy ( nEventProperties pDictionary)

Copies the properties from one to this.

Parameters
*pDictionarydictionary to copy
fObject* com::pcbsys::nirvana::client::nEventProperties::get ( const std::string &  key)

Retrieves an fObject* by the key given.

Parameters
keystring key to return
Returns
fObject of the value
fObject* com::pcbsys::nirvana::client::nEventProperties::get ( fObject *  pKey)

Retrieves an fObject* by the key given.

Parameters
*pKeyfObject
Returns
fObject*
bool com::pcbsys::nirvana::client::nEventProperties::getBoolean ( const std::string &  key)

Retrieves the data from the table based on the key as a bool.

Parameters
keyKey to reference the data
Returns
a bool with the value associated with this key
bool* com::pcbsys::nirvana::client::nEventProperties::getBooleanArray ( const std::string &  key,
int &  nBoolean 
)

Retrieves a bool[] from the properties.

Parameters
keyName of the bool[]
&nBooleanlength of the array
Returns
bool[]
unsigned char com::pcbsys::nirvana::client::nEventProperties::getByte ( const std::string &  key)

Retrieves a byte by the name given.

Parameters
keyName for the byte
Returns
byte value
unsigned char* com::pcbsys::nirvana::client::nEventProperties::getByteArray ( const std::string &  key,
int &  nByte 
)

Retrieves a byte[] from the dictionary.

Parameters
keyname for the byte[]
&nBytelength of the array
Returns
byte[]
char com::pcbsys::nirvana::client::nEventProperties::getChar ( const std::string &  key)

Retrieves a char from the properties.

Parameters
keyname of the char
Returns
char
char* com::pcbsys::nirvana::client::nEventProperties::getCharArray ( const std::string &  key,
int &  nChar 
)

Retrieves a char[] from the properties.

Parameters
keyname of the char array
&nCharlength of the array
Returns
char[]
const std::string com::pcbsys::nirvana::client::nEventProperties::getClass ( const std::string &  key)

Get the class name of the value represented by the key.

Parameters
keyString value to lookup
Returns
String class name of the value
nEventProperties* com::pcbsys::nirvana::client::nEventProperties::getDictionary ( const std::string &  key)

Retrieve nEventProperties from this one.

Parameters
keyName of the nEventProperty
Returns
an nEventProperty
nEventProperties** com::pcbsys::nirvana::client::nEventProperties::getDictionaryArray ( const std::string &  key,
int &  nDict 
)

Return an array of nEventProperties.

Parameters
keyname of the array to return
nDictlength of the dictionary array
Returns
nEventProperties[]
double com::pcbsys::nirvana::client::nEventProperties::getDouble ( const std::string &  key)

Retrieves the data from the table based on the key as a double.

Parameters
keyKey to reference the data
Returns
a double with the value associated with this key
double* com::pcbsys::nirvana::client::nEventProperties::getDoubleArray ( const std::string &  key,
int &  nDouble 
)

Retrieves a double[] from the properties.

Parameters
keyName of the double[]
nDoublelength of the array
Returns
double[]
std::map<std::string, fObject*>& com::pcbsys::nirvana::client::nEventProperties::getEntrySet ( )

Get an iterator of the key and values in an Map.Entry.

Allows the user to get both the key and value from one iteration of the nEventProperties.

Returns
nEventPropertiesIterator Map.Entrys in the properties
float com::pcbsys::nirvana::client::nEventProperties::getFloat ( const std::string &  key)

Retrieves a float from the properties.

Parameters
keyName of the float
Returns
float value
float* com::pcbsys::nirvana::client::nEventProperties::getFloatArray ( const std::string &  key,
int &  nFloat 
)

Retrieves a float[] from the properties.

Parameters
keyName of the float[]
nFloatlength of the array
Returns
float[]
int com::pcbsys::nirvana::client::nEventProperties::getInt ( const std::string &  key)

Retrieves an int by the name given.

Parameters
keyName for the int
Returns
int value
int* com::pcbsys::nirvana::client::nEventProperties::getIntArray ( const std::string &  key,
int &  nInt 
)

Gets an int[] from the properties.

Parameters
keyName of the int[]
nIntlength of the array
Returns
int[]
nEventPropertiesIterator* com::pcbsys::nirvana::client::nEventProperties::getIterator ( )

Retrieves an nEventPropertiesIterator*.

Returns
nEventPropertiesIterator*
std::map<std::string, fObject*>::iterator com::pcbsys::nirvana::client::nEventProperties::getKeys ( )

Get an enumeration of keys.

Returns
enumerator of keys
std::map<std::string, fObject*>::iterator com::pcbsys::nirvana::client::nEventProperties::getKeysAsStrings ( )

Get an enumeration of keys as Strings.

Returns
an enumeration of String objects representing the keys
longlong com::pcbsys::nirvana::client::nEventProperties::getLong ( const std::string &  key)

Retrieves a longlong by the name given.

Parameters
keyName for the long
Returns
long value
longlong* com::pcbsys::nirvana::client::nEventProperties::getLongArray ( const std::string &  key,
int &  nLong 
)

Retrieves a long[] from the properties.

Parameters
keyName of the long[]
nLonglength of the array
Returns
long[]
short com::pcbsys::nirvana::client::nEventProperties::getShort ( const std::string &  key)

Retrieves a short from the properties.

Parameters
keyname of the short
Returns
short value
short* com::pcbsys::nirvana::client::nEventProperties::getShortArray ( const std::string &  key,
int &  nShort 
)

Retrieves an array of shorts.

Parameters
keyname of the short array
nShortlength of the array
Returns
short[]
int com::pcbsys::nirvana::client::nEventProperties::getSize ( )

Return the number of properties held.

Returns
int size
std::string com::pcbsys::nirvana::client::nEventProperties::getString ( const std::string &  key)

Retrieves a string by the name given.

Parameters
keyName for the string
Returns
string value
std::string* com::pcbsys::nirvana::client::nEventProperties::getStringArray ( const std::string &  key,
int &  nString 
)

Retrieves a string array by the name given.

Parameters
keyName for the string array
nStringThe number of strings
Returns
string array
void com::pcbsys::nirvana::client::nEventProperties::merge ( nEventProperties pProps,
bool  overwrite 
)

Adds the values from the supplied properties to this object.

If this object already has keys with the same name then the behaviour is driven by the bool overwrite.

Parameters
*pPropsThe nEventProperties object to merge with this copy
overwriteIf true then duplicate values will take the new value
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
const std::string &  value 
)

Places a String into the properties.

Parameters
keyName for the value
valueString
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
int  value 
)

Places an int into the properties.

Parameters
keyName for the value
valueint
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
longlong  value 
)

Places a longlong into the properties.

Parameters
keyName for the value
valuelonglong
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
short  value 
)

Places a short into the properties.

Parameters
keyName for the value
valueshort
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
bool  value 
)

Places a bool into the properties.

Parameters
keyName for the value
valuebool
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
float  value 
)

Places a float into the properties.

Parameters
keyName for the value
valuefloat
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
double  value 
)

Places a double into the properties.

Parameters
keyName for the value
valuedouble
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
char  value 
)

Places a char into the properties.

Parameters
keyName for the value
valuechar
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
unsigned char  value 
)

Places an unsigned char into the properties.

Parameters
keyName for the value
valueunsigned char
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
nEventProperties pValue 
)

Put an nEventProperties into this one to enable nested properties.

Parameters
keyname of this value
*pValuenEventProperty to insert
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
double *  value,
int  nValue 
)

Places a double[] into the properties.

Parameters
keyName of the double[]
nValuelength of the array
valuedouble[]
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
float *  value,
int  nValue 
)

Puts a float[] into the properties.

Parameters
keyName of the float[]
nValuelength of the value array
valuefloat[]
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
longlong *  value,
int  nValue 
)

Places a long[] into the properties.

Parameters
keyname of the long[]
valuelong[]
nValuelength of the value array
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
int *  value,
int  nValue 
)

Places a int[] into the properties.

Parameters
keyName of the key
valueint[]
nValuelength of the value array
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
bool *  value,
int  nValue 
)

Places a bool[] into the properties.

Parameters
keyName of the boolean[]
valuebool[]
nValuelength of the value array
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
char *  c,
int  nValue 
)

Puts an array of chars into the properties.

Parameters
keyName of the char[]
cchar[]
nValuelength of the c array
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
unsigned char *  b,
int  nValue 
)

Places a byte[] into the properties.

Parameters
keyname for the byte[]
bbyte[]
nValuelength of the b array
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
short *  s,
int  nValue 
)

Places an array of shorts into the properties.

Parameters
keyName for the array
sshort[]
nValuelength of the s array
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
std::string *  value,
int  nValue 
)

Places a String[] into the properties.

Parameters
keyName for the value
valueString[]
nValuelength of the value array
void com::pcbsys::nirvana::client::nEventProperties::put ( const std::string &  key,
nEventProperties **  value,
int  nValue 
)

Put an nEventProperties[] into this property to enable nested properties.

Parameters
keyName to call this
valueArray of nEventProperties
nValuelength of the value array
void com::pcbsys::nirvana::client::nEventProperties::remove ( const std::string &  key)

Removes the value indexed by the key.

Parameters
keyKey to remove