libdballe  7.6
Public Member Functions | Data Fields
dballe::memdb::serialize::CSVOutfile Struct Reference

CSVWriter implementation that writes its output file atomically. More...

#include <serializer.h>

Inheritance diagram for dballe::memdb::serialize::CSVOutfile:
dballe::CSVWriter

Public Member Functions

 CSVOutfile (const std::string &pathname)
 
void open (const std::string &pathname)
 
void commit ()
 Commit the write, closing the output temporary file and renaming it to its final name.
 
void rollback ()
 Roll back the write, deleting the output temporary file and leaving the original untouched.
 
virtual void flush_row ()
 Write the current line to the output file, and start a new one.
 
- Public Member Functions inherited from dballe::CSVWriter
void add_value_empty ()
 Add an empty value to the current row.
 
void add_value_raw (const char *str)
 Add a value to the current row, without any escaping.
 
void add_value_raw (const std::string &str)
 Add a value to the current row, without any escaping.
 
void add_value (int val)
 Add an int value to the current row.
 
void add_value_withmissing (int val)
 Add an int value that can potentially be missing.
 
void add_value (unsigned val)
 Add an int value to the current row.
 
void add_value (uint64_t val)
 Add an int value to the current row.
 
void add_value (wreport::Varcode val)
 Add an int value to the current row.
 
void add_var_value (const wreport::Var &val)
 Add a variable value.
 
void add_value (const char *val)
 Add a string to the current row.
 
void add_value (const std::string &val)
 Add a string to the current row.
 

Data Fields

std::string pathname
 
std::string pathname_tmp
 
FILE * fd
 

Additional Inherited Members

- Protected Attributes inherited from dballe::CSVWriter
std::string row
 

Detailed Description

CSVWriter implementation that writes its output file atomically.


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