-
class
AttributeValue
(Return to index)
-
multi-type attribute value object.
Type:
Derived Classes
Include file:
Public:
-
AttributeValue ()
default constructor (UnknownType constructor).
-
AttributeValue (AttributeValue&)
-
AttributeValue (AttributeValue*)
-
AttributeValue (AttributeValueList* listptr)
ArrayType/ListType constructor.
-
AttributeValue (ComponentView* view, int compid)
-
AttributeValue (ValueType type)
construct with specified type and unitialized value.
-
AttributeValue (ValueType type, attr_value value)
construct with specified type and value struct.
-
AttributeValue (char val)
-
AttributeValue (const char* val)
-
AttributeValue (double)
-
AttributeValue (float val)
-
AttributeValue (int val, ValueType type)
IntType constructor or any other int-like value.
-
AttributeValue (int class_symid, void* objptr)
-
AttributeValue (long val)
-
AttributeValue (short val)
-
AttributeValue (unsigned long val)
UCharType constructor.
UShortType constructor.
ULongType constructor.
-
AttributeValue (unsigned long val)
UCharType constructor.
UShortType constructor.
ULongType constructor.
-
AttributeValue (unsigned long val)
UCharType constructor.
UShortType constructor.
ULongType constructor.
-
AttributeValue (unsigned int val, ValueType type)
UIntType constructor or any other unsigned-int-like value including SymbolType.
-
AttributeValue (unsigned int keysym, unsigned int narg, ValueType=KeywordType)
KeywordType constructor (or can be used for ObjectType).
-
AttributeValue (void* comfunc, AttributeValueList* vallist)
- static LeakChecker*
_leakchecker
- int
array_len ()
length of list of values when ArrayType/ListType.
- AttributeValueList*&
array_ref ()
values in list by reference.
- unsigned int&
array_type_ref ()
type of values in list by reference
- unsigned int
array_type_val ()
type of values in list by value
- AttributeValueList*
array_val ()
- void
assignval (const AttributeValue&)
- boolean&
boolean_ref ()
- boolean
boolean_val ()
- char&
char_ref ()
- char
char_val ()
- unsigned int&
class_symid ()
classid of object by value.
- void
clear ()
clear bytes of multi-value union
- boolean
command_alias ()
returns true if command is an alias, not the first name.
- int
command_symid ()
symbol id of associated command name, for use with ComTerp.
- void
command_symid (int, boolean alias=false)
set symbol id of associated command name, for use with ComTerp.
- double&
double_ref ()
- double
double_val ()
- void
dup_as_needed ()
duplicate lists then increment ref counters as needed
-
enum ValueState
{ UnknownState, OctState, HexState }
-
enum ValueType
{ UnknownType, CharType, UCharType, ShortType, UShortType, IntType, UIntType, LongType, ULongType, FloatType, DoubleType, StringType, SymbolType, ArrayType, StreamType, CommandType, KeywordType, ObjectType, EofType, BooleanType, OperatorType, BlankType, ListType = ArrayType }
enum for attribute value types.
- float&
float_ref ()
- float
float_val ()
- void*
geta (int type)
return a pointer if ObjectType matches or is a parent class
- boolean
global_flag ()
return true if a symbol and the global flag is set.
- void
global_flag (boolean flag)
set global flag of a symbol
- int&
int_ref ()
- int
int_val ()
- boolean
is_attribute ()
returns true if ObjectType with an Attribute object.
- boolean
is_attributelist ()
- boolean
is_blank ()
returns true if BlankType.
- static boolean
is_blank (ValueType t)
- boolean
is_char ()
returns true if CharType || UCharType.
- static boolean
is_char (ValueType t)
- boolean
is_command ()
returns true if CommandType (for use of ComTerp).
- boolean
is_double ()
returns true if DoubleType.
- static boolean
is_double (ValueType t)
- boolean
is_false ()
returns true if !is_true()
- boolean
is_float ()
returns true if FloatType.
- static boolean
is_float (ValueType t)
- boolean
is_floatingpoint ()
returns true if is_float() || is_double().
- static boolean
is_floatingpoint (ValueType t)
- boolean
is_int ()
returns true if IntType || UIntType.
- static boolean
is_int (ValueType t)
- boolean
is_integer ()
returns true if is_char() || is_short() || is_int() || is_long().
- static boolean
is_integer (ValueType t)
- boolean
is_key ()
returns true if KeywordType.
- boolean
is_known ()
returns true if !UnknownType.
- boolean
is_list ()
returns true if ArrayType/ListType.
- boolean
is_long ()
returns true if LongType || ULongType.
- static boolean
is_long (ValueType t)
- boolean
is_nil ()
returns true if UnknownType.
- boolean
is_null ()
returns true if UnknownType.
- boolean
is_num ()
returns true if is_integer() || is_floatingpoint().
- static boolean
is_num (ValueType t)
- boolean
is_numeric ()
- boolean
is_object ()
returns true if ObjectType.
- boolean
is_object (int class_symid)
returns true if ObjectType and class_symid matches or belongs to a parent class.
- boolean
is_short ()
returns true if ShortType || UShortType.
- static boolean
is_short (ValueType t)
- boolean
is_stream ()
returns true if StreamType.
- boolean
is_string ()
returns true if StringType || SymbolType.
- boolean
is_symbol ()
returns true if SymbolType.
- boolean
is_true ()
returns true if !UnknownType && boolean_val()
- boolean
is_type (ValueType t)
returns true if type() == 't'.
- boolean
is_unknown ()
returns true if UnknownType.
- unsigned int&
keyid_ref ()
symbol id of keyword by reference.
- unsigned int
keyid_val ()
symbol id of keyword by value.
- unsigned int&
keynarg_ref ()
number of arguments after keyword by reference.
- unsigned int
keynarg_val ()
number of arguments after keyword by value.
- int
list_len ()
length of list of values when ArrayType/ListType.
- AttributeValueList*&
list_ref ()
values in list by reference.
- unsigned int&
list_type_ref ()
type of values in list by reference
- unsigned int
list_type_val ()
type of values in list by value
- AttributeValueList*
list_val ()
- long&
long_ref ()
- long
long_val ()
- void
negate ()
- void*&
obj_ref ()
void* pointer to object by reference.
- unsigned int&
obj_type_ref ()
classid of object by reference.
- unsigned int
obj_type_val ()
classid of object by value.
- void*
obj_val ()
void* pointer to object by value.
- boolean
object_compview ()
true if object is wrapped with a ComponentView
true if object is wrapped with a ComponentView
0 = disabled, negative = internal, positive = external
- AttributeValue&
operator= (const AttributeValue&)
copy assignment operator.
- void
ref_as_needed ()
increment ref counters as needed
- boolean
same_list (const AttributeValue& av)
check if arrayval or streamval are the same
- short&
short_ref ()
- short
short_val ()
- int
state ()
get generic state value useful for any type other than CommandType, ObjectType, or StreamType
- void
state (int val)
set generic state value useful for any type other than CommandType, ObjectType, or StreamType
- void*
stream_func ()
return function pointer associated with stream object
- void
stream_func (void* func)
set function pointer associated with stream object
- AttributeValueList*
stream_list ()
- void
stream_list (AttributeValueList* list)
- void
stream_mode (int mode)
0 = disabled, negative = internal, positive = external
- const char*
string_ptr ()
lookup and return pointer to string associated with string.
- unsigned int&
string_ref ()
string symbol id by reference.
- unsigned int
string_val ()
string symbol id by value.
- const char*
symbol_ptr ()
- unsigned int&
symbol_ref ()
- unsigned int
symbol_val ()
- ValueType
type () const
- void
type (ValueType)
- int
type_size ()
return sizeof of value of this type.
- static int
type_size (ValueType)
return sizeof of value of given type.
- int
type_symid () const
return symbol id corresponding to type
- unsigned char&
uchar_ref ()
unsigned char by reference.
- unsigned char
uchar_val ()
- unsigned int&
uint_ref ()
unsigned int by reference.
- unsigned int
uint_val ()
- unsigned long&
ulong_ref ()
unsigned long by reference.
- unsigned long
ulong_val ()
- void
unref_as_needed ()
decrement ref counters as needed
- unsigned short&
ushort_ref ()
unsigned short by reference.
- unsigned short
ushort_val ()
- void*
value_ptr ()
returns void* pointer to value struct.
- virtual
~AttributeValue ()
set to UnknownType and unref pointer if ArrayType/ListType or StreamType.
Protected:
Friend methods:
(more documentation)