If you want to querry what a scalar is and don't know what scalar type you have... More...

#include <SEScalar.h>

Inherits Loggable.

Inherited by SEDataRequestScalar.

Public Member Functions

 SEGenericScalar (Logger *logger)
 
virtual ~SEGenericScalar ()
 
virtual bool HasScalar ()
 
virtual void SetScalar (const SEScalar &s)
 
virtual bool IsValid ()
 
virtual bool IsInfinity ()
 
virtual bool HasUnit ()
 
virtual const CCompoundUnitGetUnit ()
 
virtual bool IsValidUnit (const CCompoundUnit &unit) const
 
virtual const CCompoundUnitGetCompoundUnit (const std::string &unit) const
 
virtual double GetValue () const
 
virtual double GetValue (const CCompoundUnit &unit) const
 
- Public Member Functions inherited from Loggable
 Loggable ()
 
 Loggable (Logger *log)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
virtual void Debug (std::string const &msg, std::string const &origin=empty) const
 
virtual void Debug (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Debug (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Info (std::string const &msg, std::string const &origin=empty) const
 
virtual void Info (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (const std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::string const &msg, std::string const &origin=empty) const
 
virtual void Warning (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Error (std::string const &msg, std::string const &origin=empty) const
 
virtual void Error (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Error (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::string const &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::ostream &msg, std::string const &origin=empty) const
 

Protected Attributes

const SEScalarm_Scalar
 
const SEUnitScalarm_UnitScalar
 
- Protected Attributes inherited from Loggable
Loggerm_Logger
 

Friends

class PBProperty
 

Additional Inherited Members

- Static Public Attributes inherited from Loggable
static const std::string empty
 

Detailed Description

If you want to querry what a scalar is and don't know what scalar type you have...

Be aware, I did not really protect this class, I assume you know what you are doing If you use this class without setting the scalar it will produce nullptr errors and other CDM Exceptions, use with caution and smarts.

Constructor & Destructor Documentation

◆ SEGenericScalar()

SEGenericScalar::SEGenericScalar ( Logger logger)

◆ ~SEGenericScalar()

virtual SEGenericScalar::~SEGenericScalar ( )
inlinevirtual

Member Function Documentation

◆ GetCompoundUnit()

const CCompoundUnit * SEGenericScalar::GetCompoundUnit ( const std::string &  unit) const
virtual

◆ GetUnit()

const CCompoundUnit * SEGenericScalar::GetUnit ( )
virtual

◆ GetValue() [1/2]

double SEGenericScalar::GetValue ( ) const
virtual

◆ GetValue() [2/2]

double SEGenericScalar::GetValue ( const CCompoundUnit unit) const
virtual

◆ HasScalar()

bool SEGenericScalar::HasScalar ( )
virtual

◆ HasUnit()

bool SEGenericScalar::HasUnit ( )
virtual

◆ IsInfinity()

bool SEGenericScalar::IsInfinity ( )
virtual

◆ IsValid()

bool SEGenericScalar::IsValid ( )
virtual

◆ IsValidUnit()

bool SEGenericScalar::IsValidUnit ( const CCompoundUnit unit) const
virtual

◆ SetScalar()

void SEGenericScalar::SetScalar ( const SEScalar s)
virtual

Friends And Related Function Documentation

◆ PBProperty

friend class PBProperty
friend

Member Data Documentation

◆ m_Scalar

const SEScalar* SEGenericScalar::m_Scalar
protected

◆ m_UnitScalar

const SEUnitScalar* SEGenericScalar::m_UnitScalar
protected