#include <SEScalar.h>

Inherits SEProperty.

Inherited by SEScalarEnum< eSwitch >, SEScalarEnum< eBreathState >, SEScalar0To1, SEScalarEnum< Enum >, SEScalarNegative1To1, and SEUnitScalar.

Public Member Functions

 SEScalar ()
 
virtual ~SEScalar ()
 
virtual void Invalidate ()
 
virtual void ForceInvalidate ()
 
bool Set (const SEScalar &s)
 
bool Force (const SEScalar &s)
 
void Copy (const SEScalar &s)
 
virtual bool IsValid () const
 
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
 
void SetValue (double d)
 
void ForceValue (double d)
 
double Increment (const SEScalar &s)
 
double IncrementValue (double d)
 
double ForceIncrementValue (double d)
 
double Multiply (const SEScalar &s)
 
double MultiplyValue (double d)
 
void Average (int cnt)
 
bool Equals (const SEScalar &to) const
 
virtual std::string ToString () const
 
virtual void ToString (std::ostream &str) const
 
- Public Member Functions inherited from SEProperty
 SEProperty ()
 
virtual ~SEProperty ()
 
virtual void Invalidate ()=0
 
virtual bool IsValid () const =0
 

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)
 

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()

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()

double SEScalar::dNaN ( )
static

◆ Equals()

bool SEScalar::Equals ( const SEScalar to) const

◆ Force()

bool SEScalar::Force ( const SEScalar s)

◆ ForceIncrementValue()

double SEScalar::ForceIncrementValue ( double  d)

◆ ForceInvalidate()

void SEScalar::ForceInvalidate ( )
virtual

Reimplemented in SEScalarEnum< Enum >, SEScalarEnum< eSwitch >, SEScalarEnum< eBreathState >, SEScalarQuantity< Unit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricChargeUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< HeatResistanceUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, SEScalarQuantity< VolumePerTimePressureAreaUnit >, and SEUnitScalar.

◆ ForceValue()

void SEScalar::ForceValue ( double  d)

◆ GetValue()

double SEScalar::GetValue ( ) const

◆ Increment()

double SEScalar::Increment ( const SEScalar s)

◆ IncrementValue()

double SEScalar::IncrementValue ( double  d)

◆ Invalidate()

void SEScalar::Invalidate ( )
virtual

Sets the value to NaN and removes the unit Note that this does not affect bounds

Implements SEProperty.

Reimplemented in SEScalarEnum< Enum >, SEScalarEnum< eSwitch >, SEScalarEnum< eBreathState >, SEScalarQuantity< Unit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricChargeUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< HeatResistanceUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, SEScalarQuantity< VolumePerTimePressureAreaUnit >, and SEUnitScalar.

◆ IsInfinity()

bool SEScalar::IsInfinity ( ) const
inline

◆ IsNegative()

bool SEScalar::IsNegative ( ) const

◆ IsNumber()

bool SEScalar::IsNumber ( double  d)
static

◆ IsPositive()

bool SEScalar::IsPositive ( ) const

◆ IsReadOnly()

bool SEScalar::IsReadOnly ( ) const

◆ IsValid()

bool SEScalar::IsValid ( ) const
virtual

Implements SEProperty.

Reimplemented in SEUnitScalar, SEScalarQuantity< Unit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricChargeUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< HeatResistanceUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, and SEScalarQuantity< VolumePerTimePressureAreaUnit >.

◆ IsValue()

bool SEScalar::IsValue ( double  target,
double  value 
)
static

◆ IsZero() [1/2]

bool SEScalar::IsZero ( double  limit = ZERO_APPROX) const

◆ IsZero() [2/2]

bool SEScalar::IsZero ( double  value,
double  limit 
)
static

◆ Multiply()

double SEScalar::Multiply ( const SEScalar s)

◆ MultiplyValue()

double SEScalar::MultiplyValue ( 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]

std::string SEScalar::ToString ( ) const
virtual

Reimplemented in SEScalarQuantity< Unit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricChargeUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< HeatResistanceUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, and SEScalarQuantity< VolumePerTimePressureAreaUnit >.

◆ ToString() [2/2]

void SEScalar::ToString ( std::ostream &  str) const
virtual

Reimplemented in SEScalarQuantity< Unit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< ElectricChargeUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< EquivalentWeightPerVolumeUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< HeatResistanceUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< PressureTimePerVolumeUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< PressureTimeSquaredPerVolumeUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, and SEScalarQuantity< VolumePerTimePressureAreaUnit >.

Friends And Related Function Documentation

◆ PBProperty

friend class PBProperty
friend

Member Data Documentation

◆ m_isinf

bool SEScalar::m_isinf =false
protected

◆ m_isnan

bool SEScalar::m_isnan =true
protected

◆ m_readOnly

bool SEScalar::m_readOnly =false
protected

◆ m_value

double SEScalar::m_value
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.