ADTF
UnitPrefix

Unit Prefix - datamodel pefixes. More...

Inheritance diagram for UnitPrefix:
[legend]

Public Member Functions

 UnitPrefix ()
 default CTOR
 
 UnitPrefix (const UnitPrefix &)=default
 copy CTOR
 
 UnitPrefix (UnitPrefix &&)=default
 move CTOR
 
UnitPrefixoperator= (const UnitPrefix &)=default
 copy assignment operator More...
 
UnitPrefixoperator= (UnitPrefix &&)=default
 move assignment operator More...
 
 UnitPrefix (const std::string &name, const std::string &symbol, int32_t power)
 CTOR. More...
 
virtual ~UnitPrefix ()=default
 DTOR.
 
const std::string & getName () const
 Get the Name. More...
 
void setName (const std::string &name)
 Set the Name. More...
 
const std::string & getSymbol () const
 Get the Symbol. More...
 
void setSymbol (const std::string &symbol)
 Set the Symbol. More...
 
int32_t getPower () const
 Get the Power. More...
 
void setPower (int32_t power)
 Set the Power. More...
 
bool operator== (const UnitPrefix &other) const
 equality operator. More...
 
bool operator!= (const UnitPrefix &other) const
 non equality operator. More...
 
- Public Member Functions inherited from ModelSubjectUtility< MODEL_SUBJECT_T, EVENT_CODE_T >
 ModelSubjectUtility ()=default
 CTOR.
 
 ModelSubjectUtility (const ModelSubjectUtility &)
 copy CTOR which removes the observers in case of!
 
ModelSubjectUtilityoperator= (const ModelSubjectUtility &)
 copy assignment operator which removes the observers in case of! More...
 
virtual ~ModelSubjectUtility ()=default
 DTOR.
 
void attachObserver (observer_type *observer)
 adda a observer to notify. More...
 
void detachObserver (observer_type *observer)
 remove a observer if in list. More...
 
- Public Member Functions inherited from InfoMap
 InfoMap ()=default
 CTOR.
 
 InfoMap (const InfoMap &)
 copy CTOR More...
 
 InfoMap (InfoMap &&)
 move CTOR More...
 
InfoMapoperator= (const InfoMap &)
 copy assignment operator More...
 
InfoMapoperator= (InfoMap &&)
 move assignment operator More...
 
template<typename INFO_T >
const INFO_T * getInfo () const
 Get the Info Pointer. More...
 
template<typename INFO_T >
INFO_T * getInfo ()
 Get the Info Pointer. More...
 
template<typename INFO_T >
void setInfo (const std::shared_ptr< INFO_T > &info)
 Set the Info object as shared pointer. More...
 

Private Member Functions

void notify (const std::string &additional_info)
 

Private Attributes

std::string _name = {}
 
std::string _symbol = {}
 
int32_t _power = {}
 

Additional Inherited Members

- Public Types inherited from ModelSubjectUtility< MODEL_SUBJECT_T, EVENT_CODE_T >
typedef EVENT_CODE_T event_code_type
 local definition of the event code type
 
typedef MODEL_SUBJECT_T subject_type
 local definition of the subject type
 
typedef ModelObserverUtility< MODEL_SUBJECT_T, EVENT_CODE_T > observer_type
 local definition of the observer type to notify
 
- Protected Member Functions inherited from ModelSubjectUtility< MODEL_SUBJECT_T, EVENT_CODE_T >
void notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info)
 helper utility function to notify the current observers More...
 

Detailed Description

Unit Prefix - datamodel pefixes.

Definition at line 219 of file datamodel_units.h.

Constructor & Destructor Documentation

◆ UnitPrefix()

UnitPrefix ( const std::string &  name,
const std::string &  symbol,
int32_t  power 
)

CTOR.

Parameters
namename of the unit prefix
symbolsymbol of the unit prefix
powerpower of the unit prefix

Member Function Documentation

◆ getName()

const std::string& getName ( ) const

Get the Name.

Returns
const std::string&

Referenced by DDToXMLFactory< DOM_NODE_TYPE >::createNode().

◆ getPower()

int32_t getPower ( ) const

Get the Power.

Returns
int32_t

Referenced by DDToXMLFactory< DOM_NODE_TYPE >::createNode().

◆ getSymbol()

const std::string& getSymbol ( ) const

Get the Symbol.

Returns
const std::string&

Referenced by DDToXMLFactory< DOM_NODE_TYPE >::createNode().

◆ operator!=()

bool operator!= ( const UnitPrefix other) const

non equality operator.

Parameters
otherthe other unitprefix to compare this unitprefix to.
Returns
false the unitprefixes are equal.
true the unitprefixes are not equal.

◆ operator=() [1/2]

UnitPrefix& operator= ( const UnitPrefix )
default

copy assignment operator

Returns
UnitPrefix&

◆ operator=() [2/2]

UnitPrefix& operator= ( UnitPrefix &&  )
default

move assignment operator

Returns
UnitPrefix&

◆ operator==()

bool operator== ( const UnitPrefix other) const

equality operator.

Parameters
otherthe other unitprefix to compare this unitprefix to.
Returns
true the unitprefixes are equal.
false the unitprefixes are not equal.

◆ setName()

void setName ( const std::string &  name)

Set the Name.

Parameters
namethe name to set
Remarks
This will notify the change.
Exceptions
dd::ErrorIf the name already exists in the container this unit prefix is part of it will throw.

◆ setPower()

void setPower ( int32_t  power)

Set the Power.

Parameters
powerthe power to set
Remarks
This will notify the change.

◆ setSymbol()

void setSymbol ( const std::string &  symbol)

Set the Symbol.

Parameters
symbolthe symbol to set
Remarks
This will notify the change.