|
| CSVWriter () |
| Creates a new instance.
|
|
void | SetSeparator (const std::wstring &sep) throw (sparksee::gdb::Error) |
| Sets the character used to separate fields in the file. More...
|
|
void | SetQuotes (const std::wstring "es) throw (sparksee::gdb::Error) |
| Sets the character used to quote fields. More...
|
|
void | SetAutoQuotes (sparksee::gdb::bool_t autoquotes) |
| Sets on/off the automatic quote mode. More...
|
|
void | SetForcedQuotes (sparksee::gdb::BooleanList &forcequotes) |
| Disables the automatic quote mode and forces to be quoted those positions set to TRUE in the given vector. More...
|
|
void | SetLocale (const std::wstring &localeStr) |
| Sets the locale that will be used to write the file. More...
|
|
void | Open (const std::wstring &f) throw (sparksee::gdb::IOException) |
| Opens the output file path. More...
|
|
void | Write (sparksee::gdb::StringList &row) throw (sparksee::gdb::IOException, sparksee::gdb::Error) |
| Writes the next row. More...
|
|
void | Close () throw (sparksee::gdb::IOException, sparksee::gdb::Error) |
| Closes the writer. More...
|
|
virtual | ~CSVWriter () |
| Destructor.
|
|
CSVWriter interface.
A very simple CSV writer implementing RowWriter.
It works as any other RowWriter, but open must be called once before the first write operation.
It uses the format RFC 4180: http://tools.ietf.org/html/rfc4180
You can use your own separators and quote characters. By default the separator is the comma (,) and the quote character is the double quotes (") and autoquote is enabled.
See the CSVReader locale documentation or the SPARKSEE User Manual.
Check out the 'Data export' section in the SPARKSEE User Manual for more details on this.
- Author
- Sparsity Technologies http://www.sparsity-technologies.com