Loading...
Searching...
No Matches
HydroCouple::IUnit Class Referenceabstract

IUnit interface, describing the physical unit of a IQuantity. More...

#include <hydrocouple.h>

Inheritance diagram for HydroCouple::IUnit:
Collaboration diagram for HydroCouple::IUnit:

Public Types

enum class  DistanceUnits {
  Meters ,
  Kilometers ,
  Feet ,
  NauticalMiles ,
  Yards ,
  Miles ,
  Degrees ,
  Centimeters ,
  Millimeters ,
  Inches ,
  Unknown
}
 HydroCouple::DistanceUnits are the types of units that can be used to measure distance. More...
 

Public Member Functions

virtual ~IUnit ()=default
 IUnit::~IUnit is a virtual destructor.
 
virtual IUnitDimensions * dimensions () const =0
 Fundamental dimensions of the unit.
 
virtual double conversionFactorToSI () const =0
 Conversion factor to SI ('A' in: SI-value = A * quant-value + B)
 
virtual double offsetToSI () const =0
 OffSet to SI ('B' in: SI-value = A * quant-value + B).
 
virtual std::string symbol () const =0
 The unit as a UDUNITS-2 string, e.g.
 
virtual std::string ucumCode () const =0
 The unit as a case-sensitive UCUM code, e.g.
 
- Public Member Functions inherited from HydroCouple::IDescription
virtual ~IDescription ()=default
 IDescription::~IDescription is a virtual destructor.
 
virtual const std::string & caption () const =0
 Gets caption for the entity.
 
virtual void setCaption (const std::string &caption)=0
 Sets caption for the entity.
 
virtual const std::string & description () const =0
 Gets additional descriptive information for the entity.
 
virtual void setDescription (const std::string &description)=0
 Gets additional descriptive information for the entity.
 
- Public Member Functions inherited from HydroCouple::IPropertyChanged
virtual ~IPropertyChanged ()=default
 IPropertyChanged::~IPropertyChanged is a virtual destructor.
 
- Public Member Functions inherited from HydroCouple::ISignal< std::string >
virtual ~ISignal ()=default
 ISignal::~ISignal is a virtual destructor.
 
virtual void connect (const std::shared_ptr< ISlot< Args... > > &slot)=0
 connect is used to connect a slot to the signal.
 
virtual void disconnect (const std::shared_ptr< ISlot< Args... > > &slot)=0
 disconnect is used to disconnect a slot from the signal.
 
virtual void blockSignals (bool block)=0
 blockSignals is used to block signals from being emitted.
 

Additional Inherited Members

- Protected Member Functions inherited from HydroCouple::ISignal< std::string >
virtual void emit (Args... args)=0
 emit is used to emit the signal.
 

Detailed Description

IUnit interface, describing the physical unit of a IQuantity.

Member Enumeration Documentation

◆ DistanceUnits

HydroCouple::DistanceUnits are the types of units that can be used to measure distance.

Enumerator
Meters 

Meters.

Kilometers 

Kilometers.

Feet 

Feet.

NauticalMiles 

NauticalMiles.

Yards 

Yards.

Miles 

Miles.

Degrees 

Degrees (angular; only meaningful for geographic reference systems).

Centimeters 

Centimeters.

Millimeters 

Millimeters.

Inches 

Inches.

Unknown 

Unknown.

Constructor & Destructor Documentation

◆ ~IUnit()

virtual HydroCouple::IUnit::~IUnit ( )
virtualdefault

IUnit::~IUnit is a virtual destructor.

Member Function Documentation

◆ conversionFactorToSI()

virtual double HydroCouple::IUnit::conversionFactorToSI ( ) const
nodiscardpure virtual

Conversion factor to SI ('A' in: SI-value = A * quant-value + B)

◆ dimensions()

virtual IUnitDimensions * HydroCouple::IUnit::dimensions ( ) const
nodiscardpure virtual

Fundamental dimensions of the unit.

◆ offsetToSI()

virtual double HydroCouple::IUnit::offsetToSI ( ) const
nodiscardpure virtual

OffSet to SI ('B' in: SI-value = A * quant-value + B).

◆ symbol()

virtual std::string HydroCouple::IUnit::symbol ( ) const
nodiscardpure virtual

The unit as a UDUNITS-2 string, e.g.

"m3 s-1" or "ft3/s".

What a CF units attribute carries, so persistence can write the unit without a side table. It must agree with dimensions(), conversionFactorToSI() and offsetToSI(). An empty string means not declared.

◆ ucumCode()

virtual std::string HydroCouple::IUnit::ucumCode ( ) const
nodiscardpure virtual

The unit as a case-sensitive UCUM code, e.g.

"m3/s" or "[ft_i]3/s".

The form unit registries and QUDT exchange. An empty string means not declared.


The documentation for this class was generated from the following file: