Utility class to read a CSV file. More...

#include <CSV.h>

Classes

class  Private
 

Public Member Functions

 CSV (std::string const &path)
 
 CSV (CSV &&)
 
 ~CSV ()
 
bool NextRecord ()
 
std::string NextValue (unsigned skip=0)
 
double NextValueAsDouble (unsigned skip=0)
 
std::string Record () const
 

Static Public Member Functions

static void SplitCSV (const std::string &originalCSV, const std::map< std::string, std::vector< std::string > > &fileMapping)
 

Private Member Functions

 CSV (CSV const &)=delete
 

Private Attributes

std::unique_ptr< Privatem_p
 

Detailed Description

Utility class to read a CSV file.

Constructor & Destructor Documentation

◆ CSV() [1/3]

CSV::CSV ( std::string const &  path)

Constructor.

Parameters
configPath to CSV file to read.

◆ CSV() [2/3]

CSV::CSV ( CSV &&  other)

◆ ~CSV()

CSV::~CSV ( )

◆ CSV() [3/3]

CSV::CSV ( CSV const &  )
privatedelete

Member Function Documentation

◆ NextRecord()

bool CSV::NextRecord ( )

◆ NextValue()

std::string CSV::NextValue ( unsigned  skip = 0)

◆ NextValueAsDouble()

double CSV::NextValueAsDouble ( unsigned  skip = 0)

◆ Record()

std::string CSV::Record ( ) const

◆ SplitCSV()

void CSV::SplitCSV ( const std::string &  originalCSV,
const std::map< std::string, std::vector< std::string > > &  fileMapping 
)
static

Member Data Documentation

◆ m_p

std::unique_ptr<Private> CSV::m_p
private

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.