#include <SEScenarioExec.h>

Inherits Loggable.

Inherited by PulseScenarioExec.

Public Member Functions

 SEScenarioExec (Logger *logger)
 
virtual ~SEScenarioExec ()
 
virtual void Clear ()
 
void Copy (const SEScenarioExec &src)
 
eSwitch LogToConsole () const
 
void LogToConsole (eSwitch s)
 
virtual eRelativeSerialization GetRelativeSerialization () const
 
virtual void SetRelativeSerialization (eRelativeSerialization rt)
 
std::string GetDataRootDirectory () const
 
void SetDataRootDirectory (const std::string &fn)
 
std::string GetOutputRootDirectory () const
 
void SetOutputRootDirectory (const std::string &d)
 
eSwitch OrganizeOutputDirectory () const
 
void OrganizeOutputDirectory (eSwitch s)
 
std::string GetScenarioContent () const
 
void SetScenarioContent (const std::string &sc)
 
std::string GetScenarioFilename () const
 
void SetScenarioFilename (const std::string &fn)
 
std::string GetScenarioDirectory () const
 
void SetScenarioDirectory (const std::string &dir)
 
std::string GetScenarioExecListFilename () const
 
void SetScenarioExecListFilename (const std::string &fn)
 
std::string GetScenarioLogFilename () const
 
void SetScenarioLogFilename (const std::string &fn)
 
std::string GetScenarioLogDirectory () const
 
void SetScenarioLogDirectory (const std::string &dir)
 
std::set< std::string > & GetDataRequestFilesSearch ()
 
const std::set< std::string > & GetDataRequestFilesSearch () const
 
eSerializationFormat GetContentFormat () const
 
void SetContentFormat (eSerializationFormat s)
 
int GetThreadCount () const
 
void SetThreadCount (int c)
 
std::string GetEngineConfigurationContent () const
 
void SetEngineConfigurationContent (const std::string &ecc)
 
std::string GetEngineConfigurationFilename () const
 
void SetEngineConfigurationFilename (const std::string &fn)
 
eSwitch AutoSerializeAfterActions () const
 
void AutoSerializeAfterActions (eSwitch s)
 
double GetAutoSerializePeriod_s () const
 
void SetAutoSerializePeriod_s (double s)
 
eSwitch TimeStampSerializedStates () const
 
void TimeStampSerializedStates (eSwitch s)
 
bool SerializeToString (std::string &output, eSerializationFormat m) const
 
bool SerializeFromString (const std::string &src, eSerializationFormat m)
 
- 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 Member Functions

bool ConvertLog ()
 
bool Execute (PhysiologyEngine &pe, SEScenario &sce, SEScenarioExecStatus *status=nullptr)
 
bool Process (PhysiologyEngine &pe, SEScenario &sce, SEScenarioExecStatus *status=nullptr)
 
bool ProcessActions (PhysiologyEngine &pe, SEScenario &sce, SEScenarioExecStatus *status=nullptr)
 
bool ProcessAction (PhysiologyEngine &pe, SEAction &action)
 
void AdvanceEngine (PhysiologyEngine &pe)
 

Protected Attributes

eSwitch m_LogToConsole
 
std::string m_DataRootDirectory
 
std::string m_OutputRootDirectory
 
eSwitch m_OrganizeOutputDirectory
 
std::string m_BaseFilename
 
std::string m_LogFilename
 
std::string m_DataRequestCSVFilename
 
std::string m_EngineConfigurationContent
 
std::string m_EngineConfigurationFilename
 
std::string m_ScenarioContent
 
std::string m_ScenarioFilename
 
std::string m_ScenarioDirectory
 
std::string m_ScenarioExecListFilename
 
std::string m_ScenarioLogFilename
 
std::string m_ScenarioLogDirectory
 
std::set< std::string > m_DataRequestFilesSearch
 
eSerializationFormat m_ContentFormat
 
int m_ThreadCount
 
bool m_SaveNextStep
 
eRelativeSerialization m_RelativeSerialization
 
std::string m_AutoSerializeFilename
 
std::string m_AutoSerializeBaseFilename
 
std::string m_AutoSerializeFilenameExt
 
eSwitch m_AutoSerializeAfterActions
 
double m_AutoSerializePeriod_s
 
double m_AutoSerializeTime_s
 
eSwitch m_TimeStampSerializedStates
 
eSwitch m_ReloadSerializedState
 
std::stringstream m_SerializationOutput
 
std::stringstream m_SerializationActions
 
- Protected Attributes inherited from Loggable
bool myLogger
 
Loggerm_Logger
 

Friends

class PBScenario
 

Constructor & Destructor Documentation

◆ SEScenarioExec()

SEScenarioExec::SEScenarioExec ( Logger logger)

◆ ~SEScenarioExec()

SEScenarioExec::~SEScenarioExec ( )
virtual

