SEInhaler Class Reference

#include <SEInhaler.h>

Inherits SESystem.

Inherited by Inhaler.

Public Member Functions

 SEInhaler (SESubstanceManager &substances)
 
virtual ~SEInhaler ()
 
virtual void Clear ()
 
bool SerializeToString (std::string &output, SerializationFormat m) const
 
bool SerializeToFile (const std::string &filename, SerializationFormat m) const
 
bool SerializeFromString (const std::string &src, SerializationFormat m)
 
bool SerializeFromFile (const std::string &filename, SerializationFormat m)
 
GetScalar
  • A reflextion type call that will return the Scalar associated with the string. ex. GetScalar("Hematocrit") will return the SEScalarPercent object associated with Hematocrit
  • Note this is an expensive call as it will string compare many times This is best used, and intended for, you to dynamically prepopulate a mapping data structure that will help access what you need
virtual const SEScalarGetScalar (const std::string &name)
 
- Public Member Functions inherited from SESystem
 SESystem (Logger *logger)
 
virtual ~SESystem ()
 
- 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
 

Friends

class PBInhaler
 

StateChange

- This method is called when ever there is a state change Specically a new file has been loaded, configuration action, or the system reset Engine specific methodology can then update their logic.

eSwitch m_State
 
SEScalarMassm_MeteredDose
 
SEScalar0To1m_NozzleLoss
 
SEScalarVolumem_SpacerVolume
 
const SESubstancem_Substance
 
SESubstanceManagerm_Substances
 
virtual eSwitch GetState () const
 
virtual void SetState (eSwitch name)
 
virtual bool HasMeteredDose () const
 
virtual SEScalarMassGetMeteredDose ()
 
virtual double GetMeteredDose (const MassUnit &unit) const
 
virtual bool HasNozzleLoss () const
 
virtual SEScalar0To1GetNozzleLoss ()
 
virtual double GetNozzleLoss () const
 
virtual bool HasSpacerVolume () const
 
virtual SEScalarVolumeGetSpacerVolume ()
 
virtual double GetSpacerVolume (const VolumeUnit &unit) const
 
virtual bool HasSubstance () const
 
virtual void SetSubstance (const SESubstance *sub)
 
virtual SESubstanceGetSubstance () const
 
virtual void StateChange ()
 
virtual void Merge (const SEInhaler &from)
 
virtual void ProcessConfiguration (const SEInhalerConfiguration &config)
 

Additional Inherited Members

- Static Public Member Functions inherited from SESystem
static const SEScalarGetScalar (const std::string &name, std::vector< SESystem *> *systems)
 
- Static Public Attributes inherited from Loggable
static const std::string empty
 
- Protected Attributes inherited from SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from Loggable
Loggerm_Logger
 

Constructor & Destructor Documentation

◆ SEInhaler()

SEInhaler::SEInhaler ( SESubstanceManager substances)

◆ ~SEInhaler()

SEInhaler::~SEInhaler ( )
virtual

Member Function Documentation

◆ Clear()

void SEInhaler::Clear ( )
virtual

Reimplemented from SESystem.

Reimplemented in Inhaler.

◆ GetMeteredDose() [1/2]

SEScalarMass & SEInhaler::GetMeteredDose ( )
virtual

◆ GetMeteredDose() [2/2]

double SEInhaler::GetMeteredDose ( const MassUnit unit) const
virtual

◆ GetNozzleLoss() [1/2]

SEScalar0To1 & SEInhaler::GetNozzleLoss ( )
virtual

◆ GetNozzleLoss() [2/2]

double SEInhaler::GetNozzleLoss ( ) const
virtual

◆ GetScalar()

const SEScalar * SEInhaler::GetScalar ( const std::string &  name)
virtual

Implements SESystem.

◆ GetSpacerVolume() [1/2]

SEScalarVolume & SEInhaler::GetSpacerVolume ( )
virtual

◆ GetSpacerVolume() [2/2]

double SEInhaler::GetSpacerVolume ( const VolumeUnit unit) const
virtual

◆ GetState()

eSwitch SEInhaler::GetState ( ) const
virtual

◆ GetSubstance()

SESubstance * SEInhaler::GetSubstance ( ) const
virtual

◆ HasMeteredDose()

bool SEInhaler::HasMeteredDose ( ) const
virtual

◆ HasNozzleLoss()

bool SEInhaler::HasNozzleLoss ( ) const
virtual

◆ HasSpacerVolume()

bool SEInhaler::HasSpacerVolume ( ) const
virtual

◆ HasSubstance()

bool SEInhaler::HasSubstance ( ) const
virtual

◆ Merge()

void SEInhaler::Merge ( const SEInhaler from)
protectedvirtual

◆ ProcessConfiguration()

void SEInhaler::ProcessConfiguration ( const SEInhalerConfiguration config)
protectedvirtual

◆ SerializeFromFile()

bool SEInhaler::SerializeFromFile ( const std::string &  filename,
SerializationFormat  m 
)

◆ SerializeFromString()

bool SEInhaler::SerializeFromString ( const std::string &  src,
SerializationFormat  m 
)

◆ SerializeToFile()

bool SEInhaler::SerializeToFile ( const std::string &  filename,
SerializationFormat  m 
) const

◆ SerializeToString()

bool SEInhaler::SerializeToString ( std::string &  output,
SerializationFormat  m 
) const

◆ SetState()

void SEInhaler::SetState ( eSwitch  name)
virtual

◆ SetSubstance()

void SEInhaler::SetSubstance ( const SESubstance sub)
virtual

◆ StateChange()

virtual void SEInhaler::StateChange ( )
inlineprotectedvirtual

Reimplemented in Inhaler.

Friends And Related Function Documentation

◆ PBInhaler

friend class PBInhaler
friend

Member Data Documentation

◆ m_MeteredDose

SEScalarMass* SEInhaler::m_MeteredDose
protected

◆ m_NozzleLoss

SEScalar0To1* SEInhaler::m_NozzleLoss
protected

◆ m_SpacerVolume

SEScalarVolume* SEInhaler::m_SpacerVolume
protected

◆ m_State

eSwitch SEInhaler::m_State
protected

◆ m_Substance

const SESubstance* SEInhaler::m_Substance
protected

◆ m_Substances

SESubstanceManager& SEInhaler::m_Substances
protected