Public Member Functions | Private Types | Private Attributes | List of all members
CSVLogger Class Reference

#include <CsvLogger.h>

Public Member Functions

void addColumn (std::string name)
 
bool clear ()
 
bool close ()
 
 CSVLogger ()
 
bool isOpen ()
 
void newSession ()
 
bool open ()
 
void setFilepath (std::string path)
 
void setRecording (bool recording)
 
void updateColumn (std::string name, double value)
 
bool writeHeader ()
 
bool writeRow ()
 
virtual ~CSVLogger ()
 

Private Types

typedef std::map< std::string, double > columns_type
 

Private Attributes

unsigned int currentSession = 1
 
bool isRecording = false
 
columns_type m_columns
 
std::shared_ptr< std::ofstream > m_file
 
std::string m_filepath
 

Detailed Description

Definition at line 8 of file CsvLogger.h.

Member Typedef Documentation

typedef std::map<std::string, double> CSVLogger::columns_type
private

Definition at line 10 of file CsvLogger.h.

Constructor & Destructor Documentation

CSVLogger::CSVLogger ( )

Definition at line 3 of file CsvLogger.cpp.

CSVLogger::~CSVLogger ( )
virtual

Definition at line 8 of file CsvLogger.cpp.

Member Function Documentation

void CSVLogger::addColumn ( std::string  name)

Definition at line 9 of file CsvLogger.cpp.

bool CSVLogger::clear ( )

Definition at line 79 of file CsvLogger.cpp.

bool CSVLogger::close ( )

Definition at line 69 of file CsvLogger.cpp.

bool CSVLogger::isOpen ( )

Definition at line 68 of file CsvLogger.cpp.

void CSVLogger::newSession ( )

Definition at line 91 of file CsvLogger.cpp.

bool CSVLogger::open ( )

Definition at line 55 of file CsvLogger.cpp.

void CSVLogger::setFilepath ( std::string  path)
inline

Definition at line 22 of file CsvLogger.h.

void CSVLogger::setRecording ( bool  recording)
inline

Definition at line 28 of file CsvLogger.h.

void CSVLogger::updateColumn ( std::string  name,
double  value 
)

Definition at line 10 of file CsvLogger.cpp.

bool CSVLogger::writeHeader ( )

Definition at line 15 of file CsvLogger.cpp.

bool CSVLogger::writeRow ( )

Definition at line 33 of file CsvLogger.cpp.

Member Data Documentation

unsigned int CSVLogger::currentSession = 1
private

Definition at line 36 of file CsvLogger.h.

bool CSVLogger::isRecording = false
private

Definition at line 35 of file CsvLogger.h.

columns_type CSVLogger::m_columns
private

Definition at line 32 of file CsvLogger.h.

std::shared_ptr<std::ofstream> CSVLogger::m_file
private

Definition at line 33 of file CsvLogger.h.

std::string CSVLogger::m_filepath
private

Definition at line 34 of file CsvLogger.h.


The documentation for this class was generated from the following files:


mvsim
Author(s):
autogenerated on Thu Jun 6 2019 19:36:41