ADTF  3.18.2
cDDLEnum

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

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

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

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.