#include <DataTrack.h>

Inherits Loggable.

Public Member Functions

 DataTrack ()
 
 DataTrack (Logger *m_Log)
 
 ~DataTrack ()
 
void Clear ()
 
void Reset ()
 
void UseTabDelimiter ()
 
void UseCommaDelimiter ()
 
std::vector< std::string > & GetHeadings ()
 
void SetFormatting (const std::string &name, const SEDecimalFormat &f)
 
void SetFormatting (const std::string &name, std::streamsize precision)
 
void SetDefaultFormatting (std::streamsize precision)
 
void Probe (const std::string &name, double value, int i)
 
void Probe (const std::string &name, double value)
 
void Probe (const SEFluidCircuit &c)
 
void Probe (const SEElectricalCircuit &c)
 
void Probe (const SEThermalCircuit &c)
 
void Probe (const SELiquidCompartmentGraph &graph)
 
double GetProbe (const std::string &name)
 
ProbeMap * GetProbes ()
 
void Track (const std::string &name, double time, double value)
 
void Track (double time, const SEElectricalCircuit &circuit)
 
void Track (double time, const SEFluidCircuit &circuit)
 
void Track (double time, const SEThermalCircuit &circuit)
 
void Track (double time, const SEGasCompartmentGraph &graph, std::vector< SESubstance *> *substances=nullptr)
 
void Track (double time, const SELiquidCompartmentGraph &graph, std::vector< SESubstance *> *substances=nullptr)
 
std::vector< std::string > ReadTrackFromFile (const char *fileName)
 
std::vector< std::string > StreamDataFromFile (const char *fileName)
 
double StreamDataFromFile (std::vector< std::string > *headings)
 
double GetTrack (const std::string &name, double time)
 
std::vector< double > * GetTrack (const std::string &name)
 
std::vector< double > & GetTimes ()
 
void CreateFile (const char *fileName, std::ofstream &newFile)
 
void WriteTrackToFile (const char *fileName)
 
void StreamTrackToFile (std::ofstream &file)
 
void StreamProbesToFile (double time, std::ofstream &file)
 
- 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
 

Protected Attributes

TrackMap m_Track
 
ProbeMap m_Probe
 
FormattingMap m_Formatting
 
char m_Delimiter
 
double m_LastTime = -1.0
 
std::vector< double > m_Time
 
std::vector< std::string > m_HeadingOrder
 
std::streamsize m_DefaultPrecision = 3
 
std::ifstream m_FileStream
 
- Protected Attributes inherited from Loggable
Loggerm_Logger
 

Additional Inherited Members

- Static Public Attributes inherited from Loggable
static const std::string empty
 

Constructor & Destructor Documentation

◆ DataTrack() [1/2]

DataTrack::DataTrack ( )

◆ DataTrack() [2/2]

DataTrack::DataTrack ( Logger m_Log)

◆ ~DataTrack()

DataTrack::~DataTrack ( )

Member Function Documentation

◆ Clear()

void DataTrack::Clear ( )

◆ CreateFile()

void DataTrack::CreateFile ( const char *  fileName,
std::ofstream &  newFile 
)

◆ GetHeadings()

std::vector< std::string > & DataTrack::GetHeadings ( )

◆ GetProbe()

double DataTrack::GetProbe ( const std::string &  name)

◆ GetProbes()

ProbeMap * DataTrack::GetProbes ( )

◆ GetTimes()

std::vector< double > & DataTrack::GetTimes ( )

◆ GetTrack() [1/2]

double DataTrack::GetTrack ( const std::string &  name,
double  time 
)

◆ GetTrack() [2/2]

std::vector< double > * DataTrack::GetTrack ( const std::string &  name)

◆ Probe() [1/6]

void DataTrack::Probe ( const std::string &  name,
double  value,
int  i 
)

◆ Probe() [2/6]

void DataTrack::Probe ( const std::string &  name,
double  value 
)

◆ Probe() [3/6]

void DataTrack::Probe ( const SEFluidCircuit c)

◆ Probe() [4/6]

void DataTrack::Probe ( const SEElectricalCircuit c)

◆ Probe() [5/6]

void DataTrack::Probe ( const SEThermalCircuit c)

◆ Probe() [6/6]

void DataTrack::Probe ( const SELiquidCompartmentGraph graph)

◆ ReadTrackFromFile()

std::vector< std::string > DataTrack::ReadTrackFromFile ( const char *  fileName)

◆ Reset()

void DataTrack::Reset ( )

◆ SetDefaultFormatting()

void DataTrack::SetDefaultFormatting ( std::streamsize  precision)

◆ SetFormatting() [1/2]

void DataTrack::SetFormatting ( const std::string &  name,
const SEDecimalFormat f 
)

◆ SetFormatting() [2/2]

void DataTrack::SetFormatting ( const std::string &  name,
std::streamsize  precision 
)

◆ StreamDataFromFile() [1/2]

std::vector< std::string > DataTrack::StreamDataFromFile ( const char *  fileName)

◆ StreamDataFromFile() [2/2]

double DataTrack::StreamDataFromFile ( std::vector< std::string > *  headings)

◆ StreamProbesToFile()

void DataTrack::StreamProbesToFile ( double  time,
std::ofstream &  file 
)

◆ StreamTrackToFile()

void DataTrack::StreamTrackToFile ( std::ofstream &  file)

◆ Track() [1/6]

void DataTrack::Track ( const std::string &  name,
double  time,
double  value 
)

◆ Track() [2/6]

void DataTrack::Track ( double  time,
const SEElectricalCircuit circuit 
)

◆ Track() [3/6]

void DataTrack::Track ( double  time,
const SEFluidCircuit circuit 
)

◆ Track() [4/6]

void DataTrack::Track ( double  time,
const SEThermalCircuit circuit 
)

◆ Track() [5/6]

void DataTrack::Track ( double  time,
const SEGasCompartmentGraph graph,
std::vector< SESubstance *> *  substances = nullptr 
)

◆ Track() [6/6]

void DataTrack::Track ( double  time,
const SELiquidCompartmentGraph graph,
std::vector< SESubstance *> *  substances = nullptr 
)

◆ UseCommaDelimiter()

void DataTrack::UseCommaDelimiter ( )
inline

◆ UseTabDelimiter()

void DataTrack::UseTabDelimiter ( )
inline

◆ WriteTrackToFile()

void DataTrack::WriteTrackToFile ( const char *  fileName)

Member Data Documentation

◆ m_DefaultPrecision

std::streamsize DataTrack::m_DefaultPrecision = 3
protected

◆ m_Delimiter

char DataTrack::m_Delimiter
protected

◆ m_FileStream

std::ifstream DataTrack::m_FileStream
protected

◆ m_Formatting

FormattingMap DataTrack::m_Formatting
protected

◆ m_HeadingOrder

std::vector<std::string> DataTrack::m_HeadingOrder
protected

◆ m_LastTime

double DataTrack::m_LastTime = -1.0
protected

◆ m_Probe

ProbeMap DataTrack::m_Probe
protected

◆ m_Time

std::vector<double> DataTrack::m_Time
protected

◆ m_Track

TrackMap DataTrack::m_Track
protected