Member Function Documentation

◆ AdvanceEngine()

void SEScenarioExec::AdvanceEngine ( PhysiologyEngine pe)
protected

◆ AutoSerializeAfterActions() [1/2]

eSwitch SEScenarioExec::AutoSerializeAfterActions ( ) const
inline

◆ AutoSerializeAfterActions() [2/2]

void SEScenarioExec::AutoSerializeAfterActions ( eSwitch  s)
inline

◆ Clear()

void SEScenarioExec::Clear ( )
virtual

Reimplemented in PulseScenarioExec.

◆ ConvertLog()

bool SEScenarioExec::ConvertLog ( )
protected

◆ Copy()

void SEScenarioExec::Copy ( const SEScenarioExec src)

◆ Execute()

bool SEScenarioExec::Execute ( PhysiologyEngine pe,
SEScenario sce,
SEScenarioExecStatus status = nullptr 
)
protected

◆ GetAutoSerializePeriod_s()

double SEScenarioExec::GetAutoSerializePeriod_s ( ) const
inline

◆ GetContentFormat()

eSerializationFormat SEScenarioExec::GetContentFormat ( ) const
inline

◆ GetDataRequestFilesSearch() [1/2]

std::set< std::string > & SEScenarioExec::GetDataRequestFilesSearch ( )
inline

◆ GetDataRequestFilesSearch() [2/2]

const std::set< std::string > & SEScenarioExec::GetDataRequestFilesSearch ( ) const
inline

◆ GetDataRootDirectory()

std::string SEScenarioExec::GetDataRootDirectory ( ) const
inline

◆ GetEngineConfigurationContent()

std::string SEScenarioExec::GetEngineConfigurationContent ( ) const
inline

◆ GetEngineConfigurationFilename()

std::string SEScenarioExec::GetEngineConfigurationFilename ( ) const
inline

◆ GetOutputRootDirectory()

std::string SEScenarioExec::GetOutputRootDirectory ( ) const
inline

◆ GetRelativeSerialization()

virtual eRelativeSerialization SEScenarioExec::GetRelativeSerialization ( ) const
inlinevirtual

◆ GetScenarioContent()

std::string SEScenarioExec::GetScenarioContent ( ) const
inline

◆ GetScenarioDirectory()

std::string SEScenarioExec::GetScenarioDirectory ( ) const
inline

◆ GetScenarioExecListFilename()

std::string SEScenarioExec::GetScenarioExecListFilename ( ) const
inline

◆ GetScenarioFilename()

std::string SEScenarioExec::GetScenarioFilename ( ) const
inline

◆ GetScenarioLogDirectory()

std::string SEScenarioExec::GetScenarioLogDirectory ( ) const
inline

◆ GetScenarioLogFilename()

std::string SEScenarioExec::GetScenarioLogFilename ( ) const
inline

◆ GetThreadCount()

int SEScenarioExec::GetThreadCount ( ) const
inline

◆ LogToConsole() [1/2]

eSwitch SEScenarioExec::LogToConsole ( ) const
inline

◆ LogToConsole() [2/2]

void SEScenarioExec::LogToConsole ( eSwitch  s)
inline

◆ OrganizeOutputDirectory() [1/2]

eSwitch SEScenarioExec::OrganizeOutputDirectory ( ) const
inline

◆ OrganizeOutputDirectory() [2/2]

void SEScenarioExec::OrganizeOutputDirectory ( eSwitch  s)
inline

◆ Process()

bool SEScenarioExec::Process ( PhysiologyEngine pe,
SEScenario sce,
SEScenarioExecStatus status = nullptr 
)
protected

◆ ProcessAction()

bool SEScenarioExec::ProcessAction ( PhysiologyEngine pe,
SEAction action 
)
protected

This does not include advance time actions To override default functionality with those actions override the ProcessActions method

◆ ProcessActions()

bool SEScenarioExec::ProcessActions ( PhysiologyEngine pe,
SEScenario sce,
SEScenarioExecStatus status = nullptr 
)
protected

◆ SerializeFromString()

bool SEScenarioExec::SerializeFromString ( const std::string &  src,
eSerializationFormat  m 
)

◆ SerializeToString()

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

◆ SetAutoSerializePeriod_s()

void SEScenarioExec::SetAutoSerializePeriod_s ( double  s)
inline

◆ SetContentFormat()

void SEScenarioExec::SetContentFormat ( eSerializationFormat  s)
inline

◆ SetDataRootDirectory()

void SEScenarioExec::SetDataRootDirectory ( const std::string &  fn)
inline

◆ SetEngineConfigurationContent()

void SEScenarioExec::SetEngineConfigurationContent ( const std::string &  ecc)
inline

◆ SetEngineConfigurationFilename()

void SEScenarioExec::SetEngineConfigurationFilename ( const std::string &  fn)
inline

