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

Representation of a prefix in a DDL description. More...

#include <ddlprefix.h>

Inheritance diagram for cDDLPrefix:
[legend]

Public Member Functions

 cDDLPrefix ()
 Default CTOR.
 
 cDDLPrefix (const A_UTILS_NS::cString &strName, const A_UTILS_NS::cString &strSymbol, int const nPower, int const nCreationLevel=1)
 CTOR.
 
 cDDLPrefix (cDDLPrefix &oPrefix)
 Copy CTOR.
 
virtual ~cDDLPrefix ()
 DTOR.
 
tResult Accept (IDDLVisitor *poVisitor)
 Acceptance method for Visitor design-pattern.
 
bool IsPredefined () const
 Getter for the predefinition flag.
 
bool IsInitialized () const
 Getter for the initialization flag.
 
int GetCreationLevel () const
 Getter for the creation level.
 
tResult Create (const A_UTILS_NS::cString &strName, const A_UTILS_NS::cString &strSymbol, int const nPower, int const nCreationLevel=1)
 Creation method to fill the object with data.
 
const A_UTILS_NS::cStringGetName () const
 Getter for the name.
 
void SetName (const A_UTILS_NS::cString &strName)
 Setter for the name.
 
A_UTILS_NS::cString GetSymbol () const
 Getter for the symbol.
 
void SetSymbol (const A_UTILS_NS::cString &strSymbol)
 Setter for the symbol.
 
int GetPower () const
 Getter for the power.
 
void SetPower (int const nPower)
 Setter for the power.
 
- Public Member Functions inherited from cDDL
virtual ~cDDL ()
 DTOR.
 
virtual bool IsOverwriteable () const
 Getter for the predefinition flag.
 
- Public Member Functions inherited from IDDL
virtual ~IDDL ()
 Virtual DTOR.
 

Private Attributes

A_UTILS_NS::cString m_strName
 
A_UTILS_NS::cString m_strSymbol
 
int m_nPower
 
bool m_bInitFlag
 
int m_nLevel
 

Additional Inherited Members

- Public Types inherited from IDDL
enum  tag_MergeFlags { DDLMERGE_ForceOverwrite = 0x01 }
 Flags for Merging. More...
 
- Static Public Member Functions inherited from cDDL
template<typename T>
static T * DeleteChild (T *pvObj)
 Functor for use with std::transform() to delete all objects where the elements of a vector point at.
 
template<typename T>
static tResult MoveChild (T *pvObj, const int nFrom, const int nTo)
 Method moves element within the list.
 
template<typename T>
static T * Clone (T *pvObj)
 Functor for use with std::transform() to clone the objects where the elements of a vector point at.
 
template<typename T>
static T * Ref (T *pvObj)
 Functor for use with std::transform() to ref the objects where the elements of a vector point at, this is for the Always_there.
 
static bool IsEqual (IDDL *poLHS, IDDL *poRHS)
 Predicate to compare 2 DDL representation objects (for use with std::unique()).
 
static bool IsSorted (IDDL *poLHS, IDDL *poRHS)
 Sort predicate to compare to 2 DDL representation objects (for use with std::sort()).
 

Detailed Description

Representation of a prefix in a DDL description.

Definition at line 16 of file ddlprefix.h.

Constructor & Destructor Documentation

◆ cDDLPrefix() [1/2]

cDDLPrefix ( const A_UTILS_NS::cString & strName,
const A_UTILS_NS::cString & strSymbol,
int const nPower,
int const nCreationLevel = 1 )

CTOR.

Parameters
[in]strName- Name of the prefix
[in]strSymbol- Represents the short symbol (e.g. "k")
[in]nPower- Power of the prefix
[in]nCreationLevel- Level at creation time (optional)

◆ cDDLPrefix() [2/2]

cDDLPrefix ( cDDLPrefix & oPrefix)

Copy CTOR.

Parameters
[in]oPrefix- Reference to prefix object to copy

References cDDLPrefix().

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,
int const nPower,
int const nCreationLevel = 1 )

Creation method to fill the object with data.

Parameters
[in]strName- Name of the prefix
[in]strSymbol- Represents the short symbol (e.g. "k")
[in]nPower- Power of the prefix
[in]nCreationLevel- Level at creation time (optional)
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

Reimplemented from cDDL.

◆ GetName()

const A_UTILS_NS::cString & GetName ( ) const
virtual

Getter for the name.

Returns
the name

Implements IDDL.

◆ GetPower()

int GetPower ( ) const

Getter for the power.

Returns
the power

◆ GetSymbol()

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

Reimplemented from cDDL.

◆ IsPredefined()

bool IsPredefined ( ) const
virtual

Getter for the predefinition flag.

Return values
trueThe object was predefined
falseThe object was defined later

Reimplemented from cDDL.

Member Data Documentation

◆ m_bInitFlag

bool m_bInitFlag
private

Definition at line 107 of file ddlprefix.h.

◆ m_nLevel

int m_nLevel
private

Definition at line 108 of file ddlprefix.h.

◆ m_nPower

int m_nPower
private

Definition at line 105 of file ddlprefix.h.

◆ m_strName

A_UTILS_NS::cString m_strName
private

Definition at line 103 of file ddlprefix.h.

◆ m_strSymbol

A_UTILS_NS::cString m_strSymbol
private

Definition at line 104 of file ddlprefix.h.