MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
MAKLogger::DtBaseHlaClass< ValueType > Class Template Reference

A generic Hla class (used by both Objects and Interactions). More...

+ Inheritance diagram for MAKLogger::DtBaseHlaClass< ValueType >:
+ Collaboration diagram for MAKLogger::DtBaseHlaClass< ValueType >:

Public Types

typedef std::vector< ValueType > ValueVector
 
typedef ValueVector::iterator iterator
 
typedef ValueVector::const_iterator const_iterator
 

Public Member Functions

 DtBaseHlaClass (const DtString &name, DtBaseHlaClass< ValueType > *baseClass, DtLgrHlaHandle handle)
 Constructor with valid pointer to base class object. More...
 
 DtBaseHlaClass (const DtString &name, const DtString &baseClassName, DtLgrHlaHandle handle)
 Constructor with only the base class name. More...
 
 DtBaseHlaClass (const DtBaseHlaClass< ValueType > &src)
 Copy constructor. More...
 
DtBaseHlaClass< ValueType > & operator= (const DtBaseHlaClass< ValueType > &src)
 Assignment operator. More...
 
virtual ~DtBaseHlaClass ()
 DTOR. More...
 
const DtStringbaseName () const
 Get the base class name, it can be empty. More...
 
DtString simpleName () const
 Get the simple class name, which does not include the base name. More...
 
const char * baseName2print () const
 Get a raw pointer to the base name for printing. More...
 
void setBaseNameOnly (const DtString &name0)
 Set the base class name. More...
 
void setBaseClass (DtBaseHlaClass< ValueType > *baseClass)
 Set the base class pointer. More...
 
bool isOfClass (DtLgrHlaHandle handle) const
 Checks whether this class is or inherits from a class with the handle. More...
 
bool isOfClass (const DtString &name) const
 Checks whether this class is or inherits from a class with the name. More...
 
bool isOfClass (const DtBaseHlaClass &baseClass) const
 Checks whether this class is or inherits from the class (via ptr) More...
 
void addValue (const ValueType &value)
 Add a value to the class. More...
 
void clearValues ()
 Clears all values added. More...
 
int valueCount (bool thisClassOnly) const
 Get the number of values in this class. More...
 
int minHandle (bool thisClassOnly) const
 Get the minum handle of its values; If thisClassOnly = true, only this class will be checked. More...
 
int maxHandle (bool thisClassOnly) const
 Get the maximum handle of its values; If thisClassOnly = true, only this class will be checked. More...
 
DtBaseHlaClass< ValueType > * baseClass ()
 Get the base class. More...
 
const DtBaseHlaClass< ValueType > * baseClass () const
 Get the base class. More...
 
iterator begin ()
 Get iterator to first value. More...
 
const_iterator begin () const
 Get iterator to first value. More...
 
iterator end ()
 Get iterator past last value. More...
 
const_iterator end () const
 Get iterator past last value. More...
 
ValueType * findValueByName (const DtString &name, bool thisClassOnly)
 Look up a value by its name. More...
 
const ValueType * findValueByName (const DtString &name, bool thisClassOnly) const
 Look up a value by its name. More...
 
ValueType * findValueByHandle (DtLgrHlaHandle handle, bool thisClassOnly)
 Look up a value by its handle. More...
 
const ValueType * findValueByHandle (DtLgrHlaHandle handle, bool thisClassOnly) const
 Look up a value by its handle. More...
 
- Public Member Functions inherited from MAKLogger::DtBaseHlaValue
 DtBaseHlaValue (const DtString &name, DtLgrHlaHandle handle)
 
virtual ~DtBaseHlaValue ()
 
 DtBaseHlaValue (const DtBaseHlaValue &value)
 
DtBaseHlaValueoperator= (const DtBaseHlaValue &value)
 
DtU32 flags () const
 Get the encoded flags. More...
 
void setFlags (DtU32)
 Set the encoded flags. More...
 
const DtStringname () const
 
void setName (const DtString &name)
 
const char * name2print () const
 
DtLgrHlaHandle handle () const
 
void setHandle (DtLgrHlaHandle handle)
 

Private Attributes

DtString myBaseName
 
DtBaseHlaClass< ValueType > * myBaseClass
 
ValueVector myValues
 

Detailed Description

template<typename ValueType>
class MAKLogger::DtBaseHlaClass< ValueType >

A generic Hla class (used by both Objects and Interactions).

ValueType is assumed to be a specialization of DtBaseHlaValue.

Member Typedef Documentation

template<typename ValueType>
typedef ValueVector::const_iterator MAKLogger::DtBaseHlaClass< ValueType >::const_iterator
template<typename ValueType>
typedef ValueVector::iterator MAKLogger::DtBaseHlaClass< ValueType >::iterator
template<typename ValueType>
typedef std::vector<ValueType> MAKLogger::DtBaseHlaClass< ValueType >::ValueVector

Constructor & Destructor Documentation

template<typename ValueType>
MAKLogger::DtBaseHlaClass< ValueType >::DtBaseHlaClass ( const DtString name,
DtBaseHlaClass< ValueType > *  baseClass,
DtLgrHlaHandle  handle 
)

Constructor with valid pointer to base class object.

template<typename ValueType>
MAKLogger::DtBaseHlaClass< ValueType >::DtBaseHlaClass ( const DtString name,
const DtString baseClassName,
DtLgrHlaHandle  handle 
)

Constructor with only the base class name.

template<typename ValueType>
MAKLogger::DtBaseHlaClass< ValueType >::DtBaseHlaClass ( const DtBaseHlaClass< ValueType > &  src)

Copy constructor.

Warning
BaseClass pointer is set to null since copy may not be in same hierarchy.
template<typename ValueType>
virtual MAKLogger::DtBaseHlaClass< ValueType >::~DtBaseHlaClass ( )
virtual

DTOR.

Member Function Documentation

template<typename ValueType>
void MAKLogger::DtBaseHlaClass< ValueType >::addValue ( const ValueType &  value)

Add a value to the class.

Exceptions
DtInvalidInputif a value with the same name or handle exists.
template<typename ValueType>
DtBaseHlaClass<ValueType>* MAKLogger::DtBaseHlaClass< ValueType >::baseClass ( )

Get the base class.

Return values
0If no base class set.
template<typename ValueType>
const DtBaseHlaClass<ValueType>* MAKLogger::DtBaseHlaClass< ValueType >::baseClass ( ) const

Get the base class.

Return values
0If no base class set.
template<typename ValueType>
const DtString& MAKLogger::DtBaseHlaClass< ValueType >::baseName ( ) const
inline

Get the base class name, it can be empty.

template<typename ValueType>
const char* MAKLogger::DtBaseHlaClass< ValueType >::baseName2print ( ) const
inline

Get a raw pointer to the base name for printing.

template<typename ValueType>
iterator MAKLogger::DtBaseHlaClass< ValueType >::begin ( )

Get iterator to first value.

template<typename ValueType>
const_iterator MAKLogger::DtBaseHlaClass< ValueType >::begin ( ) const

Get iterator to first value.

template<typename ValueType>
void MAKLogger::DtBaseHlaClass< ValueType >::clearValues ( )

Clears all values added.

template<typename ValueType>
iterator MAKLogger::DtBaseHlaClass< ValueType >::end ( )

Get iterator past last value.

template<typename ValueType>
const_iterator MAKLogger::DtBaseHlaClass< ValueType >::end ( ) const

Get iterator past last value.

template<typename ValueType>
ValueType* MAKLogger::DtBaseHlaClass< ValueType >::findValueByHandle ( DtLgrHlaHandle  handle,
bool  thisClassOnly 
)

Look up a value by its handle.

If thisClassOnly = true, base classes will not be checked. If thisClassOnly = false if the value is not found in this class the base class findValueByHandle is called.

Returns
An iterator to the value or a pointer to end() if not found.
template<typename ValueType>
const ValueType* MAKLogger::DtBaseHlaClass< ValueType >::findValueByHandle ( DtLgrHlaHandle  handle,
bool  thisClassOnly 
) const

Look up a value by its handle.

If thisClassOnly = true, base classes will not be checked. If thisClassOnly = false if the value is not found in this class the base class findValueByHandle is called.

Returns
An iterator to the value or a pointer to end() if not found.
template<typename ValueType>
ValueType* MAKLogger::DtBaseHlaClass< ValueType >::findValueByName ( const DtString name,
bool  thisClassOnly 
)

Look up a value by its name.

If thisClassOnly = true, base classes will not be checked. If thisClassOnly = false if the value is not found in this class the base class findValueByName is called.

Returns
An iterator to the value or a pointer to end() if not found.
template<typename ValueType>
const ValueType* MAKLogger::DtBaseHlaClass< ValueType >::findValueByName ( const DtString name,
bool  thisClassOnly 
) const

Look up a value by its name.

If thisClassOnly = true, base classes will not be checked. If thisClassOnly = false if the value is not found in this class the base class findValueByName is called.

Returns
An iterator to the value or a pointer to end() if not found.
template<typename ValueType>
bool MAKLogger::DtBaseHlaClass< ValueType >::isOfClass ( DtLgrHlaHandle  handle) const

Checks whether this class is or inherits from a class with the handle.

template<typename ValueType>
bool MAKLogger::DtBaseHlaClass< ValueType >::isOfClass ( const DtString name) const

Checks whether this class is or inherits from a class with the name.

template<typename ValueType>
bool MAKLogger::DtBaseHlaClass< ValueType >::isOfClass ( const DtBaseHlaClass< ValueType > &  baseClass) const

Checks whether this class is or inherits from the class (via ptr)

template<typename ValueType>
int MAKLogger::DtBaseHlaClass< ValueType >::maxHandle ( bool  thisClassOnly) const

Get the maximum handle of its values; If thisClassOnly = true, only this class will be checked.

If thisClassOnly = false all base classes are checked.

Return values
-2if this class has no values.
template<typename ValueType>
int MAKLogger::DtBaseHlaClass< ValueType >::minHandle ( bool  thisClassOnly) const

Get the minum handle of its values; If thisClassOnly = true, only this class will be checked.

If thisClassOnly = false all base classes are checked.

Return values
-1if this class has no values.
template<typename ValueType>
DtBaseHlaClass<ValueType>& MAKLogger::DtBaseHlaClass< ValueType >::operator= ( const DtBaseHlaClass< ValueType > &  src)

Assignment operator.

Warning
BaseClass pointer is set to null since copy may not be in same hierarchy.
template<typename ValueType>
void MAKLogger::DtBaseHlaClass< ValueType >::setBaseClass ( DtBaseHlaClass< ValueType > *  baseClass)

Set the base class pointer.

The base class name will be set to the name of the base class. If the baseClass pointer is null, the base class name will be set to empty string.

template<typename ValueType>
void MAKLogger::DtBaseHlaClass< ValueType >::setBaseNameOnly ( const DtString name0)

Set the base class name.

If a base class object is set, the function will check it's name, if the name is not equal setBaseClass(0) will be called to reset the base class pointer first.

template<typename ValueType>
DtString MAKLogger::DtBaseHlaClass< ValueType >::simpleName ( ) const

Get the simple class name, which does not include the base name.

template<typename ValueType>
int MAKLogger::DtBaseHlaClass< ValueType >::valueCount ( bool  thisClassOnly) const

Get the number of values in this class.

If thisClassOnly = true, only this class will be counted. If thisClassOnly = false all base classes are also counted.

Member Data Documentation

template<typename ValueType>
DtBaseHlaClass<ValueType>* MAKLogger::DtBaseHlaClass< ValueType >::myBaseClass
private
template<typename ValueType>
DtString MAKLogger::DtBaseHlaClass< ValueType >::myBaseName
private
template<typename ValueType>
ValueVector MAKLogger::DtBaseHlaClass< ValueType >::myValues
private

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

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)