HydroCouple  2.0.0
HydroCouple Interface Definitions
Loading...
Searching...
No Matches
HydroCouple::IUnitDimensions Class Referenceabstract

Defines the order of dimension in each FundamentalDimension for a unit. More...

#include <hydrocouple.h>

Inheritance diagram for HydroCouple::IUnitDimensions:
Collaboration diagram for HydroCouple::IUnitDimensions:

Public Types

enum  FundamentalUnitDimension {
  Length ,
  Mass ,
  Time ,
  ElectricCurrent ,
  Temperature ,
  AmountOfSubstance ,
  LuminousIntensity ,
  Currency ,
  Unitless
}
 HydroCouple::FundamentalUnitDimension are the fundamental units that can be combined to form all types of units. More...
 

Public Member Functions

virtual ~IUnitDimensions ()=default
 IUnitDimensions::~IUnitDimensions is a virtual destructor.
 
virtual double power (HydroCouple::IUnitDimensions::FundamentalUnitDimension dimension)=0
 Returns the power for the requested dimension.
 
- Public Member Functions inherited from HydroCouple::IDescription
virtual ~IDescription ()=default
 IDescription::~IDescription is a virtual destructor.
 
virtual string caption () const =0
 Gets caption for the entity.
 
virtual void setCaption (const string &caption)=0
 Sets caption for the entity.
 
virtual string description () const =0
 Gets additional descriptive information for the entity.
 
virtual void setDescription (const 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< string >
virtual ~ISignal ()=default
 ISignal::~ISignal is a virtual destructor.
 
virtual void connect (const shared_ptr< ISlot< Args... > > &slot)=0
 connect is used to connect a slot to the signal.
 
virtual void disconnect (const 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< string >
virtual void emit (Args... args)=0
 emit is used to emit the signal.
 

Detailed Description

Defines the order of dimension in each FundamentalDimension for a unit.

Member Enumeration Documentation

◆ FundamentalUnitDimension

HydroCouple::FundamentalUnitDimension are the fundamental units that can be combined to form all types of units.

Enumerator
Length 

Fundamental dimension for length.

Mass 

Fundamental dimension for mass.

Time 

Fundamental dimension for time.

ElectricCurrent 

Fundamental dimension for electric current.

Temperature 

Fundamental dimension for temperature.

AmountOfSubstance 

Fundamental dimension for amount of substance.

LuminousIntensity 

Fundamental dimension for luminous intensity.

Currency 

Fundamental dimension for currency.

Unitless 

Fundamental dimension for unitless quantities.

Constructor & Destructor Documentation

◆ ~IUnitDimensions()

virtual HydroCouple::IUnitDimensions::~IUnitDimensions ( )
virtualdefault

IUnitDimensions::~IUnitDimensions is a virtual destructor.

Member Function Documentation

◆ power()

virtual double HydroCouple::IUnitDimensions::power ( HydroCouple::IUnitDimensions::FundamentalUnitDimension  dimension)
pure virtual

Returns the power for the requested dimension.

Parameters
[in]dimensionrepresents the fundamental unit.

For a quantity such as flow, which may have the unit m3/s, The getPower method must work as follows:

  • getPower( FundamentalUnitDimension::AmountOfSubstance )
    Returns
    0
  • getPower( FundamentalUnitDimension::Currency )
    Returns
    0
  • getPower( FundamentalUnitDimension::ElectricCurrent )
    Returns
    0
  • getPower( FundamentalUnitDimension::Length )
    Returns
    3
  • getPower( FundamentalUnitDimension::LuminousIntensity )
    Returns
    0
  • getPower( FundamentalUnitDimension::Mass )
    Returns
    0
  • getPower( FundamentalUnitDimension::Temperature )
    Returns
    0
  • getPower( FundamentalUnitDimension::Time )
    Returns
    -1

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