GCBM
|
#include <cbmaggregatorcsvwriter.h>
Public Member Functions | |
CBMFlatFile (const std::string &path, const std::string &header) | |
virtual | ~CBMFlatFile ()=default |
void | write (const std::string &text) |
void | save () |
Private Attributes | |
std::string | _path |
std::string | _tempPath |
std::unique_ptr< Poco::File > | _outputFile |
std::unique_ptr< Poco::FileOutputStream > | _streamFile |
std::unique_ptr< Poco::TeeOutputStream > | _outputStream |
CBMFlatFile | ( | const std::string & | path, |
const std::string & | header | ||
) |
Constructor
Initialise CBMFlatFile._tempPath to a temporary file path, as parameter path + "_" + random number generated using rand(),
CBMFlatFile._outputFile as a unique pointer to CBMFlatFile._tempPath of type Poco::File,
CBMFlatFile._streamFile as a unique pointer to CBMFlatFile._tempPath of type Poco::FileOutputStream
CBMFlatFile. _outputStream as a unique pointer to CBMFlatFile._streamFile of type Poco::TeeOutputStream
The parameter is written in the _outputStream.
path | string& |
header | string& |
|
virtualdefault |
void save | ( | ) |
Save an existing file
void write | ( | const std::string & | text | ) |
Write parameter text to *_outputStream
text | string& |
|
private |
|
private |
|
private |
|
private |
|
private |