#include <SEScenarioLog.h>

Inherits Loggable.

Public Member Functions

 SEScenarioLog (Logger *logger)
 
virtual ~SEScenarioLog ()
 
virtual void Clear ()
 
virtual bool Convert (const std::string &logFilename, SEScenario &dst)
 
virtual void AbsentAdditionalTime (const SEScalarTime &time)
 
- 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
 

Static Public Member Functions

static bool GenerateScenarioFromLegacyLog (const std::string &logFilename, const std::string &stateFilename, double extraTime_s=0)
 Generates previously executed scenario based on log file messages. More...
 

Protected Member Functions

void DetectEOL (const std::string &content)
 
bool Extract (const std::string &filename)
 
bool ExtractTagStrings (const std::string &tag, const std::string &content, std::vector< std::string > &tagStrs, bool braces=true)
 
bool ExtractTagStrings (const std::string &tag, const std::string &content, std::map< double, std::vector< std::string > > &tagStrs, bool braces=true)
 
bool GetActions (const std::string &content)
 
bool GetConditions (const std::string &content)
 
bool GetFinalSimTime (const std::string &content)
 
bool GetPatient (const std::string &content)
 
bool GetSerializeFromFile (const std::string &content)
 
bool GetSerializeFromString (const std::string &content)
 
bool IdentifyTagStringEnd (const std::string &content, size_t &endIdx)
 
bool ParseTime (const std::string &timeStr, double &time_s)
 

Protected Attributes

std::map< double, std::vector< std::string > > m_Actions
 
std::vector< std::string > m_Conditions
 
std::string m_EOL
 
double m_FinalSimTime_s
 
std::string m_Patient
 
std::string m_StateFilename
 
std::string m_State
 
SEScalarTime m_AdditionalTime
 
- Protected Attributes inherited from Loggable
bool myLogger
 
Loggerm_Logger
 

Constructor & Destructor Documentation

◆ SEScenarioLog()

SEScenarioLog::SEScenarioLog ( Logger logger)

◆ ~SEScenarioLog()

SEScenarioLog::~SEScenarioLog ( )
virtual

Member Function Documentation

◆ AbsentAdditionalTime()

void SEScenarioLog::AbsentAdditionalTime ( const SEScalarTime time)
virtual

◆ Clear()

void SEScenarioLog::Clear ( )
virtual

◆ Convert()

bool SEScenarioLog::Convert ( const std::string &  logFilename,
SEScenario dst 
)
virtual

◆ DetectEOL()

void SEScenarioLog::DetectEOL ( const std::string &  content)
protected

◆ Extract()

bool SEScenarioLog::Extract ( const std::string &  filename)
protected

◆ ExtractTagStrings() [1/2]

bool SEScenarioLog::ExtractTagStrings ( const std::string &  tag,
const std::string &  content,
std::map< double, std::vector< std::string > > &  tagStrs,
bool  braces = true 
)
protected

◆ ExtractTagStrings() [2/2]

bool SEScenarioLog::ExtractTagStrings ( const std::string &  tag,
const std::string &  content,
std::vector< std::string > &  tagStrs,
bool  braces = true 
)
protected

◆ GenerateScenarioFromLegacyLog()

bool SEScenarioLog::GenerateScenarioFromLegacyLog ( const std::string &  logFilename,
const std::string &  stateFilename,
double  extraTime_s = 0 
)
static

Generates previously executed scenario based on log file messages.

◆ GetActions()

bool SEScenarioLog::GetActions ( const std::string &  content)
protected

◆ GetConditions()

bool SEScenarioLog::GetConditions ( const std::string &  content)
protected

◆ GetFinalSimTime()

bool SEScenarioLog::GetFinalSimTime ( const std::string &  content)
protected

◆ GetPatient()

bool SEScenarioLog::GetPatient ( const std::string &  content)
protected

◆ GetSerializeFromFile()

bool SEScenarioLog::GetSerializeFromFile ( const std::string &  content)
protected

◆ GetSerializeFromString()

bool SEScenarioLog::GetSerializeFromString ( const std::string &  content)
protected

◆ IdentifyTagStringEnd()

bool SEScenarioLog::IdentifyTagStringEnd ( const std::string &  content,
size_t &  endIdx 
)
protected

◆ ParseTime()

bool SEScenarioLog::ParseTime ( const std::string &  timeStr,
double &  time_s 
)
protected

Member Data Documentation

◆ m_Actions

std::map<double, std::vector<std::string> > SEScenarioLog::m_Actions
protected

◆ m_AdditionalTime

SEScalarTime SEScenarioLog::m_AdditionalTime
protected

◆ m_Conditions

std::vector<std::string> SEScenarioLog::m_Conditions
protected

◆ m_EOL

std::string SEScenarioLog::m_EOL
protected

◆ m_FinalSimTime_s

double SEScenarioLog::m_FinalSimTime_s
protected

◆ m_Patient

std::string SEScenarioLog::m_Patient
protected

◆ m_State

std::string SEScenarioLog::m_State
protected

◆ m_StateFilename

std::string SEScenarioLog::m_StateFilename
protected

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.