AnCH Framework 0.2
Another C++ Hack: C++23 utility libraries
Loading...
Searching...
No Matches
anch::csv::Options Struct Reference

#include <options.hpp>

Collaboration diagram for anch::csv::Options:

Public Attributes

char separator = ','
char quote = '"'
bool crlf = true
bool header = true
bool bom = false
std::size_t maxRecordSize = 1024 * 1024
std::size_t maxSize = 0
std::size_t maxColumns = 1024
bool sameColumnCount = true
bool ignoreUnknownColumns = true
bool readCheckConstraints = true
bool writeCheckConstraints = false
std::string trueValue = "true"
std::string falseValue = "false"

Detailed Description

CSV format options. Default values follow RFC 4180 (, separator, " quote, CRLF line endings, header). Objects mapping options are used by anch::csv::ObjectReader and anch::csv::ObjectWriter .

Author
Vincent Lachenal
Since
0.3

Member Data Documentation

◆ bom

bool anch::csv::Options::bom = false

Write an UTF-8 BOM (spreadsheets) ; a BOM is always skipped when it is read

◆ crlf

bool anch::csv::Options::crlf = true

Written line ending: CRLF ( true ) or LF . Both are read.

◆ falseValue

std::string anch::csv::Options::falseValue = "false"

Objects mapping: text of false booleans

◆ header

bool anch::csv::Options::header = true

The first record is the header (column names)

◆ ignoreUnknownColumns

bool anch::csv::Options::ignoreUnknownColumns = true

Objects mapping: columns which are not fields are ignored ( false : UNKNOWN_COLUMN error)

◆ maxColumns

std::size_t anch::csv::Options::maxColumns = 1024

Maximum number of columns of a read record, 0 for no limit

◆ maxRecordSize

std::size_t anch::csv::Options::maxRecordSize = 1024 * 1024

Maximum size of a read record in bytes, 0 for no limit

◆ maxSize

std::size_t anch::csv::Options::maxSize = 0

Maximum size of the read input in bytes, 0 for no limit (server side bodies)

◆ quote

char anch::csv::Options::quote = '"'

Quote character

◆ readCheckConstraints

bool anch::csv::Options::readCheckConstraints = true

Objects mapping: fields constraints (anch-val) are checked when objects are read

◆ sameColumnCount

bool anch::csv::Options::sameColumnCount = true

Every read record has the number of columns of the first one (header or first record)

◆ separator

char anch::csv::Options::separator = ','

Fields separator (; , \t , ...)

◆ trueValue

std::string anch::csv::Options::trueValue = "true"

Objects mapping: text of true booleans

◆ writeCheckConstraints

bool anch::csv::Options::writeCheckConstraints = false

Objects mapping: fields constraints (anch-val) are checked when objects are written


The documentation for this struct was generated from the following file: