ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cDDLEnum

Representation for an enum inside a DDL description. More...

#include <ddlenum.h>

Inheritance diagram for cDDLEnum:
[legend]

Public Member Functions

 cDDLEnum ()
 Default CTOR.
 
 cDDLEnum (IDDLDataType *poType, const A_UTILS_NS::cString &strName, const tEnumNameValueVec &vecNameValues, IDDLUnit *poUnit=NULL)
 CTOR.
 
 cDDLEnum (IDDLDataType *poType, const A_UTILS_NS::cString &strName, const tEnumNameValueVec &vecNameValues, IDDLUnit *poUnit=NULL, int nCreationLevel=1)
 CTOR.
 
 cDDLEnum (cDDLEnum &oEnum)
 Copy CTOR.
 
virtual ~cDDLEnum ()
 DTOR.
 
tResult Accept (IDDLVisitor *poVisitor)
 Acceptance method for Visitor design-pattern.
 
bool IsPredefined () const
 Getter for the predefinition flag.
 
bool IsOverwriteable () const
 Getter for the predefinition flag.
 
const A_UTILS_NS::cStringGetName () const
 Getter for the name of the representation object.
 
void SetName (const A_UTILS_NS::cString &strName)
 Setter for the name of the element.
 
const tEnumNameValueVecGetValues () const
 Getter for the Container type of DDL enum elements.
 
void SetValues (const tEnumNameValueVec &vecValues)
 Setter for the DDL enum elements.
 
tResult GetValue (const A_UTILS_NS::cString &strElement, A_UTILS_NS::cString &strValue) const
 Getter for the value of the element.
 
tResult SetValue (const A_UTILS_NS::cString &strElement, const A_UTILS_NS::cString &strValue)
 Setter for the value of the element.
 
tResult GetNameForValue (const A_UTILS_NS::cString &strValue, A_UTILS_NS::cString &strElement)
 Getter for the name of the element.
 
const A_UTILS_NS::cStringGetType () const
 Getter for the data-type name.
 
void SetType (IDDLDataType *const pType)
 Setter for the data-type object.
 
IDDLDataTypeGetTypeObject () const
 Getter for the data-type object.
 
int GetCreationLevel () const
 Getter for the creation level.
 
bool IsInitialized () const
 Getter for the initialization flag.
 
tResult Create (IDDLDataType *poType, const A_UTILS_NS::cString &strName, const tEnumNameValueVec &vecNameValues, IDDLUnit *poUnit=NULL)
 Creation method to fill the object with data.
 
tResult Create (IDDLDataType *poType, const A_UTILS_NS::cString &strName, const tEnumNameValueVec &vecNameValues, IDDLUnit *poUnit=NULL, int nCreationLevel=1)
 Creation method to fill the object with data.
 
void SetUnit (IDDLUnit *poUnit)
 Setter for the unit.
 
A_UTILS_NS::cString GetUnit () const
 Getter for the unit name.
 
IDDLUnitGetUnitObject () const
 Getter for the unit object.
 
tResult RemoveElement (const A_UTILS_NS::cString &strElement)
 Remove the element with the provided name.
 
- Public Member Functions inherited from IDDLDataType
virtual ~IDDLDataType ()
 Virtual DTOR.
 
- Public Member Functions inherited from IDDL
virtual ~IDDL ()
 Virtual DTOR.
 

Private Attributes

A_UTILS_NS::cString m_strName
 
tEnumNameValueVec m_vecNameValues
 
IDDLUnitm_poUnit
 
IDDLDataTypem_poType
 
bool m_bInitFlag
 
int m_nLevel
 

Additional Inherited Members

- Public Types inherited from IDDL
enum  tag_MergeFlags { DDLMERGE_ForceOverwrite = 0x01 }
 Flags for Merging. More...
 

Detailed Description

Representation for an enum inside a DDL description.

Definition at line 19 of file ddlenum.h.

Constructor & Destructor Documentation

◆ cDDLEnum() [1/3]

cDDLEnum ( IDDLDataType * poType,
const A_UTILS_NS::cString & strName,
const tEnumNameValueVec & vecNameValues,
IDDLUnit * poUnit = NULL )

CTOR.

Parameters
[in]poType- Pointer to the data-type object
[in]strName- Name of the created enum
[in]vecNameValues- Values of the enum
[in]poUnit- Pointer to the unit of the datatype (optional)

◆ cDDLEnum() [2/3]

cDDLEnum ( IDDLDataType * poType,
const A_UTILS_NS::cString & strName,
const tEnumNameValueVec & vecNameValues,
IDDLUnit * poUnit = NULL,
int nCreationLevel = 1 )

CTOR.

Parameters
[in]poType- Pointer to the data-type object
[in]strName- Name of the created enum
[in]vecNameValues- Values of the enum
[in]poUnit- Pointer to the unit of the datatype (optional)
[in]nCreationLevel- Level at creation time (optional)

◆ cDDLEnum() [3/3]

cDDLEnum ( cDDLEnum & oEnum)

Copy CTOR.

Parameters
[in]oEnum- Reference to enum object to copy

References cDDLEnum().

Member Function Documentation

◆ Accept()

tResult Accept ( IDDLVisitor * poVisitor)
virtual

Acceptance method for Visitor design-pattern.

Parameters
[in]poVisitor- Pointer to Visitor instance
Return values
ERR_POINTERNull-pointer committed
ERR_NOT_FOUNDRequired node not found.
ERR_NOT_INITIALIZEDThe object was not or not correctly initialized

Implements IDDL.

◆ Create() [1/2]

tResult Create ( IDDLDataType * poType,
const A_UTILS_NS::cString & strName,
const tEnumNameValueVec & vecNameValues,
IDDLUnit * poUnit = NULL )

Creation method to fill the object with data.

Parameters
[in]poType- Pointer to the data-type object
[in]strName- Name of the created enum
[in]vecNameValues- Values of the enum
[in]poUnit- Pointer to the unit of the datatype (optional)
Returns
Standard result.
Return values
ERR_POINTERNull-pointer committed

◆ Create() [2/2]

tResult Create ( IDDLDataType * poType,
const A_UTILS_NS::cString & strName,
const tEnumNameValueVec & vecNameValues,
IDDLUnit * poUnit = NULL,
int nCreationLevel = 1 )

Creation method to fill the object with data.

Parameters
[in]poType- Pointer to the data-type object
[in]strName- Name of the created enum
[in]vecNameValues- Values of the enum
[in]poUnit- Pointer to the unit of the datatype (optional)
[in]nCreationLevel- Level at creation time (optional)
Returns
Standard result.
Return values
ERR_POINTERNull-pointer committed

◆ GetCreationLevel()

int GetCreationLevel ( ) const
virtual

Getter for the creation level.

Returns
the level at creation time of this representation object

Implements IDDL.

◆ GetName()

const A_UTILS_NS::cString & GetName ( ) const
virtual

Getter for the name of the representation object.

Returns
the name

Implements IDDL.

◆ GetNameForValue()

tResult GetNameForValue ( const A_UTILS_NS::cString & strValue,
A_UTILS_NS::cString & strElement )

Getter for the name of the element.

Parameters
[in]strValueValue of the element
[out]strElementName of the element
Returns
Standard result code.

◆ GetType()

const A_UTILS_NS::cString & GetType ( ) const

Getter for the data-type name.

Returns
name of the data type

◆ GetTypeObject()

IDDLDataType * GetTypeObject ( ) const

Getter for the data-type object.

Returns
pointer to the data-type object

◆ GetUnit()

A_UTILS_NS::cString GetUnit ( ) const

Getter for the unit name.

Returns
name of the referenced unit (A_UTILS_NS::cString::Empty if there is none)

◆ GetUnitObject()

IDDLUnit * GetUnitObject ( ) const

Getter for the unit object.

Returns
pointer to the unit object (NULL if there is none)

◆ GetValue()

tResult GetValue ( const A_UTILS_NS::cString & strElement,
A_UTILS_NS::cString & strValue ) const

Getter for the value of the element.

Parameters
[in]strElementName of the element
[out]strValueValue of the element
Returns
Standard result code.

◆ GetValues()

const tEnumNameValueVec & GetValues ( ) const

Getter for the Container type of DDL enum elements.

Returns
Container type of DDL enum elements.

◆ IsInitialized()

bool IsInitialized ( ) const
virtual

Getter for the initialization flag.

Return values
trueThe object was initialized correctly
falseThe object was not or not correctly initialized

Implements IDDL.

◆ IsOverwriteable()

bool IsOverwriteable ( ) const
virtual

Getter for the predefinition flag.

Return values
trueThe object was predefined
falseThe object was defined later

Implements IDDL.

◆ IsPredefined()

bool IsPredefined ( ) const
virtual

Getter for the predefinition flag.

Return values
trueThe object was predefined
falseThe object was defined later

Implements IDDL.

◆ RemoveElement()

tResult RemoveElement ( const A_UTILS_NS::cString & strElement)

Remove the element with the provided name.

Parameters
[in]strElement- name of the element to be removed
Returns
Standard result.
Return values
ERR_NOT_FOUNDelement not found

◆ SetName()

void SetName ( const A_UTILS_NS::cString & strName)

Setter for the name of the element.

Parameters
[in]strNameName of the element
Returns
void

◆ SetType()

void SetType ( IDDLDataType *const pType)

Setter for the data-type object.

Parameters
[in]pTypepointer to the data-type object
Returns
void

◆ SetUnit()

void SetUnit ( IDDLUnit * poUnit)

Setter for the unit.

Parameters
[in]poUnit- Pointer to the unit object of the data type
Returns
void

◆ SetValue()

tResult SetValue ( const A_UTILS_NS::cString & strElement,
const A_UTILS_NS::cString & strValue )

Setter for the value of the element.

Parameters
[in]strElementName of the element
[in]strValueValue of the element
Returns
Standard result code.

◆ SetValues()

void SetValues ( const tEnumNameValueVec & vecValues)

Setter for the DDL enum elements.

Parameters
[in]vecValuesContainer type of DDL enum elements
Returns
void.

Member Data Documentation

◆ m_bInitFlag

bool m_bInitFlag
private

Definition at line 218 of file ddlenum.h.

◆ m_nLevel

int m_nLevel
private

Definition at line 219 of file ddlenum.h.

◆ m_poType

IDDLDataType* m_poType
private

Definition at line 215 of file ddlenum.h.

◆ m_poUnit

IDDLUnit* m_poUnit
private

Definition at line 214 of file ddlenum.h.

◆ m_strName

A_UTILS_NS::cString m_strName
private

Definition at line 212 of file ddlenum.h.

◆ m_vecNameValues

tEnumNameValueVec m_vecNameValues
private

Definition at line 213 of file ddlenum.h.