#include <SEScalar.h>

Public Member Functions | |
SEScalar () | |
virtual | ~SEScalar () |
void | Invalidate () override |
virtual void | ForceInvalidate () |
bool | Set (const SEScalar &s) |
bool | Force (const SEScalar &s) |
void | Copy (const SEScalar &s) |
bool | IsValid () const override |
bool | IsInfinity () const |
bool | IsPositive () const |
bool | IsNegative () const |
bool | IsZero (double limit=ZERO_APPROX) const |
void | SetReadOnly (bool b) |
bool | IsReadOnly () const |
double | GetValue () const |
double | GetValue (int precision) const |
void | SetValue (double d) |
void | ForceValue (double d) |
double | Increment (const SEScalar &s) |
double | Increment (double d) |
double | ForceIncrement (double d) |
double | Multiply (double d) |
void | Average (int cnt) |
bool | Equals (const SEScalar &to) const |
virtual std::string | ToString () const |
virtual void | ToString (std::ostream &str) const |
![]() | |
SEProperty () | |
virtual | ~SEProperty () |
Static Public Member Functions | |
static double | dNaN () |
static bool | IsNumber (double d) |
static bool | IsZero (double value, double limit) |
static bool | IsValue (double target, double value) |
static double | Truncate (double value, int decimal_places) |
Protected Attributes | |
double | m_value |
bool | m_isnan =true |
bool | m_isinf =false |
bool | m_readOnly =false |
Friends | |
class | PBProperty |
Constructor & Destructor Documentation
◆ SEScalar()
SEScalar::SEScalar | ( | ) |
◆ ~SEScalar()
|
virtual |
Member Function Documentation
◆ Average()
void SEScalar::Average | ( | int | cnt | ) |
◆ Copy()
void SEScalar::Copy | ( | const SEScalar & | s | ) |
Copies the entire contents of the provided scalar to this. Even if s is invalid.
◆ dNaN()
|
static |
◆ Equals()
bool SEScalar::Equals | ( | const SEScalar & | to | ) | const |
◆ Force()
bool SEScalar::Force | ( | const SEScalar & | s | ) |
◆ ForceIncrement()
double SEScalar::ForceIncrement | ( | double | d | ) |
◆ ForceInvalidate()
|
virtual |
Reimplemented in SEUnitScalar, SEScalarQuantity< Unit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< VolumePerTimePressureAreaUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< HeatResistanceUnit >, SEScalarQuantity< ElectricChargeUnit >, SEScalarEnum< Enum >, SEScalarEnum< eSwitch >, and SEScalarEnum< eBreathState >.
◆ ForceValue()
void SEScalar::ForceValue | ( | double | d | ) |
◆ GetValue() [1/2]
double SEScalar::GetValue | ( | ) | const |
◆ GetValue() [2/2]
double SEScalar::GetValue | ( | int | precision | ) | const |
◆ Increment() [1/2]
double SEScalar::Increment | ( | const SEScalar & | s | ) |
◆ Increment() [2/2]
double SEScalar::Increment | ( | double | d | ) |
◆ Invalidate()
|
overridevirtual |
Sets the value to NaN and removes the unit Note that this does not affect bounds
Implements SEProperty.
Reimplemented in SEUnitScalar, SEScalarQuantity< Unit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< VolumePerTimePressureAreaUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< HeatResistanceUnit >, SEScalarQuantity< ElectricChargeUnit >, SEScalarEnum< Enum >, SEScalarEnum< eSwitch >, and SEScalarEnum< eBreathState >.
◆ IsInfinity()
|
inline |
◆ IsNegative()
bool SEScalar::IsNegative | ( | ) | const |
◆ IsNumber()
|
static |
◆ IsPositive()
bool SEScalar::IsPositive | ( | ) | const |
◆ IsReadOnly()
bool SEScalar::IsReadOnly | ( | ) | const |
◆ IsValid()
|
overridevirtual |
Implements SEProperty.
Reimplemented in SEUnitScalar, SEScalarQuantity< Unit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< VolumePerTimePressureAreaUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< HeatResistanceUnit >, and SEScalarQuantity< ElectricChargeUnit >.
◆ IsValue()
|
static |
◆ IsZero() [1/2]
bool SEScalar::IsZero | ( | double | limit = ZERO_APPROX | ) | const |
◆ IsZero() [2/2]
|
static |
◆ Multiply()
double SEScalar::Multiply | ( | double | d | ) |
◆ Set()
bool SEScalar::Set | ( | const SEScalar & | s | ) |
Copies ONLY the value and unit ONLY if the provided scalar is valid.
◆ SetReadOnly()
void SEScalar::SetReadOnly | ( | bool | b | ) |
◆ SetValue()
void SEScalar::SetValue | ( | double | d | ) |
◆ ToString() [1/2]
|
virtual |
Reimplemented in SEScalarQuantity< Unit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< VolumePerTimePressureAreaUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< HeatResistanceUnit >, and SEScalarQuantity< ElectricChargeUnit >.
◆ ToString() [2/2]
|
virtual |
Reimplemented in SEScalarQuantity< Unit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< VolumePerTimePressureAreaUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< HeatResistanceUnit >, and SEScalarQuantity< ElectricChargeUnit >.
◆ Truncate()
|
static |
Friends And Related Function Documentation
◆ PBProperty
|
friend |
Member Data Documentation
◆ m_isinf
|
protected |
◆ m_isnan
|
protected |
◆ m_readOnly
|
protected |
◆ m_value
|
protected |