Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
CSVBufferReader Class Reference

#include <ored/utilities/csvfilereader.hpp>

+ Inheritance diagram for CSVBufferReader:
+ Collaboration diagram for CSVBufferReader:

Public Member Functions

 CSVBufferReader (const std::string &CSVBuffer, const bool firstLineContainsHeaders, const std::string &delimiters=",;\t", const std::string &escapeCharacters="\\", const std::string &quoteCharacters="\"", const char eolMarker='\n')
 
- Public Member Functions inherited from CSVReader
 CSVReader (const bool firstLineContainsHeaders, const std::string &delimiters=",;\t", const std::string &escapeCharacters="\\", const std::string &quoteCharacters="\"", const char eolMarker='\n')
 
virtual ~CSVReader ()
 
void setStream (std::istream *stream)
 
const std::vector< std::string > & fields () const
 
const bool hasField (const std::string &field) const
 
Size numberOfColumns () const
 
bool next ()
 
Size currentLine () const
 
std::string get (const std::string &field) const
 
std::string get (const Size column) const
 
virtual void close ()
 

Private Attributes

const std::string bufferName_
 

Detailed Description

Definition at line 90 of file csvfilereader.hpp.

Constructor & Destructor Documentation

◆ CSVBufferReader()

CSVBufferReader ( const std::string &  CSVBuffer,
const bool  firstLineContainsHeaders,
const std::string &  delimiters = ",;\t",
const std::string &  escapeCharacters = "\\",
const std::string &  quoteCharacters = "\"",
const char  eolMarker = '\n' 
)

Ctor

Definition at line 135 of file csvfilereader.cpp.

138 : CSVReader(firstLineContainsHeaders, delimiters, escapeCharacters, quoteCharacters, eolMarker),
139 bufferName_(bufferName) {
140
141 // process the buffer
142 std::stringstream *buffer = new std::stringstream(bufferName);
143
144 // set buffer stream
145 setStream(buffer);
146
147}
const std::string bufferName_
CSVReader(const bool firstLineContainsHeaders, const std::string &delimiters=",;\t", const std::string &escapeCharacters="\\", const std::string &quoteCharacters="\"", const char eolMarker='\n')
void setStream(std::istream *stream)
+ Here is the call graph for this function:

Member Data Documentation

◆ bufferName_

const std::string bufferName_
private

Definition at line 98 of file csvfilereader.hpp.