Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
MAKLogger::DtValue< T > Class Template Reference

DtValue is a template class that provide value access. More...

+ Inheritance diagram for MAKLogger::DtValue< T >:
+ Collaboration diagram for MAKLogger::DtValue< T >:

List of all members.

Public Member Functions

 DtValue (const T &value)
 Constructor pass in value.
virtual ~DtValue ()
 Destructor, no opp.
virtual DtAnyValueclone () 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

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.

Detailed Description

template<typename T>
class MAKLogger::DtValue< T >

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.


Member Function Documentation

template<typename T >
DtValue< T > * MAKLogger::DtValue< T >::deserialize ( const DtString &  value) [static]

Deserialize value into a T type.

Exceptions:
std::invalid_argumentif the string can't be parsed.

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)