ADTF  3.18.2
cDDLBaseunit

Representation of a base unit inside a DDL description. More...

Inheritance diagram for cDDLBaseunit:
[legend]

Public Member Functions

 cDDLBaseunit ()
 Default CTOR.
 
 cDDLBaseunit (const A_UTILS_NS::cString &strName, const A_UTILS_NS::cString &strSymbol, const A_UTILS_NS::cString &strDescription, int const nCreationLevel=1)
 CTOR. More...
 
 cDDLBaseunit (cDDLBaseunit &oBU)
 Copy CTOR. More...
 
virtual ~cDDLBaseunit ()
 DTOR.
 
tResult Create (const A_UTILS_NS::cString &strName, const A_UTILS_NS::cString &strSymbol, const A_UTILS_NS::cString &strDescription, int const nCreationLevel=1)
 Creation method to fill the object with data. More...
 
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...
 
bool IsInitialized () const
 Getter for the initialization flag. More...
 
int GetCreationLevel () const
 Getter for the creation level. More...
 
const A_UTILS_NS::cStringGetName () const
 Getter for the name. More...
 
void SetName (const A_UTILS_NS::cString &strName)
 Setter for the name.
 
const A_UTILS_NS::cStringGetSymbol () const
 Getter for the symbol. More...
 
void SetSymbol (const A_UTILS_NS::cString &strSymbol)
 Setter for the description.
 
const A_UTILS_NS::cStringGetDescription () const
 Getter for the description. More...
 
void SetDescription (const A_UTILS_NS::cString &strDesc)
 Setter for the description.
 
- Public Member Functions inherited from IDDLUnit
virtual ~IDDLUnit ()
 Virtual DTOR.
 
- Public Member Functions inherited from IDDL
virtual ~IDDL ()
 Virtual DTOR.
 

Private Attributes

A_UTILS_NS::cString m_strName
 
A_UTILS_NS::cString m_strSymbol
 
A_UTILS_NS::cString m_strDescription
 
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 of a base unit inside a DDL description.

Definition at line 15 of file ddlbaseunit.h.

Constructor & Destructor Documentation

◆ cDDLBaseunit() [1/2]

cDDLBaseunit ( const A_UTILS_NS::cString strName,
const A_UTILS_NS::cString strSymbol,
const A_UTILS_NS::cString strDescription,
int const  nCreationLevel = 1 
)

CTOR.

Parameters
[in]strName- Name of the base unit (e.g. "metre")
[in]strSymbol- Symbol of the base unit (e.g. "m")
[in]strDescription- Description of the represented base unit
[in]nCreationLevel- Level at creation time (optional)

◆ cDDLBaseunit() [2/2]

Copy CTOR.

Parameters
[in]oBU- Referencee to baseunit 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()

tResult Create ( const A_UTILS_NS::cString strName,
const A_UTILS_NS::cString strSymbol,
const A_UTILS_NS::cString strDescription,
int const  nCreationLevel = 1 
)

Creation method to fill the object with data.

Parameters
[in]strName- Name of the base unit (e.g. "metre")
[in]strSymbol- Symbol of the base unit (e.g. "m")
[in]strDescription- Description of the represented base unit
[in]nCreationLevel- Level at creation time (optional)
Return values
ERR_INVALID_ARGEmpty name committed

◆ GetCreationLevel()

int GetCreationLevel ( ) const
virtual

Getter for the creation level.

Returns
the level at creation time of this representation object

Implements IDDL.

◆ GetDescription()

const A_UTILS_NS::cString& GetDescription ( ) const

Getter for the description.

Returns
the description

◆ GetName()

const A_UTILS_NS::cString& GetName ( ) const
virtual

Getter for the name.

Returns
the name

Implements IDDL.

◆ GetSymbol()

const A_UTILS_NS::cString& GetSymbol ( ) const

Getter for the symbol.

Returns
the symbol

◆ 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.