com::pcbsys::nirvana::client::nObject Class Reference

This class is a holder for different types of object. More...

#include <nObject.h>

Inherits fObject.

Public Member Functions

int getSize ()
 If it is an array of objects, return the size of the array.
 
int getType ()
 Return the type of the value contained in the nEventProperties.
 
const std::string getTypeString ()
 Return the type as a String representation, for example, LONG, STRING etc. More...
 
 nObject (unsigned char val)
 Construct a new nObject which holds an unsigned char. More...
 
 nObject (char val)
 Construct a new nObject which holds a char. More...
 
 nObject (bool val)
 Construct a new nObject which holds a boolean. More...
 
 nObject (short val)
 Construct a new nObject which holds a short. More...
 
 nObject (int val)
 Construct a new nObject which holds an int. More...
 
 nObject (longlong val)
 Construct a new nObject which holds a long. More...
 
 nObject (float val)
 Construct a new nObject which holds a float. More...
 
 nObject (double val)
 Construct a new nObject which holds a double. More...
 
 nObject (const std::string &str)
 Construct a new nObject which holds a string. More...
 
 nObject (fEventDictionary *pDict)
 Construct a new nObject which holds an fEventDictionary*. More...
 
 nObject (unsigned char *val, int size)
 Construct a new nObject which holds an array of unsigned chars. More...
 
 nObject (char *val, int size)
 Construct a new nObject which holds an array of chars. More...
 
 nObject (bool *val, int size)
 Construct a new nObject which holds an array of booleans. More...
 
 nObject (short *val, int size)
 Construct a new nObject which holds an array of shorts. More...
 
 nObject (int *val, int size)
 Construct a new nObject which holds an array of ints. More...
 
 nObject (longlong *val, int size)
 Construct a new nObject which holds a array of longs. More...
 
 nObject (float *val, int size)
 Construct a new nObject which holds an array of floats. More...
 
 nObject (double *val, int size)
 Construct a new nObject which holds an array of doubles. More...
 
 nObject (std::string *val, int size)
 Construct a new nObject which holds an array of strings. More...
 
 nObject (fEventDictionary **val, int size)
 Construct a new nObject which holds an array of fEventDictionary*. More...
 
void toString (std::string &value)
 Convert the object to a string.
 

Detailed Description

This class is a holder for different types of object.

It is used in situations where a function needs to return various different types of object for example it is used in conjunction with the nEventPropertiesIterator which, on each iteration, may return a different object type.

An nObject can be cast to whatever object it contains e.g. int x = (int)nobject;

See Also
nEventProperties
nEventPropertiesIterator

Constructor & Destructor Documentation

com::pcbsys::nirvana::client::nObject::nObject ( unsigned char  val)

Construct a new nObject which holds an unsigned char.

Parameters
valthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( char  val)

Construct a new nObject which holds a char.

Parameters
valthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( bool  val)

Construct a new nObject which holds a boolean.

Parameters
valthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( short  val)

Construct a new nObject which holds a short.

Parameters
valthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( int  val)

Construct a new nObject which holds an int.

Parameters
valthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( longlong  val)

Construct a new nObject which holds a long.

Parameters
valthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( float  val)

Construct a new nObject which holds a float.

Parameters
valthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( double  val)

Construct a new nObject which holds a double.

Parameters
valthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( const std::string &  str)

Construct a new nObject which holds a string.

Parameters
strthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( fEventDictionary *  pDict)

Construct a new nObject which holds an fEventDictionary*.

Parameters
pDictthe value to be held in the nObject
com::pcbsys::nirvana::client::nObject::nObject ( unsigned char *  val,
int  size 
)

Construct a new nObject which holds an array of unsigned chars.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array
com::pcbsys::nirvana::client::nObject::nObject ( char *  val,
int  size 
)

Construct a new nObject which holds an array of chars.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array
com::pcbsys::nirvana::client::nObject::nObject ( bool *  val,
int  size 
)

Construct a new nObject which holds an array of booleans.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array
com::pcbsys::nirvana::client::nObject::nObject ( short *  val,
int  size 
)

Construct a new nObject which holds an array of shorts.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array
com::pcbsys::nirvana::client::nObject::nObject ( int *  val,
int  size 
)

Construct a new nObject which holds an array of ints.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array
com::pcbsys::nirvana::client::nObject::nObject ( longlong *  val,
int  size 
)

Construct a new nObject which holds a array of longs.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array
com::pcbsys::nirvana::client::nObject::nObject ( float *  val,
int  size 
)

Construct a new nObject which holds an array of floats.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array
com::pcbsys::nirvana::client::nObject::nObject ( double *  val,
int  size 
)

Construct a new nObject which holds an array of doubles.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array
com::pcbsys::nirvana::client::nObject::nObject ( std::string *  val,
int  size 
)

Construct a new nObject which holds an array of strings.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array
com::pcbsys::nirvana::client::nObject::nObject ( fEventDictionary **  val,
int  size 
)

Construct a new nObject which holds an array of fEventDictionary*.

Parameters
valthe value to be held in the nObject
sizethe number of elements in the array

Member Function Documentation

const std::string com::pcbsys::nirvana::client::nObject::getTypeString ( )

Return the type as a String representation, for example, LONG, STRING etc.

etc.