◆ SetOutputRootDirectory()

void SEScenarioExec::SetOutputRootDirectory ( const std::string &  d)

◆ SetRelativeSerialization()

virtual void SEScenarioExec::SetRelativeSerialization ( eRelativeSerialization  rt)
inlinevirtual

◆ SetScenarioContent()

void SEScenarioExec::SetScenarioContent ( const std::string &  sc)
inline

◆ SetScenarioDirectory()

void SEScenarioExec::SetScenarioDirectory ( const std::string &  dir)
inline

◆ SetScenarioExecListFilename()

void SEScenarioExec::SetScenarioExecListFilename ( const std::string &  fn)
inline

◆ SetScenarioFilename()

void SEScenarioExec::SetScenarioFilename ( const std::string &  fn)
inline

◆ SetScenarioLogDirectory()

void SEScenarioExec::SetScenarioLogDirectory ( const std::string &  dir)
inline

◆ SetScenarioLogFilename()

void SEScenarioExec::SetScenarioLogFilename ( const std::string &  fn)
inline

◆ SetThreadCount()

void SEScenarioExec::SetThreadCount ( int  c)
inline

◆ TimeStampSerializedStates() [1/2]

eSwitch SEScenarioExec::TimeStampSerializedStates ( ) const
inline

◆ TimeStampSerializedStates() [2/2]

void SEScenarioExec::TimeStampSerializedStates ( eSwitch  s)
inline

Friends And Related Function Documentation

◆ PBScenario

friend class PBScenario
friend

Member Data Documentation

◆ m_AutoSerializeAfterActions

eSwitch SEScenarioExec::m_AutoSerializeAfterActions
protected

◆ m_AutoSerializeBaseFilename

std::string SEScenarioExec::m_AutoSerializeBaseFilename
protected

◆ m_AutoSerializeFilename

std::string SEScenarioExec::m_AutoSerializeFilename
protected

◆ m_AutoSerializeFilenameExt

std::string SEScenarioExec::m_AutoSerializeFilenameExt
protected

◆ m_AutoSerializePeriod_s

double SEScenarioExec::m_AutoSerializePeriod_s
protected

◆ m_AutoSerializeTime_s

double SEScenarioExec::m_AutoSerializeTime_s
protected

◆ m_BaseFilename

std::string SEScenarioExec::m_BaseFilename
protected

◆ m_ContentFormat

eSerializationFormat SEScenarioExec::m_ContentFormat
protected

◆ m_DataRequestCSVFilename

std::string SEScenarioExec::m_DataRequestCSVFilename
protected

◆ m_DataRequestFilesSearch

std::set<std::string> SEScenarioExec::m_DataRequestFilesSearch
protected

◆ m_DataRootDirectory

std::string SEScenarioExec::m_DataRootDirectory
protected

◆ m_EngineConfigurationContent

std::string SEScenarioExec::m_EngineConfigurationContent
protected

◆ m_EngineConfigurationFilename

std::string SEScenarioExec::m_EngineConfigurationFilename
protected

◆ m_LogFilename

std::string SEScenarioExec::m_LogFilename
protected

◆ m_LogToConsole

eSwitch SEScenarioExec::m_LogToConsole
protected

◆ m_OrganizeOutputDirectory

eSwitch SEScenarioExec::m_OrganizeOutputDirectory
protected

◆ m_OutputRootDirectory

std::string SEScenarioExec::m_OutputRootDirectory
protected

◆ m_RelativeSerialization

eRelativeSerialization SEScenarioExec::m_RelativeSerialization
protected

◆ m_ReloadSerializedState

eSwitch SEScenarioExec::m_ReloadSerializedState
protected

◆ m_SaveNextStep

bool SEScenarioExec::m_SaveNextStep
protected

◆ m_ScenarioContent

std::string SEScenarioExec::m_ScenarioContent
protected

◆ m_ScenarioDirectory

std::string SEScenarioExec::m_ScenarioDirectory
protected

◆ m_ScenarioExecListFilename

std::string SEScenarioExec::m_ScenarioExecListFilename
protected

◆ m_ScenarioFilename

std::string SEScenarioExec::m_ScenarioFilename
protected

◆ m_ScenarioLogDirectory

std::string SEScenarioExec::m_ScenarioLogDirectory
protected

◆ m_ScenarioLogFilename

std::string SEScenarioExec::m_ScenarioLogFilename
protected

◆ m_SerializationActions

std::stringstream SEScenarioExec::m_SerializationActions
protected

◆ m_SerializationOutput

std::stringstream SEScenarioExec::m_SerializationOutput
protected

◆ m_ThreadCount

int SEScenarioExec::m_ThreadCount
protected

◆ m_TimeStampSerializedStates

eSwitch SEScenarioExec::m_TimeStampSerializedStates
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.