SEInhaler Class Reference

#include <SEInhaler.h>

Inherits SEEquipment.

Public Member Functions

 SEInhaler (Logger *logger)
 
virtual ~SEInhaler ()
 
void Clear () override
 
bool SerializeToString (std::string &output, eSerializationFormat m) const
 
bool SerializeToFile (const std::string &filename) const
 
bool SerializeFromString (const std::string &src, eSerializationFormat m, const SESubstanceManager &subMgr)
 
bool SerializeFromFile (const std::string &filename, const SESubstanceManager &subMgr)
 
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
const SEScalarGetScalar (const std::string &name) override
 
- Public Member Functions inherited from SEEquipment
 SEEquipment (Logger *logger)
 
virtual ~SEEquipment ()
 
void Clear () override
 
- Public Member Functions inherited from SESystem
 SESystem (Logger *logger)
 
virtual ~SESystem ()
 
virtual void Clear ()
 
- 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
 

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
 
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, SESubstanceManager &subMgr)
 
virtual void ProcessConfiguration (SEInhalerConfiguration &config, SESubstanceManager &subMgr)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ SEInhaler()

SEInhaler::SEInhaler ( Logger logger)

◆ ~SEInhaler()

SEInhaler::~SEInhaler ( )
virtual

Member Function Documentation

◆ Clear()

void SEInhaler::Clear ( )
overridevirtual

Reimplemented from SESystem.

◆ 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)
overridevirtual

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,
SESubstanceManager subMgr 
)
protectedvirtual

◆ ProcessConfiguration()

void SEInhaler::ProcessConfiguration ( SEInhalerConfiguration config,
SESubstanceManager subMgr 
)
protectedvirtual

◆ SerializeFromFile()

bool SEInhaler::SerializeFromFile ( const std::string &  filename,
const SESubstanceManager subMgr 
)

◆ SerializeFromString()

bool SEInhaler::SerializeFromString ( const std::string &  src,
eSerializationFormat  m,
const SESubstanceManager subMgr 
)

◆ SerializeToFile()

bool SEInhaler::SerializeToFile ( const std::string &  filename) const

◆ SerializeToString()

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

◆ SetState()

void SEInhaler::SetState ( eSwitch  name)
virtual

◆ SetSubstance()

void SEInhaler::SetSubstance ( const SESubstance sub)
virtual

◆ StateChange()

virtual void SEInhaler::StateChange ( )
inlineprotectedvirtual

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

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.