#include <GenericValues.h>
Public Methods | |
GenericValueT (const char *strName, void *vAddress, GenericValueKind type) | |
~GenericValueT () | |
const char * | getName () |
bool | setValue (const char *strValue) |
char * | getValue (char *strValue) |
void | show (ostream &out, const char *strSeparator) |
Private Attributes | |
const char * | m_strName |
void * | m_vAddress |
GenericValueKind | m_type |
Definition at line 79 of file GenericValues.h.
|
Constructor for the GenericValueT class. It creates a GenericValueT object by setting all the private member variables to the values passed to the constructor.
Definition at line 76 of file GenericValues.cpp. References GenericValueKind, m_strName, m_type, and m_vAddress. |
|
Destructor for the GenericValueT class. It destroys a GenericValueT object by freeing all memory allocated to it. Definition at line 85 of file GenericValues.cpp. References m_strName. |
|
Get method for the 'm_strName' member variable.
Definition at line 94 of file GenericValues.cpp. |
|
This method determines the value of the variable associated with this GenericValueT object. The result is converted to a string which is put into the argument to the method (note that enough memory must be allocated for this char*). This same string is also returned by the method. This enables you to use the method as an argument to a function such as 'strcpy'.
Definition at line 164 of file GenericValues.cpp. References GENERIC_VALUE_BOOLEAN, GENERIC_VALUE_DOUBLE, GENERIC_VALUE_INTEGER, GENERIC_VALUE_STRING, and m_vAddress. Referenced by GenericValues::getValue(). |
|
This method sets the variable associated with this GenericValueT object to the value indicated by the given string argument. The value is always supplied as a string which is then converted into the right type for this GenericValueT object.
Definition at line 108 of file GenericValues.cpp. References GENERIC_VALUE_BOOLEAN, GENERIC_VALUE_DOUBLE, GENERIC_VALUE_INTEGER, GENERIC_VALUE_STRING, and m_vAddress. Referenced by GenericValues::setValue(). |
|
This display method writes the name associated with the variable in this GenericValueT object together with its value to the output stream indicated by the first argument to the method. Name and value are separated by the separator given as the second argument. Note that boolean values are written as 'true' and 'false'.
Definition at line 202 of file GenericValues.cpp. References GENERIC_VALUE_BOOLEAN, GENERIC_VALUE_DOUBLE, GENERIC_VALUE_INTEGER, GENERIC_VALUE_STRING, m_strName, and m_vAddress. Referenced by GenericValues::show(). |
|
the name associated with the variable to which the class pointer points Definition at line 84 of file GenericValues.h. Referenced by GenericValueT(), show(), and ~GenericValueT(). |
|
the (generic) type of the variable to which the class pointer points Definition at line 87 of file GenericValues.h. Referenced by GenericValueT(). |
|
a pointer to a variable of a generic type Definition at line 86 of file GenericValues.h. Referenced by GenericValueT(), getValue(), setValue(), and show(). |