15 class IBasicCSVParser;
91 this->no_quote = !use_quote;
97 this->variable_column_policy = policy;
118 #ifndef DOXYGEN_SHOULD_SKIP_THIS
119 char get_delim()
const {
121 if (this->possible_delimiters.size() > 1) {
122 throw std::runtime_error(
"There is more than one possible delimiter.");
125 return this->possible_delimiters.at(0);
128 CONSTEXPR bool is_quoting_enabled()
const {
return !this->no_quote; }
129 CONSTEXPR char get_quote_char()
const {
return this->quote_char; }
130 CONSTEXPR int get_header()
const {
return this->header; }
131 std::vector<char> get_possible_delims()
const {
return this->possible_delimiters; }
132 std::vector<char> get_trim_chars()
const {
return this->trim_chars; }
134 CONSTEXPR size_t get_chunk_size()
const {
return this->_chunk_size; }
140 format.
delimiter({
',',
'|',
'\t',
';',
'^' })
148 return this->possible_delimiters.size() > 1;
152 friend internals::IBasicCSVParser;
156 void assert_no_char_overlap();
159 std::vector<char> possible_delimiters = {
',' };
162 std::vector<char> trim_chars = {};
168 bool no_quote =
false;
171 char quote_char =
'"';
174 std::vector<std::string> col_names = {};
A standalone header file containing shared code.
#define CONSTEXPR
Expands to constexpr in decent compilers and inline otherwise.
#define CSV_INLINE
Helper macro which should be #defined as "inline" in the single header version.
constexpr size_t ITERATION_CHUNK_SIZE
Chunk size for lazy-loading large CSV files.
The all encompassing namespace.
VariableColumnPolicy
Determines how to handle rows that are shorter or longer than the majority.
Stores the inferred format of a CSV file.