OSVR-Core
|
The "traditional" CSV class: get all your data set up ahead of time. More...
#include <CSV.h>
Public Member Functions | |
void | output (std::ostream &os) const |
Outputs all the stored rows and columns, with the union of all headers in the first row, quoted, to the std::ostream given. More... | |
![]() | |
RowProxy | row () |
Main call for the CSV object: returns a proxy object that you can redirect "cells" into, in order to add them to a new row in the CSV table. More... | |
std::size_t | numDataRows () const |
Gets the number of rows in the internal data storage. More... | |
std::size_t | numRows () const |
Gets the total number of rows that have been streamed/added to this CSV object, whether or not they're in the internal data storage. More... | |
![]() | |
column_id | getColumn (std::string const &heading) |
column_id | numColumns () const |
Friends | |
class | CSVBase< CSV > |
Additional Inherited Members | |
![]() | |
using | RowProxy = detail::CSVRowProxy< CSV > |
![]() | |
using | DataRow = std::vector< std::string > |
using | column_id = std::size_t |
![]() | |
void | prepareForRow () |
Called by CSVRowProxy life cycle, on row creation. | |
void | dataForLatestRow (std::string const &heading, std::string const &data) |
Called by CSVRowProxy life cycle, on cell addition. | |
void | finalizeLatestRow () |
Called by CSVRowProxy life cycle, on destruction of active row proxy. More... | |
DataRow & | latestRow () |
Called internally and potentially by derived classes for access to the "latest row" temporary storage. More... | |
void | outputRow (std::ostream &os, DataRow const &row) const |
Called by outputData() and by derived classes to format individual rows. More... | |
void | outputData (std::ostream &os) const |
Called by derived classes to output stored data rows. | |
void | moveLatestRowToData () |
utility function for use in derived finalizeLatestRow() | |
![]() | |
void | outputHeaders (std::ostream &os) const |
The "traditional" CSV class: get all your data set up ahead of time.
When you're ready to get your output, hand an ostream (like std::cout or your favorite std::ofstream) to .output()
|
inline |
Outputs all the stored rows and columns, with the union of all headers in the first row, quoted, to the std::ostream given.