MAK Data Logger API Documentation for HLA
List of all members | 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 >:

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 DtStringtype () const
 Get the type string.
virtual DtString serialize () const
 Serialize the value into a string.
template<>
DT_DLL_LGR_CMDS int theTypeId ()
- Public Member Functions inherited from MAKLogger::DtAnyValue
 DtAnyValue ()
 Inline function provided to work around solaris compiler issue.
virtual ~DtAnyValue ()
 Inline function provided to work around solaris compiler issue.
virtual bool sameType (const DtAnyValue *const base) const
 Inline function provided to work around solaris compiler issue.

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 DtStringtheType ()
 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.

Constructor & Destructor Documentation

template<typename T>
MAKLogger::DtValue< T >::DtValue ( const T &  value)

Constructor pass in value.

template<typename T >
MAKLogger::DtValue< T >::~DtValue ( )
virtual

Destructor, no opp.

Member Function Documentation

template<typename T >
DtValue< T > * MAKLogger::DtValue< T >::cast ( DtAnyValue base)
static

Cast to point of this type. If not valid type, returns 0.

template<typename T >
const DtValue< T > * MAKLogger::DtValue< T >::cast ( const DtAnyValue base)
static

Cast to const point of this type. If not valid type, returns 0.

template<typename T >
DtAnyValue * MAKLogger::DtValue< T >::clone ( ) const
virtual

Create a new copy of the DtValue;.

Implements MAKLogger::DtAnyValue.

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.
template<typename T >
bool MAKLogger::DtValue< T >::isType ( const DtAnyValue base)
static

Static boolean check if base value pointer is specific type.

template<typename T >
MAKLogger::DtValue< T >::operator const T ( ) const

Constant conversion operator.

template<typename T >
MAKLogger::DtValue< T >::operator T ( )

Easy conversion operator.

template<typename T >
DtString MAKLogger::DtValue< T >::serialize ( ) const
virtual

Serialize the value into a string.

Implements MAKLogger::DtAnyValue.

template<typename T>
static const DtString& MAKLogger::DtValue< T >::theType ( )
static

Static string which defines the type.

template<>
DT_DLL_LGR_CMDS int MAKLogger::DtValue< DtLgrCommandType >::theTypeId ( )
template<typename T>
static int MAKLogger::DtValue< T >::theTypeId ( )
static

Static function which defines the type.

template<typename T >
const DtString & MAKLogger::DtValue< T >::type ( ) const
virtual

Get the type string.

Implements MAKLogger::DtAnyValue.

template<typename T >
int MAKLogger::DtValue< T >::typeId ( ) const
virtual

Get the type id.

Implements MAKLogger::DtAnyValue.

Member Data Documentation

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

Storage of value;.

template<typename T>
DT_DLL_LGRUTIL T(* MAKLogger::DtValue< T >::theDeserializeFunction)(const DtString &)
static

Pointer to deserializeFunction.

template<typename T>
DT_DLL_LGRUTIL DtString(* MAKLogger::DtValue< T >::theSerializeFunction)(const T &)
static

Pointer to serializeFunction.


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

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)