|
LSSTApplications
8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
|
Parameters that define a Character-Separated-Value dialect. More...
#include <CsvControl.h>
Public Types | |
| enum | Quoting { QUOTE_NONE = 0, QUOTE_ALL, QUOTE_MINIMAL } |
Public Member Functions | |
| CsvControl () | |
| ~CsvControl () | |
| bool | isNullRecognizable () const |
| Quoting | getQuoting () const |
| char | getDelimiter () const |
| char | getEscapeChar () const |
| char | getQuoteChar () const |
| void | validate () const |
Public Attributes | |
| std::string | null |
| "String representation of NULL field values. Never quoted on output.\n" "If specified, the representation may not contain any delimiter,\n" "quote, escape or line terminator characters ('\\n'/'\\r').\n" ; More... | |
| bool | hasNull |
| "Indicates whether the null string is valid. If set to false, the only\n" "way NULLs can be recognized/written is if standardEscapes is set to\n" "true (in which case '\\N' is mapped to NULL, assuming that '\\' is\n" "the escape character).\n" ; More... | |
| std::string | quoting |
| "Field quoting style for CSV input/output. Legal values are:\n" "\n" "'QUOTE_MINIMAL': Only quote fields when necessary - for instance,\n" " when a field value contains a delimiter character.\n" "\n" "'QUOTE_NONE': Never quote fields.\n" "\n" "'QUOTE_ALL': Always quote fields.\n" ; More... | |
| std::string | delimiter |
| "A one character string containing the field delimiter character.\n" "Values of '\\0', '\\n', or '\\r' are illegal.\n" ; More... | |
| std::string | escapeChar |
| "A one character string containing the escape character. An empty\n" "string is mapped to an escape character of '\\0', which disables\n" "escaping. A value equal to the delimiter or quote character is\n" "illegal, with one exception: both the escape and quote characters\n" "can be '\\0'. The '\\n' and '\\r' characters are also illegal.\n" ; More... | |
| std::string | quoteChar |
| "A one character string containing the character used to quote fields\n" "when quoting is set to either 'QUOTE_ALL' or 'QUOTE_MINIMAL'. An\n" "empty string is mapped to a quote character of '\\0', which disables\n" "quoting (and is only legal when quoting is set to 'QUOTE_NONE'). A\n" "value equal to the delimiter or quote character is illegal, with one\n" "exception: both the escape and quote characters can be '\\0'. The\n" "'\\n' and '\\r' characters are also illegal.\n" ; More... | |
| bool | skipInitialSpace |
| "If true, whitespace immediately following the delimiter is ignored." ; More... | |
| bool | doubleQuote |
| "If true, embedded quote characters are escaped with a leading quote\n" "character. Otherwise the escape character is used. If escaping and\n" "double-quoting are disabled, writing a field with embedded quote\n" "character will raise an exception.\n" ; More... | |
| bool | standardEscapes |
| "Flag indicating whether standard escape sequences should be handled.\n" "If false, then the character sequence '\\C', where C is any character,\n" "is mapped to C (assuming '\\' is the escape character). If true,\n" "the following special cases are handled differently:\n" "\n" "- '\\b' is mapped to BS - backspace (ASCII 8)\n" "- '\\f' is mapped to FF - form feed (ASCII 12)\n" "- '\\n' is mapped to NL - newline (ASCII 10)\n" "- '\\r' is mapped to CR - carriage return (ASCII 13)\n" "- '\\t' is mapped to TAB - horizontal tab (ASCII 9)\n" "- '\\v' is mapped to VT - vertical tab (ASCII 11)\n" "- '\\xD' and '\\xDD', where D is a hexadecimal digit, is mapped to\n" " the character with that numeric code.\n" "- A field value of exactly '\\N' (no quotes, whitespace, or other\n" " content) is treated as a NULL.\n" ; More... | |
| bool | trailingDelimiter |
| "If true, then a trailing delimiter character is expected and written\n" "at end of every record, immediately preceding the line terminator.\n" ; More... | |
| bool | nonfiniteAsNull |
| "If true, then non-finite (NaN, Inf, -Inf) floating point values are\n" "written out as NULL field values.\n" ; More... | |
Parameters that define a Character-Separated-Value dialect.
These are intended to cover variations on the ubiquitous but often inconsistently defined comma-separated-value and tab-separated-value formats, and largely follow the parameters for dialect specification in the python csv module. One important goal is to allow the CSV output of various RDBMSes to be read and written. Accordingly, there are parameters that allow database NULLs to be recognized.
Definition at line 48 of file CsvControl.h.
| Enumerator | |
|---|---|
| QUOTE_NONE |
Never quote fields. |
| QUOTE_ALL |
Always quote fields. |
| QUOTE_MINIMAL |
Only quote fields when necessary. |
Definition at line 49 of file CsvControl.h.
| lsst::ap::utils::CsvControl::CsvControl | ( | ) |
Definition at line 39 of file CsvControl.cc.
| lsst::ap::utils::CsvControl::~CsvControl | ( | ) |
Definition at line 55 of file CsvControl.cc.
|
inline |
Definition at line 155 of file CsvControl.h.
|
inline |
Definition at line 158 of file CsvControl.h.
|
inline |
Definition at line 161 of file CsvControl.h.
|
inline |
Returns the dialects quoting style. Note that if this is equal to QUOTE_NONE, no special handling of quote characters on reading is performed.
Definition at line 146 of file CsvControl.h.
|
inline |
Returns true if database NULLs are recognizable in this dialect. This is the case when hasNull is true, or when escapeChar is not '\0' and standardEscapes is true (in which case "\N" is recognized as a NULL).
Definition at line 138 of file CsvControl.h.
| void lsst::ap::utils::CsvControl::validate | ( | ) | const |
Definition at line 57 of file CsvControl.cc.
| std::string lsst::ap::utils::CsvControl::delimiter |
"A one character string containing the field delimiter character.\n" "Values of '\\0', '\\n', or '\\r' are illegal.\n" ;
Definition at line 81 of file CsvControl.h.
| bool lsst::ap::utils::CsvControl::doubleQuote |
"If true, embedded quote characters are escaped with a leading quote\n" "character. Otherwise the escape character is used. If escaping and\n" "double-quoting are disabled, writing a field with embedded quote\n" "character will raise an exception.\n" ;
Definition at line 106 of file CsvControl.h.
| std::string lsst::ap::utils::CsvControl::escapeChar |
"A one character string containing the escape character. An empty\n" "string is mapped to an escape character of '\\0', which disables\n" "escaping. A value equal to the delimiter or quote character is\n" "illegal, with one exception: both the escape and quote characters\n" "can be '\\0'. The '\\n' and '\\r' characters are also illegal.\n" ;
Definition at line 88 of file CsvControl.h.
| bool lsst::ap::utils::CsvControl::hasNull |
"Indicates whether the null string is valid. If set to false, the only\n" "way NULLs can be recognized/written is if standardEscapes is set to\n" "true (in which case '\\N' is mapped to NULL, assuming that '\\' is\n" "the escape character).\n" ;
Definition at line 67 of file CsvControl.h.
| bool lsst::ap::utils::CsvControl::nonfiniteAsNull |
"If true, then non-finite (NaN, Inf, -Inf) floating point values are\n" "written out as NULL field values.\n" ;
Definition at line 131 of file CsvControl.h.
| std::string lsst::ap::utils::CsvControl::null |
"String representation of NULL field values. Never quoted on output.\n" "If specified, the representation may not contain any delimiter,\n" "quote, escape or line terminator characters ('\\n'/'\\r').\n" ;
Definition at line 61 of file CsvControl.h.
| std::string lsst::ap::utils::CsvControl::quoteChar |
"A one character string containing the character used to quote fields\n" "when quoting is set to either 'QUOTE_ALL' or 'QUOTE_MINIMAL'. An\n" "empty string is mapped to a quote character of '\\0', which disables\n" "quoting (and is only legal when quoting is set to 'QUOTE_NONE'). A\n" "value equal to the delimiter or quote character is illegal, with one\n" "exception: both the escape and quote characters can be '\\0'. The\n" "'\\n' and '\\r' characters are also illegal.\n" ;
Definition at line 97 of file CsvControl.h.
| std::string lsst::ap::utils::CsvControl::quoting |
"Field quoting style for CSV input/output. Legal values are:\n" "\n" "'QUOTE_MINIMAL': Only quote fields when necessary - for instance,\n" " when a field value contains a delimiter character.\n" "\n" "'QUOTE_NONE': Never quote fields.\n" "\n" "'QUOTE_ALL': Always quote fields.\n" ;
Definition at line 77 of file CsvControl.h.
| bool lsst::ap::utils::CsvControl::skipInitialSpace |
"If true, whitespace immediately following the delimiter is ignored." ;
Definition at line 100 of file CsvControl.h.
| bool lsst::ap::utils::CsvControl::standardEscapes |
"Flag indicating whether standard escape sequences should be handled.\n" "If false, then the character sequence '\\C', where C is any character,\n" "is mapped to C (assuming '\\' is the escape character). If true,\n" "the following special cases are handled differently:\n" "\n" "- '\\b' is mapped to BS - backspace (ASCII 8)\n" "- '\\f' is mapped to FF - form feed (ASCII 12)\n" "- '\\n' is mapped to NL - newline (ASCII 10)\n" "- '\\r' is mapped to CR - carriage return (ASCII 13)\n" "- '\\t' is mapped to TAB - horizontal tab (ASCII 9)\n" "- '\\v' is mapped to VT - vertical tab (ASCII 11)\n" "- '\\xD' and '\\xDD', where D is a hexadecimal digit, is mapped to\n" " the character with that numeric code.\n" "- A field value of exactly '\\N' (no quotes, whitespace, or other\n" " content) is treated as a NULL.\n" ;
Definition at line 123 of file CsvControl.h.
| bool lsst::ap::utils::CsvControl::trailingDelimiter |
"If true, then a trailing delimiter character is expected and written\n" "at end of every record, immediately preceding the line terminator.\n" ;
Definition at line 127 of file CsvControl.h.
1.8.5