Lumiera  0.pre.03
»edit your freedom«
CSVData Struct Reference

#include "lib/stat/csv.hpp"

Description

Wrapper to simplify notation in tests.

Accepts data suitable for representation as CSV

  • either as an std::initializer_list<string> for pre-formatted rows
  • or as a sequence of strings (words) to form a single header line
  • or a list of strings for the header, and then a list of data tuples, which will be rendered into data rows in CSV format Since this wrapper is-a vector<string>, the rows can be retrieved directly and then rendered, or the operator string() can be used to retrieve the complete data set in a single string of data lines.

Definition at line 149 of file csv.hpp.

Public Types

using VecCSV = std::vector< CSVLine >
 

Public Member Functions

 CSVData (std::initializer_list< string > lines)
 
 CSVData (std::initializer_list< string > header, std::initializer_list< CSVLine > data)
 
 operator string () const
 

Static Private Member Functions

static void appendHeaderLine (VecCSV &data, std::initializer_list< string > const &input)
 
static bool containsCSV (string const &line)
 
static VecCSV detectHeader (std::initializer_list< string > input)
 
+ Inheritance diagram for CSVData:
+ Collaboration diagram for CSVData:

The documentation for this struct was generated from the following file: