#include <skRValue.h>
Public Types | |
enum | RType { T_Object, T_String, T_Int, T_Float, T_Char, T_Bool } |
An RValue has a value of one of these types: Executable object, String, integer, float or character. | |
Public Methods | |
skRValue () | |
Default Constructor - creates a blank string object. | |
skRValue (const skRValue&) | |
Copy Constructor - copies type and value from the other object. | |
skRValue (skiExecutable * obj,bool created=false) | |
Constructor with an executable object. More... | |
skRValue (skString s) | |
Constructor with a string. | |
skRValue (Char c) | |
Constructor with a character. | |
skRValue (int n) | |
Constructor with an integer. | |
skRValue (unsigned int n) | |
Constructor with an unsigned integer. | |
skRValue (float f) | |
Constructor with a float. | |
skRValue (bool b) | |
Constructor with a boolean value. | |
~skRValue () | |
Destructor - will delete an associated object if the created flag is set in constructor. | |
skRValue& | operator= (const skRValue& v) |
Assigment operator - clears this value, and then assigns type and value. | |
bool | operator== (const skRValue&) |
returns true if the other value is equal to this one. More... | |
Char | charValue () const |
returns a character representation of the value, converting if necessary. | |
bool | boolValue () const |
returns a boolean representation of the value, converting if necessary. | |
int | intValue () const |
returns an integer representation of the value, converting if necessary. | |
float | floatValue () const |
returns a float representation of the value, converting if necessary. | |
skString | str () const |
returns a string representation of the value, converting if necessary. | |
skiExecutable* | obj () const |
returns the object associated with this RValue, or 0 if there is none. | |
RType | type () const |
returns the type of the value held in this RValue - one of the enumerated RType. |
It can hold reference counts for objects and delete them when these reach zero.
|
Constructor with an executable object.
|
|
returns true if the other value is equal to this one. Comparison depends on the types held in each value. |