ADTF
|
Representation object of a unit. More...
Public Member Functions | |
cDDLUnit () | |
Default CTOR. | |
cDDLUnit (const A_UTILS_NS::cString &strName, const A_UTILS_NS::cString &strNumerator, const A_UTILS_NS::cString &strDenominator, double const fOffset, tDDLRefUnitVec vecDDLRefUnits=tDDLRefUnitVec(), int const nCreationLevel=1) | |
CTOR. More... | |
cDDLUnit (cDDLUnit &oUnit) | |
Copy CTOR. More... | |
virtual | ~cDDLUnit () |
DTOR. | |
tResult | Accept (IDDLVisitor *poVisitor) |
Acceptance method for Visitor design-pattern. More... | |
bool | IsInitialized () const |
Getter for the initialization flag. More... | |
bool | IsPredefined () const |
Getter for the predefinition flag. More... | |
bool | IsOverwriteable () const |
Getter for the predefinition flag. More... | |
int | GetCreationLevel () const |
Getter for the creation level. More... | |
tResult | Create (const A_UTILS_NS::cString &strName, const A_UTILS_NS::cString &strNumerator, const A_UTILS_NS::cString &strDenominator, double const fOffset, tDDLRefUnitVec vecDDLRefUnits=tDDLRefUnitVec(), int const nCreationLevel=4) |
Creation method to fill the object with data. More... | |
const A_UTILS_NS::cString & | GetName () const |
Getter for the name. More... | |
void | SetName (const A_UTILS_NS::cString &strName) |
Setter for the Name. | |
A_UTILS_NS::cString | GetNumerator () const |
Getter for the numerator. More... | |
void | SetNumerator (const A_UTILS_NS::cString &strNumerator) |
Setter for the Denominator. | |
A_UTILS_NS::cString | GetDenominator () const |
Getter for the denominator. More... | |
void | SetDenominator (const A_UTILS_NS::cString &strDenominator) |
Setter for the Denominator. | |
double | GetOffset () const |
Getter for the offset. More... | |
void | SetOffset (double const fOffset) |
Setter for the offset. | |
tDDLRefUnitVec & | GetRefUnits () |
Getter for the reference unit. More... | |
const tDDLRefUnitVec & | GetRefUnits () const |
Getter for the reference unit. More... | |
void | AddRefUnit (cDDLRefUnit *poRefUnit, int nPos=-1) |
Adder for a reference unit. More... | |
tResult | RemoveRefUnit (const A_UTILS_NS::cString &strRefUnit) |
Remover for a reference unit. More... | |
void | CloneRefUnits (tDDLRefUnitVec vecDDLRefUnits) |
Setter for the reference units. More... | |
void | RefRefUnits (tDDLRefUnitVec vecDDLRefUnits) |
Setter for the reference units. More... | |
![]() | |
virtual | ~IDDLUnit () |
Virtual DTOR. | |
![]() | |
virtual | ~IDDL () |
Virtual DTOR. | |
Private Attributes | |
A_UTILS_NS::cString | m_strName |
A_UTILS_NS::cString | m_strNumerator |
A_UTILS_NS::cString | m_strDenominator |
double | m_fOffset |
tDDLRefUnitVec | m_vecDDLRefUnits |
bool | m_bInitFlag |
int | m_nLevel |
Additional Inherited Members | |
![]() | |
enum | tag_MergeFlags { DDLMERGE_ForceOverwrite = 0x01 } |
Flags for Merging. | |
cDDLUnit | ( | const A_UTILS_NS::cString & | strName, |
const A_UTILS_NS::cString & | strNumerator, | ||
const A_UTILS_NS::cString & | strDenominator, | ||
double const | fOffset, | ||
tDDLRefUnitVec | vecDDLRefUnits = tDDLRefUnitVec() , |
||
int const | nCreationLevel = 1 |
||
) |
CTOR.
[in] | strName | - Name of the new unit |
[in] | strNumerator | - Numerator of the new unit |
[in] | strDenominator | - Denominator of the new unit |
[in] | fOffset | - Offset to the base units |
[in] | vecDDLRefUnits | - Vector of reference units (optional) |
[in] | nCreationLevel | - Level at creation time (optional) |
|
virtual |
Acceptance method for Visitor design-pattern.
[in] | poVisitor | - Pointer to Visitor instance |
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.
void AddRefUnit | ( | cDDLRefUnit * | poRefUnit, |
int | nPos = -1 |
||
) |
Adder for a reference unit.
[in] | poRefUnit | - Pointer to the reference unit to add |
[in] | nPos | - Position to add the reference unit |
void CloneRefUnits | ( | tDDLRefUnitVec | vecDDLRefUnits | ) |
Setter for the reference units.
[in] | vecDDLRefUnits | - Vector of reference units |
tResult Create | ( | const A_UTILS_NS::cString & | strName, |
const A_UTILS_NS::cString & | strNumerator, | ||
const A_UTILS_NS::cString & | strDenominator, | ||
double const | fOffset, | ||
tDDLRefUnitVec | vecDDLRefUnits = tDDLRefUnitVec() , |
||
int const | nCreationLevel = 4 |
||
) |
Creation method to fill the object with data.
[in] | strName | - Name of the new unit |
[in] | strNumerator | - Numerator of the new unit |
[in] | strDenominator | - Denominator of the new unit |
[in] | fOffset | - Offset to the base units |
[in] | vecDDLRefUnits | - Vector of reference units (optional) |
[in] | nCreationLevel | - Level at creation time (optional) |
ERR_INVALID_ARG | Empty name committed |
|
virtual |
Getter for the creation level.
Implements IDDL.
A_UTILS_NS::cString GetDenominator | ( | ) | const |
Getter for the denominator.
|
virtual |
A_UTILS_NS::cString GetNumerator | ( | ) | const |
Getter for the numerator.
double GetOffset | ( | ) | const |
Getter for the offset.
tDDLRefUnitVec& GetRefUnits | ( | ) |
Getter for the reference unit.
const tDDLRefUnitVec& GetRefUnits | ( | ) | const |
Getter for the reference unit.
|
virtual |
Getter for the initialization flag.
true | The object was initialized correctly |
false | The object was not or not correctly initialized |
Implements IDDL.
|
virtual |
Getter for the predefinition flag.
true | The object was predefined |
false | The object was defined later |
Implements IDDL.
|
virtual |
Getter for the predefinition flag.
true | The object was predefined |
false | The object was defined later |
Implements IDDL.
void RefRefUnits | ( | tDDLRefUnitVec | vecDDLRefUnits | ) |
Setter for the reference units.
[in] | vecDDLRefUnits | - Vector of reference units |
tResult RemoveRefUnit | ( | const A_UTILS_NS::cString & | strRefUnit | ) |
Remover for a reference unit.
[in] | strRefUnit | - name of the reference unit to remove |
ERR_NOT_FOUND | Specified reference unit not found. |