26#include <ql/types.hpp>
28#include <boost/tokenizer.hpp>
41 CSVReader(
const bool firstLineContainsHeaders,
const std::string& delimiters =
",;\t",
42 const std::string& escapeCharacters =
"\\",
const std::string& quoteCharacters =
"\"",
43 const char eolMarker =
'\n');
51 const std::vector<std::string>&
fields()
const;
53 const bool hasField(
const std::string& field)
const;
61 std::string
get(
const std::string& field)
const;
63 std::string
get(
const Size column)
const;
72 boost::tokenizer<boost::escaped_list_separator<char>>
tokenizer_;
79 CSVFileReader(
const std::string& fileName,
const bool firstLineContainsHeaders,
80 const std::string& delimiters =
",;\t",
const std::string& escapeCharacters =
"\\",
81 const std::string& quoteCharacters =
"\"",
const char eolMarker =
'\n');
83 void close()
override;
93 CSVBufferReader(
const std::string& CSVBuffer,
const bool firstLineContainsHeaders,
94 const std::string& delimiters =
",;\t",
const std::string& escapeCharacters =
"\\",
95 const std::string& quoteCharacters =
"\"",
const char eolMarker =
'\n');
const std::string bufferName_
const std::string fileName_
std::vector< std::string > headers_
Size numberOfColumns() const
const std::vector< std::string > & fields() const
void setStream(std::istream *stream)
const bool hasField(const std::string &field) const
boost::tokenizer< boost::escaped_list_separator< char > > tokenizer_
std::vector< std::string > data_
std::string get(const std::string &field) const
Serializable Credit Default Swap.