#include <value.h>
Definition at line 31 of file value.h.
typedef aegis_shared_ptr<rpt_value> rpt_value::pointer |
virtual rpt_value::~rpt_value | ( | ) | [virtual] |
The destructor.
rpt_value::rpt_value | ( | ) | [protected] |
The default constructor.
rpt_value::rpt_value | ( | const rpt_value & | ) | [private] |
The copy constructor. Do not use.
static rpt_value::pointer rpt_value::integerize | ( | const rpt_value::pointer & | vp | ) | [static] |
The integerize class method is used to convert a value to integer, if possible. If not possible, the value will be returned unchanged.
vp | The value to convert to an integer. |
static rpt_value::pointer rpt_value::realize | ( | const rpt_value::pointer & | vp | ) | [static] |
The realize class method is used to convert a value to real, if possible. If not possible, the value will be returned unchanged.
vp | The value to convert to an real. |
static rpt_value::pointer rpt_value::arithmetic | ( | const rpt_value::pointer & | vp | ) | [static] |
The arithmetic class method is used to convert a value to an arithmetic type, if possible. If not possible, the value will be returned unchanged.
vp | The value to convert to an arithmetic type. |
static rpt_value::pointer rpt_value::undefer | ( | const rpt_value::pointer & | vp | ) | [static] |
The undefer class method is used to evaluate a deferred value, if necessary. If not necessary, the value will be returned unchanged.
vp | The deferred value to evaluate. |
static rpt_value::pointer rpt_value::stringize | ( | const rpt_value::pointer & | vp | ) | [static] |
The stringize class method is used to convert a value to a string, if possible. If not possible, the value will be returned unchanged.
vp | The value to convert to a string. |
static rpt_value::pointer rpt_value::booleanize | ( | const rpt_value::pointer & | vp | ) | [static] |
The booleanize class method is used to convert a value to a boolean, if possible. If not possible, the value will be returned unchanged.
vp | The value to convert to a boolean. |
virtual const char* rpt_value::name | ( | ) | const [pure virtual] |
The name method is used to obtain the name of the type of the value.
Implemented in rpt_value_boolean, rpt_value_cstate, rpt_value_enumeration, rpt_value_error, rpt_value_fstate, rpt_value_func, rpt_value_group, rpt_value_gstate, rpt_value_integer, rpt_value_list, rpt_value_null, rpt_value_passwd, rpt_value_pconf, rpt_value_pstate, rpt_value_real, rpt_value_reference, rpt_value_string, rpt_value_struct, rpt_value_time, rpt_value_uconf, and rpt_value_void.
virtual bool rpt_value::is_an_error | ( | ) | const [virtual] |
The is_an_error method may be used to determine whether or not an object instance is an error instance. This happens often enoygh that the code is clear this way than using a dynamic_cast<rpt_value_error *>
Reimplemented in rpt_value_error.
virtual bool rpt_value::is_a_struct | ( | ) | const [virtual] |
The is_a_struct method may be used to determine whether or not the value is a struct (or associative array). Superficially, this should be simple, but it is complicated by things like deferred project and change states.
Reimplemented in rpt_value_cstate, rpt_value_fstate, rpt_value_group, rpt_value_gstate, rpt_value_passwd, rpt_value_pconf, rpt_value_pstate, rpt_value_struct, and rpt_value_uconf.
virtual rpt_value::pointer rpt_value::lookup | ( | const rpt_value::pointer & | rhs, | |
bool | lvalue | |||
) | const [virtual] |
The lookup method is used to index an associate array, or locate a member within a struct.
rhs | The member name, or array index | |
lvalue | The result is to be used of an l-value |
Reimplemented in rpt_value_cstate, rpt_value_fstate, rpt_value_group, rpt_value_gstate, rpt_value_null, rpt_value_passwd, rpt_value_pconf, rpt_value_pstate, rpt_value_reference, rpt_value_struct, and rpt_value_uconf.
virtual rpt_value::pointer rpt_value::keys | ( | ) | const [virtual] |
The keys method is used to obtain a list of keys of an associative array.
Reimplemented in rpt_value_cstate, rpt_value_fstate, rpt_value_group, rpt_value_gstate, rpt_value_list, rpt_value_null, rpt_value_passwd, rpt_value_pconf, rpt_value_pstate, rpt_value_reference, rpt_value_struct, and rpt_value_uconf.
virtual rpt_value::pointer rpt_value::count | ( | ) | const [virtual] |
The count method is used to count the number of elements of an associative array.
Reimplemented in rpt_value_cstate, rpt_value_fstate, rpt_value_group, rpt_value_gstate, rpt_value_list, rpt_value_null, rpt_value_passwd, rpt_value_pconf, rpt_value_pstate, rpt_value_reference, rpt_value_struct, and rpt_value_uconf.
virtual const char* rpt_value::type_of | ( | ) | const [virtual] |
The type_of method is used to obtain the name of the type of the value. It differs from the name method in that it resolves references and deferred values.
Reimplemented in rpt_value_cstate, rpt_value_fstate, rpt_value_group, rpt_value_gstate, rpt_value_passwd, rpt_value_pconf, rpt_value_pstate, rpt_value_reference, and rpt_value_uconf.
virtual rpt_value::pointer rpt_value::integerize_or_null | ( | ) | const [protected, virtual] |
The integerize_or_null method is used to convert a value to an integer, if possible, or return NULL if it is not possible. This NULL is used by the integerize class method to return the unchanged value if no conversion is possible.
Reimplemented in rpt_value_boolean, rpt_value_enumeration, rpt_value_null, rpt_value_real, rpt_value_reference, rpt_value_string, and rpt_value_time.
virtual rpt_value::pointer rpt_value::realize_or_null | ( | ) | const [protected, virtual] |
The realize_or_null method is used to convert a value to an real, if possible, or return NULL if it is not possible. This NULL is used by the realize class method to return the unchanged value if no conversion is possible.
Reimplemented in rpt_value_boolean, rpt_value_enumeration, rpt_value_integer, rpt_value_null, rpt_value_reference, rpt_value_string, and rpt_value_time.
virtual rpt_value::pointer rpt_value::arithmetic_or_null | ( | ) | const [protected, virtual] |
The arithmetic_or_null method is used to convert a value to an arithmetic type (real or integer), if possible, or return NULL if it is not possible. This NULL is used by the integerize class method to return the unchanged value if no conversion is possible.
Reimplemented in rpt_value_boolean, rpt_value_enumeration, rpt_value_null, rpt_value_reference, rpt_value_string, and rpt_value_time.
virtual rpt_value::pointer rpt_value::undefer_or_null | ( | ) | const [protected, virtual] |
The undefer_or_null method is used to evaluate a deferred value, if necessary, or return NULL if it is not possible or not necessary. This NULL is used by the undefer class method to return the unchanged value if no conversion is possible.
Reimplemented in rpt_value_fstate, rpt_value_pconf, and rpt_value_pstate.
virtual rpt_value::pointer rpt_value::stringize_or_null | ( | ) | const [protected, virtual] |
The stringize_or_null method is used to convert a value to a string, if possible, or return NULL if it is not possible. This NULL is used by the stringize class method to return the unchanged value if no conversion is possible.
Reimplemented in rpt_value_boolean, rpt_value_enumeration, rpt_value_func, rpt_value_integer, rpt_value_null, rpt_value_real, rpt_value_reference, and rpt_value_time.
virtual rpt_value::pointer rpt_value::booleanize_or_null | ( | ) | const [protected, virtual] |
The booleanize_or_null method is used to convert a value to a boolean, if possible, or return NULL if it is not possible. This NULL is used by the booleanize class method to return the unchanged value if no conversion is possible.
Reimplemented in rpt_value_enumeration, rpt_value_integer, rpt_value_null, rpt_value_real, rpt_value_reference, rpt_value_string, and rpt_value_time.
The assignment operator. Do not use.