15 class IBasicCSVParser;
91 this->no_quote = !use_quote;
97 this->variable_column_policy = policy;
107 #ifndef DOXYGEN_SHOULD_SKIP_THIS
108 char get_delim()
const {
110 if (this->possible_delimiters.size() > 1) {
111 throw std::runtime_error(
"There is more than one possible delimiter.");
114 return this->possible_delimiters.at(0);
117 CONSTEXPR bool is_quoting_enabled()
const {
return !this->no_quote; }
118 CONSTEXPR char get_quote_char()
const {
return this->quote_char; }
119 CONSTEXPR int get_header()
const {
return this->header; }
120 std::vector<char> get_possible_delims()
const {
return this->possible_delimiters; }
121 std::vector<char> get_trim_chars()
const {
return this->trim_chars; }
128 format.
delimiter({
',',
'|',
'\t',
';',
'^' })
136 return this->possible_delimiters.size() > 1;
140 friend internals::IBasicCSVParser;
144 void assert_no_char_overlap();
147 std::vector<char> possible_delimiters = {
',' };
150 std::vector<char> trim_chars = {};
156 bool no_quote =
false;
159 char quote_char =
'"';
162 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.
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.