class HT_Option_Value
See Also HT_Option, HT_Option_Definition, HT_Option_Table, HT_Option_Enum Access Methods
count
Returns the number of elements of a certain type in the option value.
type
Queries the type of an option value object.
Type-Specific Set/Query Methods
as_address, set_as_address
Set or retrieve the value as an address.
as_boolean, set_as_boolean
Set or retrieve the value as a boolean.
as_float, set_as_float
Set or retrieve the value as a float.
as_int, set_as_int
Set or retrieve the value as an integer.
as_long, set_as_long
Set or retrieve the value as a long.
as_palette, set_as_palette
Set or retrieve the value as a palette.
as_string, set_as_string
Set or retrieve the value as a string.
as_aggregate, set_as_aggregate
Set or retrieve the value as an aggregate.
as_double, set_as_double
Set or retrieve the value as a double.  
Constructor
HT_Option_Value
Constructor for object.  

HT_Option_Value::as_(type)

Purpose

To set or query the actual values of this option value object. Synopsis
void                 set_as_address (int index, void const * val)
void const *         as_address (int index)
void                 set_as_boolean (int index, HT_Boolean val)
HT_Boolean           as_boolean (int index)
void                 set_as_float (int index, float val)
float                as_float (int index)
void                 set_as_int (int index, int val)
int                  as_int (int index)
void                 set_as_long (int index, long val)
long                 as_long (int index)
void                 set_as_palette (int index, HT_Palette const & val)
HT_Palette const & as_palette (int index)
void                 set_as_string (int index, HT_String const & val)
HT_String const & as_string (int index)
 
void                 set_as_aggregate (int index, HT_Aggregate_Option 
                         const & val) alter
HT_Aggregate_Option const & as_aggregate(int index) const
HT_Aggregate_Option alter & as_aggregate(int index) alter
Void                 set_as_double (int index, double val)
double               as_double (int index)
Details To set or query an option value you have to know its type and use the appropriate function from this list. In each case, the index refers to the index in the array of values of homogeneous type that make up the option value. That is, 0 £ index < count.
 

HT_Option_Value::count

Purpose

Queries the array size for this option value object. Synopsis
int count ()
Details An option value is an array of elements of homogeneous type. This method returns the array size.
HT_Option_Value::HT_Option_Value

Purpose

Constructor to initialize new HT_Option_Value objects Synopsis
HT_Option_Value () alter
HT_Option_Value (HT_Option_Enum::Type type, int count) alter
HT_Option_Value (HT_Boolean v0) alter
HT_Option_Value (int v0) alter
HT_Option_Value (int v0, int v1) alter
HT_Option_Value (int v0, int v1, int v2) alter;
HT_Option_Value (int v0, int v1, int v2, int v3) alter
HT_Option_Value (int v0, int v1, int v2, int v3, int v4, int v5) alter
HT_Option_Value (long v0) alter
HT_Option_Value (float v0) alter
HT_Option_Value (float v0, float v1) alter
HT_Option_Value (float v0, float v1, float v2) alter
HT_Option_Value (float v0, float v1, float v2, float v3) alter
HT_Option_Value (float v0, float v1, float v2, float v3, float v4, float v5) alter
HT_Option_Value (HT_String const & v0) alter
HT_Option_Value (HT_Palette const & v0) alter
HT_Option_Value (void const * v0) alter
HT_Option_Value (HT_Aggregate_Option const & v0) alter;
HT_Option_Balue (double v0) alter
HT_Option_Balue (double v0,double v1) alter
Details The first form initializes to a null option value (object::type is none, with zero elements).

The second form initializes the type and count fields according to the arguments, and sets the actual value to zero or null, as appropriate for the type.

The rest are convenient functions that set the values according to their implied types.
 
 


HT_Option_Value::type

Purpose

Queries the type of an option value object. Synopsis
HT_Option_Enum::Type type ()
Details An option value is an array of elements of homogeneous type. This method returns the type. The returned type value, of the enumerated type HT_Option_Enum::Type is one of the following values: None, Boolean, Int, Long, Double, Float, String, Palette, Contour_Set, Address, Aggregate.