Decorator class for IDDLUnit objects to be used inside other cDDLUnit objects.
More...
#include <ddlrefunit.h>
|
enum | tag_MergeFlags { DDLMERGE_ForceOverwrite = 0x01
} |
| Flags for Merging. More...
|
|
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() ).
|
|
Decorator class for IDDLUnit objects to be used inside other cDDLUnit objects.
Definition at line 17 of file ddlrefunit.h.
◆ cDDLRefUnit() [1/2]
CTOR with unit object.
- Parameters
-
[in] | poUnit | - Pointer to the unit object |
[in] | nPower | - Power of the new unit related to the base units |
[in] | poPrefix | - Pointer to the prefix object |
◆ cDDLRefUnit() [2/2]
CTOR with unit object.
- Parameters
-
[in] | oRefUnit | - Pointer to the unit object |
References cDDLRefUnit().
◆ Accept()
Acceptance method for Visitor design-pattern.
- Parameters
-
[in] | poVisitor | - Pointer to Visitor instance |
- Return values
-
ERR_POINTER | Null-pointer committed |
ERR_NOT_FOUND | Required node not found. |
ERR_NOT_INITIALIZED | The object was not or not correctly initialized |
Implements IDDL.
◆ Create()
Creation method to fill the object with data.
- Parameters
-
[in] | poUnit | - Pointer to the unit object |
[in] | nPower | - Power of the new unit related to the base units |
[in] | poPrefix | - Pointer to the prefix object |
- Return values
-
ERR_POINTER | Null-pointer committed |
◆ GetName()
Getter for the name.
- Returns
- the name
Implements IDDL.
◆ GetPower()
Getter for the power.
- Returns
- the power
◆ GetPrefix()
Getter for the prefix name.
- Returns
- the prefix name
◆ GetPrefixObject()
Getter for the prefix object.
- Returns
- pointer to the prefix object
◆ GetUnitObject()
Getter for the unit object.
- Returns
- pointer to the unit object
◆ IsInitialized()
bool IsInitialized |
( |
| ) |
const |
|
virtual |
Getter for the initialization flag.
- Return values
-
true | The object was initialized correctly |
false | The object was not or not correctly initialized |
Reimplemented from cDDL.
◆ SetPower()
void SetPower |
( |
int const | nPower | ) |
|
Setter for the power.
- Parameters
-
- Returns
- void
◆ SetPrefixObject()
Setter for the prefix object.
- Parameters
-
pPrefix | pointer to the prefix object |
- Returns
- void
◆ SetUnitObject()
void SetUnitObject |
( |
IDDLUnit *const | pUnit | ) |
|
Setter for the unit object.
- Parameters
-
pUnit | the unit object to set |
- Returns
- void
◆ m_bInitFlag
◆ m_nPower
◆ m_poPrefix
◆ m_poUnit