CARMA C++
|
The Pressure class can represent any pressure in any units. More...
#include <carma/services/Pressure.h>
Public Member Functions | |
double | atmosphere () const |
Convenience method that returns the value of this pressure in atmospheres. More... | |
double | millibar () const |
Convenience method that returns the value of this pressure in millibars. More... | |
const Pressure | operator+ (const Pressure &pressure) const |
Add two Pressures. More... | |
Pressure & | operator+= (const Pressure &pressure) |
Increment Pressure. More... | |
const Pressure | operator- (const Pressure &pressure) const |
Subtract two Pressures. More... | |
Pressure & | operator-= (const Pressure &pressure) |
Decrement Pressure. More... | |
bool | operator< (const Pressure &pressure) const |
Compare two pressures. More... | |
bool | operator> (const Pressure &pressure) const |
Compare two pressures. More... | |
Pressure (double value, const std::string &units) | |
Construct an Pressure given a value and units. More... | |
virtual | ~Pressure () |
Destructor. More... | |
![]() | |
ConformableQuantity (double value, const std::string &units) | |
Construct an ConformableQuantity given a value and units. More... | |
virtual double | convert (const std::string &convertTo) const |
Converts this quantity to any conformable units. More... | |
virtual std::string | getUnits () const |
double | getValue () const |
virtual const ConformableQuantity | operator+ (const ConformableQuantity &quantity) const |
Add two ConformableQuantities. More... | |
virtual ConformableQuantity & | operator+= (const ConformableQuantity &quantity) |
Add ConformableQuantity to itself. More... | |
virtual const ConformableQuantity | operator- (const ConformableQuantity &quantity) const |
Subtract two ConformableQuantities. More... | |
virtual ConformableQuantity & | operator-= (const ConformableQuantity &quantity) |
Subtract ConformableQuantity from itself. More... | |
virtual void | reset (double value, const std::string &units) |
Reset method to change value and/or units. More... | |
virtual | ~ConformableQuantity () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
Units | u_ |
Used for converting between units. More... | |
The Pressure class can represent any pressure in any units.
It uses the Units class internally to handle conversion of any pressure unit to any other pressure unit. For example,
Pressure pressure1(100.0,"mbar")
both
Pressure pressure2(1.23,"atmospheres")
pressure1
and pressure2
represent the same physical quantity. Binary operations + and - are supported, as is the stream operation <<.
Definition at line 38 of file Pressure.h.
carma::services::Pressure::Pressure | ( | double | value, |
const std::string & | units | ||
) |
Construct an Pressure given a value and units.
value | The value of this pressure |
units | The units of the value. |
|
virtual |
Destructor.
double carma::services::Pressure::atmosphere | ( | ) | const |
Convenience method that returns the value of this pressure in atmospheres.
double carma::services::Pressure::millibar | ( | ) | const |
Convenience method that returns the value of this pressure in millibars.
bool carma::services::Pressure::operator< | ( | const Pressure & | pressure | ) | const |
Compare two pressures.
ConformabilityException |
bool carma::services::Pressure::operator> | ( | const Pressure & | pressure | ) | const |
Compare two pressures.
ConformabilityException |