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 () const
 
virtual void SetScalar (const SEScalar &s)
 
virtual bool IsValid () const
 
virtual bool IsInfinity () const
 
virtual bool HasUnit () const
 
virtual const CCompoundUnitGetUnit () const
 
virtual bool IsValidUnit (const CCompoundUnit &unit) const
 
virtual const CCompoundUnitGetCompoundUnit (const std::string &unit) const
 
virtual double GetValue () const
 
virtual double GetValue (int decimal_places) const
 
virtual double GetValue (const CCompoundUnit &unit) const
 
virtual double GetValue (const CCompoundUnit &unit, int decimal_places) const
 
std::string GetString () const
 
- Public Member Functions inherited from Loggable
 Loggable (Logger *logger=nullptr)
 
 Loggable (std::string const &logfile)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
virtual void SetLogger (Logger &logger)
 
virtual void Debug (std::string const &msg) const
 
virtual void Debug (std::stringstream &msg) const
 
virtual void Debug (std::ostream &msg) const
 
virtual void Info (std::string const &msg) const
 
virtual void Info (std::stringstream &msg) const
 
virtual void Info (const std::stringstream &msg) const
 
virtual void Info (std::ostream &msg) const
 
virtual void Warning (std::string const &msg) const
 
virtual void Warning (std::stringstream &msg) const
 
virtual void Warning (std::ostream &msg) const
 
virtual void Error (std::string const &msg) const
 
virtual void Error (std::stringstream &msg) const
 
virtual void Error (std::ostream &msg) const
 
virtual void Fatal (std::string const &msg) const
 
virtual void Fatal (std::stringstream &msg) const
 
virtual void Fatal (std::ostream &msg) const
 

Protected Attributes

const SEScalarm_Scalar
 
const SEUnitScalarm_UnitScalar
 
- Protected Attributes inherited from Loggable
bool myLogger
 
Loggerm_Logger
 

Friends

class PBProperty
 

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

◆ GetString()

std::string SEGenericScalar::GetString ( ) const

◆ GetUnit()

const CCompoundUnit * SEGenericScalar::GetUnit ( ) const
virtual

◆ GetValue() [1/4]

double SEGenericScalar::GetValue ( ) const
virtual

◆ GetValue() [2/4]

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

◆ GetValue() [3/4]

double SEGenericScalar::GetValue ( const CCompoundUnit unit,
int  decimal_places 
) const
virtual

◆ GetValue() [4/4]

double SEGenericScalar::GetValue ( int  decimal_places) const
virtual

◆ HasScalar()

bool SEGenericScalar::HasScalar ( ) const
virtual

◆ HasUnit()

bool SEGenericScalar::HasUnit ( ) const
virtual

◆ IsInfinity()

bool SEGenericScalar::IsInfinity ( ) const
virtual

◆ IsValid()

bool SEGenericScalar::IsValid ( ) const
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

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.