SEScalarQuantity< Unit > Class Template Reference

#include <SEScalar.h>

Inherits SEUnitScalar.

Public Member Functions

 SEScalarQuantity ()
 
virtual ~SEScalarQuantity ()
 
void Invalidate () override
 
void ForceInvalidate () override
 
bool IsValid () const override
 
virtual bool Set (const SEScalarQuantity< Unit > &s)
 
virtual void Copy (const SEScalarQuantity< Unit > &s)
 
virtual bool Force (const SEScalarQuantity< Unit > &s)
 
bool HasUnit () const override
 
const Unit * GetUnit () const override
 
double GetValue () const =delete
 
double GetValue (int precision) const =delete
 
virtual double GetValue (const Unit &unit) const
 
virtual double GetValue (const Unit &unit, int decimal_places) const
 
void SetValue (double d)=delete
 
virtual void SetValue (double d, const Unit &unit)
 
void ForceValue (double d)=delete
 
virtual void ForceValue (double d, const Unit &unit)
 
double Increment (const SEScalar &s)=delete
 
virtual double Increment (const SEScalarQuantity &s)
 
double Increment (double d)=delete
 
virtual double Increment (double d, const Unit &unit)
 
double ForceIncrement (double d)=delete
 
virtual double ForceIncrement (double d, const Unit &unit)
 
bool Equals (const SEScalar &to) const =delete
 
virtual bool Equals (const SEScalarQuantity< Unit > &to) const
 
std::string ToString () const override
 
void ToString (std::ostream &str) const override
 
- Public Member Functions inherited from SEUnitScalar
 SEUnitScalar ()
 
virtual ~SEUnitScalar ()
 
bool IsValid () const override=0
 
void Invalidate () override=0
 
void ForceInvalidate () override=0
 
virtual bool HasUnit () const =0
 
virtual const CCompoundUnitGetUnit () const =0
 
virtual bool Set (const SEScalar &s)=0
 
virtual bool Force (const SEScalar &s)=0
 
virtual void Copy (const SEScalar &s)=0
 
virtual double GetValue (const CCompoundUnit &unit) const =0
 
virtual double GetValue (const CCompoundUnit &unit, int decimal_places) const =0
 
virtual void SetValue (double d, const CCompoundUnit &unit)=0
 
virtual void ForceValue (double d, const CCompoundUnit &unit)=0
 
virtual double Increment (double d, const CCompoundUnit &unit)=0
 
virtual double ForceIncrement (double d, const CCompoundUnit &unit)=0
 
- Public Member Functions inherited from SEScalar
 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
 
- Public Member Functions inherited from SEProperty
 SEProperty ()
 
virtual ~SEProperty ()
 
virtual void Invalidate ()=0
 
virtual bool IsValid () const =0
 

Protected Member Functions

bool Set (const SEScalar &s) override
 
void Copy (const SEScalar &s) override
 
bool Force (const SEScalar &s) override
 
double GetValue (const CCompoundUnit &unit) const override
 
double GetValue (const CCompoundUnit &unit, int decimal_places) const override
 
void SetValue (double d, const CCompoundUnit &unit) override
 
void ForceValue (double d, const CCompoundUnit &unit) override
 
double Increment (double d, const CCompoundUnit &unit) override
 
double ForceIncrement (double d, const CCompoundUnit &unit) override
 
const CCompoundUnitGetCompoundUnit (const std::string &unit) const override
 
virtual const CCompoundUnitGetCompoundUnit (const std::string &unit) const =0
 

Protected Attributes

const Unit * m_unit =nullptr
 
- Protected Attributes inherited from SEScalar
double m_value
 
bool m_isnan =true
 
bool m_isinf =false
 
bool m_readOnly =false
 

Friends

class PBProperty
 

Additional Inherited Members

- Static Public Member Functions inherited from SEScalar
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)
 

Constructor & Destructor Documentation

◆ SEScalarQuantity()

template<typename Unit >
SEScalarQuantity< Unit >::SEScalarQuantity ( )
inline

◆ ~SEScalarQuantity()

template<typename Unit >
SEScalarQuantity< Unit >::~SEScalarQuantity
virtual

Member Function Documentation

◆ Copy() [1/2]

template<typename Unit >
void SEScalarQuantity< Unit >::Copy ( const SEScalar s)
overrideprotectedvirtual

Implements SEUnitScalar.

◆ Copy() [2/2]

template<typename Unit >
void SEScalarQuantity< Unit >::Copy ( const SEScalarQuantity< Unit > &  s)
virtual

◆ Equals() [1/2]

template<typename Unit >
bool SEScalarQuantity< Unit >::Equals ( const SEScalar to) const
delete

◆ Equals() [2/2]

template<typename Unit >
bool SEScalarQuantity< Unit >::Equals ( const SEScalarQuantity< Unit > &  to) const
virtual

◆ Force() [1/2]

template<typename Unit >
bool SEScalarQuantity< Unit >::Force ( const SEScalar s)
overrideprotectedvirtual

Implements SEUnitScalar.

◆ Force() [2/2]

template<typename Unit >
bool SEScalarQuantity< Unit >::Force ( const SEScalarQuantity< Unit > &  s)
virtual

◆ ForceIncrement() [1/3]

template<typename Unit >
double SEScalarQuantity< Unit >::ForceIncrement ( double  d)
delete

◆ ForceIncrement() [2/3]

template<typename Unit >
double SEScalarQuantity< Unit >::ForceIncrement ( double  d,
const CCompoundUnit unit 
)
overrideprotectedvirtual

Implements SEUnitScalar.

◆ ForceIncrement() [3/3]

template<typename Unit >
double SEScalarQuantity< Unit >::ForceIncrement ( double  d,
const Unit &  unit 
)
virtual

◆ ForceInvalidate()

template<typename Unit >
void SEScalarQuantity< Unit >::ForceInvalidate
overridevirtual

Implements SEUnitScalar.

◆ ForceValue() [1/3]

template<typename Unit >
void SEScalarQuantity< Unit >::ForceValue ( double  d)
delete

◆ ForceValue() [2/3]

template<typename Unit >
void SEScalarQuantity< Unit >::ForceValue ( double  d,
const CCompoundUnit unit 
)
overrideprotectedvirtual

Implements SEUnitScalar.

◆ ForceValue() [3/3]

template<typename Unit >
void SEScalarQuantity< Unit >::ForceValue ( double  d,
const Unit &  unit 
)
virtual

◆ GetCompoundUnit()

template<typename Unit >
const CCompoundUnit * SEScalarQuantity< Unit >::GetCompoundUnit ( const std::string &  unit) const
overrideprotectedvirtual

Implements SEUnitScalar.

◆ GetUnit()

template<typename Unit >
const Unit * SEScalarQuantity< Unit >::GetUnit
overridevirtual

Implements SEUnitScalar.

◆ GetValue() [1/6]

template<typename Unit >
double SEScalarQuantity< Unit >::GetValue ( ) const
delete

◆ GetValue() [2/6]

template<typename Unit >
double SEScalarQuantity< Unit >::GetValue ( const CCompoundUnit unit) const
overrideprotectedvirtual

Implements SEUnitScalar.

◆ GetValue() [3/6]

template<typename Unit >
double SEScalarQuantity< Unit >::GetValue ( const CCompoundUnit unit,
int  decimal_places 
) const
overrideprotectedvirtual

Implements SEUnitScalar.

◆ GetValue() [4/6]

template<typename Unit >
double SEScalarQuantity< Unit >::GetValue ( const Unit &  unit) const
virtual

◆ GetValue() [5/6]

template<typename Unit >
double SEScalarQuantity< Unit >::GetValue ( const Unit &  unit,
int  decimal_places 
) const
virtual

◆ GetValue() [6/6]

template<typename Unit >
double SEScalarQuantity< Unit >::GetValue ( int  precision) const
delete

◆ HasUnit()

template<typename Unit >
bool SEScalarQuantity< Unit >::HasUnit
overridevirtual

Implements SEUnitScalar.

◆ Increment() [1/5]

template<typename Unit >
double SEScalarQuantity< Unit >::Increment ( const SEScalar s)
delete

◆ Increment() [2/5]

template<typename Unit >
double SEScalarQuantity< Unit >::Increment ( const SEScalarQuantity< Unit > &  s)
virtual

◆ Increment() [3/5]

template<typename Unit >
double SEScalarQuantity< Unit >::Increment ( double  d)
delete

◆ Increment() [4/5]

template<typename Unit >
double SEScalarQuantity< Unit >::Increment ( double  d,
const CCompoundUnit unit 
)
overrideprotectedvirtual

Implements SEUnitScalar.

◆ Increment() [5/5]

template<typename Unit >
double SEScalarQuantity< Unit >::Increment ( double  d,
const Unit &  unit 
)
virtual

◆ Invalidate()

template<typename Unit >
void SEScalarQuantity< Unit >::Invalidate
overridevirtual

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

Implements SEUnitScalar.

◆ IsValid()

template<typename Unit >
bool SEScalarQuantity< Unit >::IsValid
overridevirtual

Implements SEUnitScalar.

◆ Set() [1/2]

template<typename Unit >
bool SEScalarQuantity< Unit >::Set ( const SEScalar s)
overrideprotectedvirtual

Implements SEUnitScalar.

◆ Set() [2/2]

template<typename Unit >
bool SEScalarQuantity< Unit >::Set ( const SEScalarQuantity< Unit > &  s)
virtual

◆ SetValue() [1/3]

template<typename Unit >
void SEScalarQuantity< Unit >::SetValue ( double  d)
delete

◆ SetValue() [2/3]

template<typename Unit >
void SEScalarQuantity< Unit >::SetValue ( double  d,
const CCompoundUnit unit 
)
overrideprotectedvirtual

Implements SEUnitScalar.

◆ SetValue() [3/3]

template<typename Unit >
void SEScalarQuantity< Unit >::SetValue ( double  d,
const Unit &  unit 
)
virtual

◆ ToString() [1/2]

template<typename Unit >
std::string SEScalarQuantity< Unit >::ToString
overridevirtual

Reimplemented from SEScalar.

◆ ToString() [2/2]

template<typename Unit >
void SEScalarQuantity< Unit >::ToString ( std::ostream &  str) const
overridevirtual

Reimplemented from SEScalar.

Friends And Related Function Documentation

◆ PBProperty

template<typename Unit >
friend class PBProperty
friend

Member Data Documentation

◆ m_unit

template<typename Unit >
const Unit* SEScalarQuantity< Unit >::m_unit =nullptr
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.