|
RAPIDO
Repeatable Analysis Programming for Interpretability, Durability, and Organization
|
#include <utilities.h>
Public Member Functions | |
| CSVFile (std::ofstream &new_ofstream, std::string new_name, std::vector< std::string > new_headers) | |
| virtual | ~CSVFile () |
| CSVFile | clone (std::string new_name) |
| template<typename Type > | |
| void | pushCol (Type value) |
| void | writeRow (bool append=true) |
Public Attributes | |
| std::ofstream & | ofstream |
| std::string | name |
| std::vector< std::string > | headers |
| std::vector< std::string > | buffer |
Object for handling CSV I/O
| Utilities::CSVFile::CSVFile | ( | std::ofstream & | new_ofstream, |
| std::string | new_name, | ||
| std::vector< std::string > | new_headers ) |
CSVFile object constructor
| new_ofstream | reference of an existing ofstream object |
| new_name | name of new CSV file (e.g. output.csv) |
| new_headers | headers for new CSV file columns |
|
virtual |
CSVFile object destructor
| CSVFile Utilities::CSVFile::clone | ( | std::string | new_name | ) |
| void Utilities::CSVFile::pushCol | ( | Type | value | ) |
Push a new column entry to buffer
| Type | type of column entry |
| value | new column entry |
| void Utilities::CSVFile::writeRow | ( | bool | append = true | ) |
Write buffer to CSV file
| append | Toggle "append" mode (optional) |
| std::vector<std::string> Utilities::CSVFile::buffer |
Buffer for staging column values
| std::vector<std::string> Utilities::CSVFile::headers |
Headers for CSV columns
| std::string Utilities::CSVFile::name |
Name (e.g. output.csv) of CSV file
| std::ofstream& Utilities::CSVFile::ofstream |
fstream object for writing files