15#ifndef DD_DATA_MODEL_UNITS_H_INCLUDED
16#define DD_DATA_MODEL_UNITS_H_INCLUDED
88 virtual void setName(
const std::string& name);
146 std::string description = {});
162 void setName(
const std::string& name)
override;
210 void notify(
const std::string& additional_info);
211 std::string _symbol = {};
212 std::string _description = {};
257 UnitPrefix(std::string name, std::string symbol, int32_t power);
325 void notify(
const std::string& additional_info);
326 std::string _name = {};
327 std::string _symbol = {};
413 RefUnit(std::string unit_name, int32_t power, std::string prefix_name);
451 std::string _unit_name = {};
453 std::string _prefix_name = {};
466 std::string numerator,
467 std::string denominator,
469 const std::vector<RefUnit>& ref_units = {});
501 void setName(
const std::string& name)
override;
574 const std::string& additional_info);
577 std::string _numerator = {};
578 std::string _denominator = {};
579 std::string _offset = {};
void setDescription(const std::string &description)
Set the Description.
BaseUnit & operator=(const BaseUnit &)=default
copy assignment operator
BaseUnit(const BaseUnit &)=default
copy CTOR
void setName(const std::string &name) override
Set the Name.
BaseUnit(BaseUnit &&)=default
move CTOR
void setSymbol(const std::string &symbol)
Set the Symbol.
const std::string & getDescription() const
Get the Description.
BaseUnit & operator=(BaseUnit &&)=default
move assignment operator
TypeOfUnit getTypeOfUnit() const override
Get the Type Of Unit.
const std::string & getSymbol() const
Get the Symbol.
bool operator==(const BaseUnit &other) const
equality operator.
BaseUnit()
CTOR.
Definition datamodel_units.h:114
bool operator!=(const BaseUnit &other) const
non equality operator.
virtual ~BaseUnit()=default
DTOR.
BaseUnit(std::string name, std::string symbol, std::string description={})
CTOR.
UnitBase & operator=(const UnitBase &)=default
copy assignment operator
UnitBase(const UnitBase &)=default
copy CTOR
virtual ~UnitBase()=default
DTOR.
virtual void setName(const std::string &name)
Set the Name.
UnitBase(UnitBase &&)=default
move CTOR
virtual TypeOfUnit getTypeOfUnit() const =0
Get the Type Of Unit.
UnitBase & operator=(UnitBase &&)=default
move assignment operator
std::string _name
the name
Definition datamodel_units.h:98
UnitBase(std::string name)
CTOR.
UnitBase()=default
default CTOR
const std::string & getName() const
Get the Name.
UnitPrefix(UnitPrefix &&)=default
move CTOR
void setName(const std::string &name)
Set the Name.
bool operator!=(const UnitPrefix &other) const
non equality operator.
UnitPrefix(const UnitPrefix &)=default
copy CTOR
void setPower(int32_t power)
Set the Power.
const std::string & getName() const
Get the Name.
UnitPrefix & operator=(UnitPrefix &&)=default
move assignment operator
const std::string & getSymbol() const
Get the Symbol.
virtual ~UnitPrefix()=default
DTOR.
UnitPrefix(std::string name, std::string symbol, int32_t power)
CTOR.
UnitPrefix & operator=(const UnitPrefix &)=default
copy assignment operator
int32_t getPower() const
Get the Power.
void setSymbol(const std::string &symbol)
Set the Symbol.
bool operator==(const UnitPrefix &other) const
equality operator.
UnitPrefix()
default CTOR
Definition datamodel_units.h:227
datamodel for the refUnit
Definition datamodel_units.h:377
RefUnit & operator=(RefUnit &&)=default
move assignment operator
RefUnit(RefUnit &&)=default
move CTOR
bool operator==(const RefUnit &other) const
equality operator.
RefUnit(const RefUnit &)=default
copy CTOR
int32_t getPower() const
Get the Power.
RefUnit()
default CTOR
Definition datamodel_units.h:383
RefUnit(std::string unit_name, int32_t power, std::string prefix_name)
CTOR.
const std::string & getPrefixName() const
Get the Prefix Name.
const std::string & getUnitName() const
Get the Unit Name.
RefUnit & operator=(const RefUnit &)=default
copy assignment operator
bool operator!=(const RefUnit &other) const
non equality operator.
void setDenominator(const std::string &denominator)
Set the Denominator.
void setNumerator(const std::string &numerator)
Set the Numerator object.
void setName(const std::string &name) override
Set the Name.
Unit(Unit &&)=default
move CTOR
TypeOfUnit getTypeOfUnit() const override
Get the Type Of Unit.
void removeRefUnit(const RefUnit &ref_unit)
remove the refunit
const std::string & getDenominator() const
Get the Denominator.
void addRefUnit(const RefUnit &ref_unit)
adding a refunit
std::vector< RefUnit > RefUnits
definiton of the container for the RefUnits
Definition datamodel_units.h:549
Unit & operator=(Unit &&)=default
move assignment operator
const std::string & getNumerator() const
Get the Numerator.
void setOffset(const std::string &offset)
Set the Offset.
bool operator!=(const Unit &other) const
non equality operator.
Unit(std::string name, std::string numerator, std::string denominator, std::string offset, const std::vector< RefUnit > &ref_units={})
CTOR.
Unit & operator=(const Unit &)=default
copy assignment operator
Unit(const Unit &)=default
copy CTOR
const RefUnits & getRefUnits() const
return the refUnits container
const std::string & getOffset() const
Get the Offset.
virtual ~Unit()=default
DTOR.
bool operator==(const Unit &other) const
equality operator.
definition of the datamodel namespace
Definition datamodel_base.h:28
utility::ModelSubjectUtility< TYPE, ModelEventCode > ModelSubject
Subject template class that is observable.
Definition datamodel_base.h:187
ModelEventCode
Model event code for the data model observer.
Definition datamodel_base.h:34
ModelSubjectUtility< T, TypeAccessMapEventCode > TypeAccessMapSubject
helper template to observe map content.
Definition access_map.h:61
TypeAccessMapEventCode
Internal event code to inform the parent DD Object about the change of an item within the list.
Definition access_map.h:37
definition of the dd namespace
Definition datamodel_base.h:26
TypeOfUnit
Classification of unit.
Definition dd_common_types.h:76
definition of the ddl namespace
Definition codec.h:21