Marsyas  0.5.0-beta1
Public Member Functions | Friends
TmControlValue Class Reference

TmControlValue is a simple parameter passing mechanism for updtimer. More...

#include <TmControlValue.h>

Public Member Functions

std::string getSType ()
 get the name of this value type.
int getType ()
 get the type enumeration for this value type. The value is one of the tmcv values defined in TmControlValue.h
 TmControlValue ()
 null value type (tmcv_null)
 TmControlValue (const TmControlValue &v)
 copy constructor
 TmControlValue (float re)
 real value type (tmcv_real)
 TmControlValue (double re)
 real value type (tmcv_real)
 TmControlValue (int ne)
 natural value type (tmcv_natural)
 TmControlValue (long int ne)
 natural value type (tmcv_natural)
 TmControlValue (std::string st)
 string value type (tmcv_string)
 TmControlValue (const char *cc)
 string value type (tmcv_string)
 TmControlValue (bool be)
 bool value type (tmcv_bool)
 TmControlValue (MarSystem *m)
 MarSystem value type (tmcv_marsystem)
bool toBool ()
 get value as bool. If not a bool value then a warning is reported and false returned.
MarSystemtoMarSystem ()
 get value as MarSystem. If not a MarSystem value then a warning is reported and NULL returned.
mrs_natural toNatural ()
 get value as natural. If not a natural value then a warning is reported and 0 returned.
mrs_real toReal ()
 get value as real. If not a real value then a warning is reported and 0.0 returned.
std::string toString ()
 get value as string. If not a string value then a warning is reported and "" returned.

Friends

std::ostream & operator<< (std::ostream &, const TmControlValue &)
 send this object out the outstream.

Detailed Description

TmControlValue is a simple parameter passing mechanism for updtimer.

Author:
Neil Burroughs inb@cs.uvic.ca

Definition at line 52 of file TmControlValue.h.


Constructor & Destructor Documentation

null value type (tmcv_null)

Definition at line 25 of file TmControlValue.cpp.

copy constructor

Parameters:
vTmControlValue to copy

Definition at line 30 of file TmControlValue.cpp.

TmControlValue ( float  re)

real value type (tmcv_real)

Parameters:
refloat value to assign as real

Definition at line 46 of file TmControlValue.cpp.

TmControlValue ( double  re)

real value type (tmcv_real)

Parameters:
redouble value to assign as real

Definition at line 40 of file TmControlValue.cpp.

TmControlValue ( int  ne)

natural value type (tmcv_natural)

Parameters:
neint value to assign as natural

Definition at line 52 of file TmControlValue.cpp.

TmControlValue ( long int  ne)

natural value type (tmcv_natural)

Parameters:
nelong int value to assign as natural

Definition at line 58 of file TmControlValue.cpp.

TmControlValue ( std::string  st)

string value type (tmcv_string)

Parameters:
ststring value to assign

Definition at line 64 of file TmControlValue.cpp.

TmControlValue ( const char *  cc)

string value type (tmcv_string)

Parameters:
ccconst char* value to assign as string

Definition at line 70 of file TmControlValue.cpp.

TmControlValue ( bool  be)

bool value type (tmcv_bool)

Parameters:
bebool value to assign

Definition at line 76 of file TmControlValue.cpp.

MarSystem value type (tmcv_marsystem)

Parameters:
mMarSystem pointer value to assign

Definition at line 82 of file TmControlValue.cpp.


Member Function Documentation

mrs_string getSType ( )

get the name of this value type.

Returns:
the name of the type

Definition at line 150 of file TmControlValue.cpp.

int getType ( void  )

get the type enumeration for this value type. The value is one of the tmcv values defined in TmControlValue.h

Returns:
the timer control value type enumeration.

Definition at line 144 of file TmControlValue.cpp.

bool toBool ( )

get value as bool. If not a bool value then a warning is reported and false returned.

Returns:
the bool value or false if this is not a bool.

Definition at line 100 of file TmControlValue.cpp.

MarSystem * toMarSystem ( )

get value as MarSystem. If not a MarSystem value then a warning is reported and NULL returned.

Returns:
the MarSystem value or NULL if this is not a MarSystem.

Definition at line 133 of file TmControlValue.cpp.

mrs_natural toNatural ( )

get value as natural. If not a natural value then a warning is reported and 0 returned.

Returns:
the natural value or 0 if this is not a natural.

Definition at line 111 of file TmControlValue.cpp.

mrs_real toReal ( )

get value as real. If not a real value then a warning is reported and 0.0 returned.

Returns:
the real value or 0.0 if this is not a real.

Definition at line 89 of file TmControlValue.cpp.

std::string toString ( )

get value as string. If not a string value then a warning is reported and "" returned.

Returns:
the string value or "" if this is not a string.

Definition at line 122 of file TmControlValue.cpp.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const TmControlValue m 
) [friend]

send this object out the outstream.

Definition at line 165 of file TmControlValue.cpp.


The documentation for this class was generated from the following files: