[ Lit Window Library at SourceForge ] [ Lit Window Productions Homepage ] [ wxWidgets Tips&Tricks ] [ wxVisualSetup ]
Inheritance diagram for typed_const_accessor:


Public Member Functions | |
| void | assert_valid () const |
| assert the validness of the accessor, throw an exception if it is invalid. | |
| const Value | get () const |
| return the value of the object pointed to by this accessor. | |
| void | get (Value &v) const |
| Return the value of the object pointed to by this accessor. | |
| const_accessor | get_const_accessor () const |
| return an untyped const_accessor from this typed_const_accessor | |
| const Value * | get_ptr () const |
| get a typed pointer to the original object. | |
| const Value & | get_ref () const |
| get a typed reference to the original object. | |
| bool | is_valid () const |
| test validity of the accessor. | |
| typed_const_accessor () | |
| typed_const_accessor (const const_accessor &p) | |
Protected Attributes | |
| converter_value_base< Value > * | type_ptr |
|
|
|
|
|
|
|
|
Reimplemented from const_accessor. |
|
|
Same as get(Value &v) except that it returns the value. |
|
|
This function accesses the object directly rather than using string representations. typed_const_accessor<float> p=dynamic_cast_accessor<float>(someAccessor);
if (p.is_valid()) {
float aFloat;
p.get(aFloat);
} else {
printf("error: someAccessor is not of type float.");
}
someAccessor to aFloat
|
|
|
|
|
|
get_ptr returns a pointer to the object pointed to by this accessor.
Reimplemented in typed_accessor. |
|
|
get_ref returns a reference to the object pointed to by this accessor.
Reimplemented in typed_accessor. |
|
|
Reimplemented from const_accessor. |
|
|
|
Copyright 2004, Hajo Kirchhoff, Lit Window Productions