MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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. More...
 
virtual ~DtValue ()
 Destructor, no opp. More...
 
virtual DtAnyValueclone () const
 Create a new copy of the DtValue;. More...
 
 operator T ()
 Easy conversion operator. More...
 
 operator const T () const
 Constant conversion operator. More...
 
virtual int typeId () const
 Get the type id. More...
 
virtual const DtString & type () const
 Get the type string. More...
 
virtual DtString serialize () const
 Serialize the value into a string. More...
 
template<>
DT_DLL_LGR_CMDS int theTypeId ()
 
- Public Member Functions inherited from MAKLogger::DtAnyValue
 DtAnyValue ()
 Inline function provided to work around solaris compiler issue. More...
 
virtual ~DtAnyValue ()
 Inline function provided to work around solaris compiler issue. More...
 
virtual bool sameType (const DtAnyValue *const base) const
 Inline function provided to work around solaris compiler issue. More...
 

Static Public Member Functions

static DtValue< T > * cast (DtAnyValue *base)
 Cast to point of this type. If not valid type, returns 0. More...
 
static const DtValue< T > * cast (const DtAnyValue *base)
 Cast to const point of this type. If not valid type, returns 0. More...
 
static bool isType (const DtAnyValue *base)
 Static boolean check if base value pointer is specific type. More...
 
static DtValue< T > * deserialize (const DtString &value)
 Deserialize value into a T type. More...
 
static int theTypeId ()
 Static function which defines the type. More...
 
static const DtString & theType ()
 Static string which defines the type. More...
 

Public Attributes

myValue
 Storage of value;. More...
 

Static Public Attributes

static DT_DLL_LGRUTIL DtString(* theSerializeFunction )(const T &)
 Pointer to serializeFunction. More...
 
static DT_DLL_LGRUTIL T(* theDeserializeFunction )(const DtString &)
 Pointer to deserializeFunction. More...
 

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 files:

Document ID: Generated on Thu Sep 2 15:35:22 EDT 2021 from SVN revision 233992
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)