The acpValue class encapsulates operations for handling values and their storage. The Garcia API supports the following types of values: ints, floats, strings, bools, void pointers, acpCallback pointers, and acpObject pointers. Garcia properties are given values of one of these types.
Whenever a value is set, any old data for that value is overwritten. When a new string is set, the old string (if one exists) is freed from memory and new memory is allocated for the new string.
| Constructors |
| This is the basic default constructor for an acpValue object. |
| acpValue( | const acpValue* pValue); | This constructs a copy of an acpValue from an acpValue pointer. |
| acpValue( | const int nValue); | This constructs an acpValue with an int value. |
| acpValue( | const float fValue); | This constructs an acpValue with a float value. |
| acpValue( | const char* pString); | This constructs an acpValue with a string value. |
| acpValue( | const bool bVal); | This constructs an acpValue with a bool value. |
| acpValue( | const void* vPtr); | This constructs an acpValue with a void pointer value. |
| acpValue( | const acpCallback* pcCallback); | This constructs an acpValue with an acpCallback pointer value. |
| acpValue( | const acpObject* pcObject); | This constructs an acpValue with an acpObject pointer value. |
| Methods |
| void set( | const int nValue); |
|
| void set( | const float fValue); |
|
| void set( | const char* pString); |
|
| void set( | const bool bVal); |
|
| void set( | const void* vp); |
|
| void set( | const acpCallback* pcCallback); |
|
| void set( | const acpObject* pcObject); |
|
| void set( | const acpValue* pValue); |
|
|
|
|
|
|
|
|
|
| Method Details |
| void set( | const int nValue); |
Parameters: | nValue | - | A new int value for the object. |
Description: This method assigns a new integer value to the object. |
| void set( | const float fValue); |
Parameters: | fValue | - | A new float value for the object. |
Description: This method assigns a new float value to the object. |
| void set( | const char* pString); |
Parameters: | pString | - | A new string value for the object. |
Description: This method assigns a new string value to the object. |
| void set( | const bool bVal); |
Parameters: | bVal | - | A new bool value for the object. |
Description: This method assigns a new bool value to the object. |
| void set( | const void* vp); |
Parameters: | vp | - | A new void pointer value for the object. |
Description: This method assigns a new void pointer value to the object. |
| void set( | const acpCallback* pcCallback); |
Parameters: | pcCallback | - | A new acpCallback pointer value for the object. |
Description: This method assigns a new acpCallback pointer value to the object. |
| void set( | const acpObject* pcObject); |
Parameters: | pcObject | - | A new acpObject pointer value for the object. |
Description: This method assigns a new acpObject pointer value to the object. |
| void set( | const acpValue* pValue); |
Parameters: | pValue | - | A pointer to an acpValue object whose value is to be copied. |
Description: This method copies the value and value type from another acpValue object. |
| acpValue::eType getType( | ) const; |
Return Value: The type identifier of the object. Description: This method retreives the type identifier of the object. |
Return Value: The int value of the object. Description: This method retreives the int value of the object. In debug mode, an attempt to retrieve an int when the value is of a different type will cause an assertion. |
| float getFloatVal( | ) const; |
Return Value: The float value of the object. Description: This method retreives the float value of the object. If the value is not a float, the function returns 0.0f. |
| char* getStringVal( | ) const; |
Return Value: The string value of the object. Description: This method retreives the string value of the object. If the value is not a string, the function returns a NULL pointer (empty string). |
Return Value: The bool value of the object. Description: This method retreives the bool value of the object. In debug mode, an attempt to retrieve a bool when the value is of a different type will cause an assertion. |
| void* getVoidPtrVal( | ) const; |
Return Value: The void pointer value of the object. Description: This method retreives the void pointer value of the object. If the type of the value is not a void pointer, the function returns a NULL pointer. |
| acpCallback* getCallbackPtrVal( | ) const; |
Return Value: The acpCallback pointer value of the object. Description: This method retreives the acpCallback pointer value of the object. If the type of the value is not an acpCallback pointer, the function returns a NULL pointer. |
| acpObject* getObjectPtrVal( | ) const; |
Return Value: The acpObject pointer value of the object. Description: This method retreives the acpObject pointer value of the object. If the type of the value is not an acpObject pointer, the function returns a NULL pointer. |
version: 1.0, build n.a.
© Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved.