DtValue is a template class that provide value access. More...
Inheritance diagram for MAKLogger::DtValue< T >:
Collaboration diagram for MAKLogger::DtValue< T >:Public Member Functions | |
| DtValue (const T &value) | |
| Constructor pass in value. | |
| virtual | ~DtValue () |
| Destructor, no opp. | |
| virtual DtAnyValue * | clone () const |
| Create a new copy of the DtValue;. | |
| operator T () | |
| Easy conversion operator. | |
| operator const T () const | |
| Constant conversion operator. | |
| virtual int | typeId () const |
| Get the type id. | |
| virtual const DtString & | type () const |
| Get the type string. | |
| virtual DtString | serialize () const |
| Serialize the value into a string. | |
| template<> | |
| DT_DLL_LGRCORE int | theTypeId () |
Static Public Member Functions | |
| static DtValue< T > * | cast (DtAnyValue *base) |
| Cast to point of this type. If not valid type, returns 0. | |
| static const DtValue< T > * | cast (const DtAnyValue *base) |
| Cast to const point of this type. If not valid type, returns 0. | |
| static bool | isType (const DtAnyValue *base) |
| Static boolean check if base value pointer is specific type. | |
| static DtValue< T > * | deserialize (const DtString &value) |
| Deserialize value into a T type. | |
| static int | theTypeId () |
| Static function which defines the type. | |
| static const DtString & | theType () |
| Static string which defines the type. | |
Public Attributes | |
| T | myValue |
| Storage of value;. | |
Static Public Attributes | |
| static DT_DLL_LGRUTIL DtString(* | theSerializeFunction )(const T &) |
| Pointer to serializeFunction. | |
| static DT_DLL_LGRUTIL T(* | theDeserializeFunction )(const DtString &) |
| Pointer to deserializeFunction. | |
DtValue is a template class that provide value access.
DtValue allows generic storage of values via the DtAnyValue and provides an interface for comparing abstract values to determine if they are a concrete type and converting to that type. Much of the functionality is equivalent to RTTI however doesn't require RTTI to be enabled by the compiler.
| DtValue< T > * MAKLogger::DtValue< T >::deserialize | ( | const DtString & | value | ) | [static] |
Deserialize value into a T type.
| std::invalid_argument | if the string can't be parsed. |