ADTF
|
The unit class holding a reference to its complete DD (references to baseunits and prefixes) More...
Public Member Functions | |
DDUnit ()=delete | |
no default CTOR | |
DDUnit (const DDUnit &) | |
copy CTOR | |
DDUnit (DDUnit &&) | |
move CTOR | |
DDUnit & | operator= (const DDUnit &) |
copy assignment operator More... | |
DDUnit & | operator= (DDUnit &&) |
move assignment operator More... | |
DDUnit (const std::string &name, const std::string &numerator, const std::string &denominator, const std::string &offset, const std::vector< DDRefUnit > &ref_units={}) | |
CTOR. More... | |
void | addRefUnit (const DDRefUnit &ref_unit) |
adding a refunit More... | |
const dd::Unit & | getUnit () const |
Get the Unit object. More... | |
const dd::DataDefinition & | getDD () const |
Get the data definiton. More... | |
Private Attributes | |
std::shared_ptr< dd::Unit > | _unit |
dd::DataDefinition | _dd |
The unit class holding a reference to its complete DD (references to baseunits and prefixes)
DDUnit | ( | const std::string & | name, |
const std::string & | numerator, | ||
const std::string & | denominator, | ||
const std::string & | offset, | ||
const std::vector< DDRefUnit > & | ref_units = {} |
||
) |
CTOR.
name | the name of the unit |
numerator | the numerator for the unit |
denominator | the denominator for the unit |
offset | the offset for the unit |
ref_units | vector of refunits |
dd::Error | this will throw if this list contains a base_unit/prefix pair twice |
void addRefUnit | ( | const DDRefUnit & | ref_unit | ) |
adding a refunit
ref_unit | the refunit to add |
dd::Error | this will throw if this refUnits already contains a base_unit/prefix pair |
const dd::DataDefinition& getDD | ( | ) | const |
Get the data definiton.