#include <SEScalar.h>

Inherits SEProperty.

Inherited by SEScalar0To1, SEScalarNegative1To1, and SEUnitScalar.

Public Member Functions

 SEScalar ()
 
virtual ~SEScalar ()
 
virtual void Clear ()
 
virtual void Invalidate ()
 
bool Set (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)
 
void Average (int cnt)
 
bool Equals (const SEScalar &to) const
 
virtual void ToString (std::ostream &str) const
 
- Public Member Functions inherited from SEProperty
 SEProperty ()
 
virtual ~SEProperty ()
 

Static Public Member Functions

static double dNaN ()
 
static bool IsZero (double value, double limit)
 
static bool IsValue (double target, double value)
 

Static Public Attributes

static unsigned long long int NaN
 

Protected Attributes

double m_value
 
bool m_isnan
 
bool m_isinf
 
bool m_readOnly
 

Friends

class PBProperty
 

Constructor & Destructor Documentation

◆ SEScalar()

SEScalar::SEScalar ( )

◆ ~SEScalar()

SEScalar::~SEScalar ( )
virtual

Member Function Documentation

◆ Average()

void SEScalar::Average ( int  cnt)

◆ Clear()

void SEScalar::Clear ( )
virtual

Reimplemented from SEProperty.

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

◆ 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

◆ 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 SEScalarQuantity< Unit >, SEScalarQuantity< ElectricResistanceUnit >, SEScalarQuantity< AmountPerVolumeUnit >, SEScalarQuantity< VolumePerPressureUnit >, SEScalarQuantity< HeatInductanceUnit >, SEScalarQuantity< OsmolalityUnit >, SEScalarQuantity< VolumePerTimeUnit >, SEScalarQuantity< MassPerTimeUnit >, SEScalarQuantity< HeatCapacitancePerMassUnit >, SEScalarQuantity< LengthPerTimeUnit >, SEScalarQuantity< FlowComplianceUnit >, SEScalarQuantity< LengthUnit >, SEScalarQuantity< MassPerVolumeUnit >, SEScalarQuantity< PressureUnit >, SEScalarQuantity< PowerUnit >, SEScalarQuantity< MassPerMassUnit >, SEScalarQuantity< ElectricCapacitanceUnit >, SEScalarQuantity< MassPerAmountUnit >, SEScalarQuantity< FlowInertanceUnit >, SEScalarQuantity< MassUnit >, SEScalarQuantity< VolumeUnit >, SEScalarQuantity< HeatCapacitanceUnit >, SEScalarQuantity< PressurePerVolumeUnit >, SEScalarQuantity< EnergyPerAmountUnit >, SEScalarQuantity< ElectricCurrentUnit >, SEScalarQuantity< AmountPerTimeUnit >, SEScalarQuantity< ElectricPotentialUnit >, SEScalarQuantity< AmountUnit >, SEScalarQuantity< AreaPerTimePressureUnit >, SEScalarQuantity< LengthPerTimePressureUnit >, SEScalarQuantity< PowerPerAreaTemperatureToTheFourthUnit >, SEScalarQuantity< PressureTimePerVolumeAreaUnit >, SEScalarQuantity< ElectricInductanceUnit >, SEScalarQuantity< HeatCapacitancePerAmountUnit >, SEScalarQuantity< OsmolarityUnit >, SEScalarQuantity< FlowResistanceUnit >, SEScalarQuantity< VolumePerTimePressureUnit >, SEScalarQuantity< PressureTimePerAreaUnit >, SEScalarQuantity< HeatConductanceUnit >, SEScalarQuantity< FlowElastanceUnit >, SEScalarQuantity< ForceUnit >, SEScalarQuantity< AreaUnit >, SEScalarQuantity< AmountPerMassUnit >, SEScalarQuantity< InversePressureUnit >, SEScalarQuantity< TimeUnit >, SEScalarQuantity< MassPerAreaTimeUnit >, SEScalarQuantity< InverseVolumeUnit >, SEScalarQuantity< HeatConductancePerAreaUnit >, SEScalarQuantity< HeatResistanceAreaUnit >, SEScalarQuantity< EnergyPerMassUnit >, SEScalarQuantity< EnergyUnit >, SEScalarQuantity< TemperatureUnit >, SEScalarQuantity< VolumePerTimePressureAreaUnit >, SEScalarQuantity< VolumePerTimeAreaUnit >, SEScalarQuantity< FrequencyUnit >, SEScalarQuantity< ElectricChargeUnit >, SEScalarQuantity< HeatResistanceUnit >, SEScalarQuantity< VolumePerTimeMassUnit >, and SEUnitScalar.

◆ IsInfinity()

bool SEScalar::IsInfinity ( ) const
inline

◆ IsNegative()

bool SEScalar::IsNegative ( ) const

◆ IsPositive()

bool SEScalar::IsPositive ( ) const

◆ IsReadOnly()

bool SEScalar::IsReadOnly ( ) const

◆ IsValid()

bool SEScalar::IsValid ( ) const
virtual

Implements SEProperty.

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

◆ 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

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

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

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

Friends And Related Function Documentation

◆ PBProperty

friend class PBProperty
friend

Member Data Documentation

◆ m_isinf

bool SEScalar::m_isinf
protected

◆ m_isnan

bool SEScalar::m_isnan
protected

◆ m_readOnly

bool SEScalar::m_readOnly
protected

◆ m_value

double SEScalar::m_value
protected

◆ NaN

unsigned long long int SEScalar::NaN
static
Initial value:
=
((unsigned long long int)255 << (8*7)) +
((unsigned long long int)(255-8) << (8*6)) +
((unsigned long long int)255 << (8*5)) +
((unsigned long long int)255 << (8*4)) +
((unsigned long long int)255 << (8*3)) +
(255 << (8*2)) +
(255 << (8*1)) +
255