template<class T>
class SGRawValue< T >
Abstract base class for a raw value.
The property manager is implemented in two layers. The SGPropertyNode is the highest and most abstract layer, representing an LValue/RValue pair: it records the position of the property in the property tree and contains facilities for navigation to other nodes. It is guaranteed to be persistent: the SGPropertyNode will not change during a session, even if the property is bound and unbound multiple times.
When the property value is not managed internally in the SGPropertyNode, the SGPropertyNode will contain a reference to an SGRawValue (this class), which provides an abstract way to get, set, and clone the underlying value. The SGRawValue may change frequently during a session as a value is retyped or bound and unbound to various data source, but the abstract SGPropertyNode layer insulates the application from those changes.
The SGPropertyNode class always keeps a copy of a raw value, not the original one passed to it; if you override a derived class but do not replace the clone()
method, strange things will happen.
All derived SGRawValue classes must implement getValue(), setValue(), and clone()
for the appropriate type.
- See also
- SGPropertyNode
-
SGRawValuePointer
-
SGRawValueFunctions
-
SGRawValueFunctionsIndexed
-
SGRawValueMethods
-
SGRawValueMethodsIndexed
-
SGRawValueContainer
Definition at line 319 of file props.hxx.
template<class T >
static T DefaultValue |
( |
| ) |
|
|
inlinestatic |
The default underlying value for this type.
Every raw value has a default; the default is false for a boolean, 0 for the various numeric values, and "" for a string. If additional types of raw values are added in the future, they may need different kinds of default values (such as epoch for a date type). The default value is used when creating new values.
Definition at line 332 of file props.hxx.
333 {
334 return T();
335 }