CsvFileWriter.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// Qore CsvFileWriter class definition
/* CsvFileWriter.qc Copyright 2012 - 2018 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// assume local var scope, do not use "$" for vars, members, and method calls
namespace CsvUtil {
class CsvFileWriter : public AbstractCsvWriter {
public:
protected:
Qore::File file;
public:
constructor(string path, *hash<auto> opts) ;
constructor(string path, hash<auto> spec, hash<auto> opts) ;
string getFileName();
protected:
openFile(string path);
public:
protected:
writeRawLine(list<auto> values);
public:
}; // CsvFileWriter class
}; // CsvUtil namespace
CsvUtil::CsvFileWriter::file
Qore::File file
the file to write
Definition: CsvFileWriter.qc.dox.h:39
CsvUtil::CsvFileWriter::getFileName
string getFileName()
returns the output file path
CsvUtil::CsvFileWriter::writeRawLine
writeRawLine(list< auto > values)
This method must be overridden in child classes to provide the output implementation.
CsvUtil::AbstractCsvWriter
The AbstractCsvWriter class provides a parent for all CSV writers.
Definition: AbstractCsvWriter.qc.dox.h:139
CsvUtil::CsvFileWriter::constructor
constructor(string path, *hash< auto > opts)
creates the CsvFileWriter in single-type mode with the path of the file to create and an optional opt...
Qore::File
CsvUtil
the CsvUtil namespace. All classes used in the CsvUtil module should be inside this namespace ...
Definition: AbstractCsvIterator.qc.dox.h:28
CsvUtil::CsvFileWriter
The CsvFileWriter class for safe CSV file creation.
Definition: CsvFileWriter.qc.dox.h:34