Classes |
Public Member Functions |
Protected Types |
Protected Member Functions |
Protected Attributes |
List of all members
DataTrack Class Reference
#include <DataTrack.h>
Inherits Loggable.
Classes | |
struct | Element |
Public Member Functions | |
DataTrack () | |
DataTrack (Logger *m_Log) | |
~DataTrack () | |
void | Clear () |
void | Reset () |
void | UseTabDelimiter () |
void | UseCommaDelimiter () |
std::vector< double > const & | GetTimes () const |
size_t | NumTracks () |
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 (size_t idx, double value) |
size_t | Probe (const std::string &name, double value) |
size_t | Probe (const std::string &name, double value, int i) |
void | Probe (const SEFluidCircuit &c) |
void | Probe (const SEElectricalCircuit &c) |
void | Probe (const SEThermalCircuit &c) |
void | Probe (const SELiquidCompartmentGraph &graph) |
double | GetProbe (size_t idx) |
double | GetProbe (const std::string &name) |
std::string | GetProbeName (size_t idx) |
void | Track (size_t idx, double time, double value) |
size_t | 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) |
double | GetTrack (size_t idx, double time) |
double | GetTrack (const std::string &name, double time) |
std::vector< std::string > | ReadTrackFromFile (const char *fileName) |
std::vector< std::string > | StreamDataFromFile (const char *fileName) |
double | StreamDataFromFile (std::vector< std::string > *headings) |
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 (Logger *logger=nullptr) | |
Loggable (std::string const &logfile) | |
virtual | ~Loggable () |
virtual Logger * | GetLogger () 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 Types | |
typedef std::vector< Element > | ElementVector |
Protected Member Functions | |
Element & | GetElement (size_t idx) |
Element & | GetElement (std::string const &name) |
Protected Attributes | |
ElementVector | m_Elements |
char | m_Delimiter |
double | m_LastTime = -1.0 |
std::vector< double > | m_Times |
std::streamsize | m_DefaultPrecision = 3 |
std::ifstream | m_FileStream |
Protected Attributes inherited from Loggable | |
bool | myLogger |
Logger * | m_Logger |
Member Typedef Documentation
◆ ElementVector
|
protected |
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 | ||
) |
◆ GetElement() [1/2]
|
protected |
◆ GetElement() [2/2]
|
protected |
◆ GetProbe() [1/2]
double DataTrack::GetProbe | ( | const std::string & | name | ) |
◆ GetProbe() [2/2]
double DataTrack::GetProbe | ( | size_t | idx | ) |
◆ GetProbeName()
std::string DataTrack::GetProbeName | ( | size_t | idx | ) |
◆ GetTimes()
std::vector< double > const & DataTrack::GetTimes | ( | ) | const |
◆ GetTrack() [1/2]
double DataTrack::GetTrack | ( | const std::string & | name, |
double | time | ||
) |
◆ GetTrack() [2/2]
double DataTrack::GetTrack | ( | size_t | idx, |
double | time | ||
) |
◆ NumTracks()
|
inline |
◆ Probe() [1/7]
void DataTrack::Probe | ( | const SEElectricalCircuit & | c | ) |
◆ Probe() [2/7]
void DataTrack::Probe | ( | const SEFluidCircuit & | c | ) |
◆ Probe() [3/7]
void DataTrack::Probe | ( | const SELiquidCompartmentGraph & | graph | ) |
◆ Probe() [4/7]
void DataTrack::Probe | ( | const SEThermalCircuit & | c | ) |
◆ Probe() [5/7]
size_t DataTrack::Probe | ( | const std::string & | name, |
double | value | ||
) |
◆ Probe() [6/7]
size_t DataTrack::Probe | ( | const std::string & | name, |
double | value, | ||
int | i | ||
) |
◆ Probe() [7/7]
void DataTrack::Probe | ( | size_t | idx, |
double | value | ||
) |
◆ 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/7]
size_t DataTrack::Track | ( | const std::string & | name, |
double | time, | ||
double | value | ||
) |
◆ Track() [2/7]
void DataTrack::Track | ( | double | time, |
const SEElectricalCircuit & | circuit | ||
) |
◆ Track() [3/7]
void DataTrack::Track | ( | double | time, |
const SEFluidCircuit & | circuit | ||
) |
◆ Track() [4/7]
void DataTrack::Track | ( | double | time, |
const SEGasCompartmentGraph & | graph, | ||
std::vector< SESubstance * > * | substances = nullptr |
||
) |
◆ Track() [5/7]
void DataTrack::Track | ( | double | time, |
const SELiquidCompartmentGraph & | graph, | ||
std::vector< SESubstance * > * | substances = nullptr |
||
) |
◆ Track() [6/7]
void DataTrack::Track | ( | double | time, |
const SEThermalCircuit & | circuit | ||
) |
◆ Track() [7/7]
void DataTrack::Track | ( | size_t | idx, |
double | time, | ||
double | value | ||
) |
◆ UseCommaDelimiter()
|
inline |
◆ UseTabDelimiter()
|
inline |
◆ WriteTrackToFile()
void DataTrack::WriteTrackToFile | ( | const char * | fileName | ) |
Member Data Documentation
◆ m_DefaultPrecision
|
protected |
◆ m_Delimiter
|
protected |
◆ m_Elements
|
protected |
◆ m_FileStream
|
protected |
◆ m_LastTime
|
protected |
◆ m_Times
|
protected |