The Value class is a generic base class that implements methods common to several subclasses.
The classes List, Array, String, Struct and Record inherit from Value and implement (and in some cases override) methods particular to these specialized subclasses.
The main Value methods are listed below.
in compare( Value * x ) | Compare the current Value (this) with the argument x and return an integer value indicating the result of the comparison: a negative integer value if this is less than x , zero if they are equal, and a positive integer value if this is greater than x |
static Value * deserialize ( char * buf , size_t & size ) | Deserialize a Value from the specified buffer |
bool equals( Value * x ) | Compare the current Value (this) with the argument x and return a Boolean value indicating the result of the comparison: true if the two values are equal, false otherwise |
static size_t fillBuf ( char * dst, char const * src, size_t size ) | Copy the string representation of a Value into the specified buffer. Up to size bytes will be copied |
int64_t intValue ( void ) | Get the integer Value by attempting to cast the value to integer type. |
bool isNull( void ) | Check if the current Value is null: returns true if the value is null, false otherwise |
bool isTrue( void ) | Check if the current Boolean Value is true |
void * pointer( void ) | Get a raw pointer to the value data. For example, for an integer Value this returns the address of a 64 bit integer; for a String Value it points to a null-terminated string |
double realValue( void ) | Get the real Value by attempting to cast the Value to floating point type |
size_t serialize( char * buf , size_t & size ) | Serialize the current Value to the specified buffer |
String * stringValue( void ) | Get the String representation of the Value; any scalar type can be converted to a string |
time_t timeValue( void ) | Get the timestamp value by attempting to cast the Value to DateTime type
|
UnicodeString * unicodeStringValue( void ) | Get the UnicodeString representation of the Value; any scalar type can be converted to a UnicodeString |