ADTF  3.18.2
Unit::RefUnit

datamodel for the refUnit More...

Public Member Functions

 RefUnit ()
 default CTOR
 
 RefUnit (const RefUnit &)=default
 copy CTOR
 
 RefUnit (RefUnit &&)=default
 move CTOR
 
RefUnitoperator= (const RefUnit &)=default
 copy assignment operator More...
 
RefUnitoperator= (RefUnit &&)=default
 move assignment operator More...
 
 RefUnit (const std::string &unit_name, int32_t power, const std::string &prefix_name)
 CTOR. More...
 
bool operator== (const RefUnit &other) const
 equality operator. More...
 
bool operator!= (const RefUnit &other) const
 non equality operator. More...
 
const std::string & getUnitName () const
 Get the Unit Name. More...
 
int32_t getPower () const
 Get the Power. More...
 
const std::string & getPrefixName () const
 Get the Prefix Name. More...
 

Private Attributes

std::string _unit_name = {}
 
int32_t _power = {}
 
std::string _prefix_name = {}
 

Detailed Description

datamodel for the refUnit

Definition at line 377 of file datamodel_units.h.

Constructor & Destructor Documentation

◆ RefUnit()

RefUnit ( const std::string &  unit_name,
int32_t  power,
const std::string &  prefix_name 
)

CTOR.

Parameters
unit_namethe refunit name (must be a base unit!)
powerthe power of the refunit
prefix_namethe prefix name (must be a unit prefix)

Member Function Documentation

◆ getPower()

int32_t getPower ( ) const

Get the Power.

Returns
int32_t

◆ getPrefixName()

const std::string& getPrefixName ( ) const

Get the Prefix Name.

Returns
const std::string&

◆ getUnitName()

const std::string& getUnitName ( ) const

Get the Unit Name.

Returns
const std::string&

◆ operator!=()

bool operator!= ( const RefUnit other) const

non equality operator.

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

◆ operator=() [1/2]

RefUnit& operator= ( const RefUnit )
default

copy assignment operator

Returns
RefUnit&

◆ operator=() [2/2]

RefUnit& operator= ( RefUnit &&  )
default

move assignment operator

Returns
RefUnit&

◆ operator==()

bool operator== ( const RefUnit other) const

equality operator.

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