SEScalarQuantity< Unit > Class Template Reference

#include <SEScalar.h>

Inherits SEUnitScalar.

Public Member Functions

 SEScalarQuantity ()
 
virtual ~SEScalarQuantity ()
 
virtual void Invalidate () override
 
virtual void ForceInvalidate () override
 
virtual 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
 
virtual double GetValue (const Unit &unit) 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 IncrementValue (double d)=delete
 
virtual double IncrementValue (double d, const Unit &unit)
 
double ForceIncrementValue (double d)=delete
 
virtual double ForceIncrementValue (double d, const Unit &unit)
 
double MultiplyValue (double d)=delete
 
virtual double MultiplyValue (double d, const Unit &unit)
 
double Multiply (const SEScalar &s)=delete
 
virtual double Multiply (const SEScalarQuantity &s)
 
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 ()
 
virtual bool IsValid () const =0
 
virtual void Invalidate ()=0
 
virtual void ForceInvalidate ()=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 void SetValue (double d, const CCompoundUnit &unit)=0
 
virtual void ForceValue (double d, const CCompoundUnit &unit)=0
 
virtual double IncrementValue (double d, const CCompoundUnit &unit)=0
 
virtual double ForceIncrementValue (double d, const CCompoundUnit &unit)=0
 
virtual double MultiplyValue (double d, const CCompoundUnit &unit)=0
 
- Public Member Functions inherited from SEScalar
 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
 

Protected Member Functions

bool Set (const SEScalar &s) override
 
void Copy (const SEScalar &s) override
 
bool Force (const SEScalar &s) override
 
virtual double GetValue (const CCompoundUnit &unit) const override
 
virtual void SetValue (double d, const CCompoundUnit &unit) override
 
virtual void ForceValue (double d, const CCompoundUnit &unit) override
 
virtual double IncrementValue (double d, const CCompoundUnit &unit) override
 
virtual double ForceIncrementValue (double d, const CCompoundUnit &unit) override
 
virtual double MultiplyValue (double d, const CCompoundUnit &unit) override
 
virtual 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)
 

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

◆ ForceIncrementValue() [1/3]

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

◆ ForceIncrementValue() [2/3]

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

Implements SEUnitScalar.

◆ ForceIncrementValue() [3/3]

template<typename Unit >
double SEScalarQuantity< Unit >::ForceIncrementValue ( 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/3]

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

◆ GetValue() [2/3]

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

Implements SEUnitScalar.

◆ GetValue() [3/3]

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

◆ HasUnit()

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

Implements SEUnitScalar.

◆ Increment() [1/2]

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

◆ Increment() [2/2]

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

◆ IncrementValue() [1/3]

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

◆ IncrementValue() [2/3]

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

Implements SEUnitScalar.

◆ IncrementValue() [3/3]

template<typename Unit >
double SEScalarQuantity< Unit >::IncrementValue ( 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.

◆ Multiply() [1/2]

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

◆ Multiply() [2/2]

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

◆ MultiplyValue() [1/3]

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

◆ MultiplyValue() [2/3]

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

Implements SEUnitScalar.

◆ MultiplyValue() [3/3]

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

◆ 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.