libdballe  7.7
Public Types | Public Member Functions | Data Fields
dballe::memdb::serialize::CSVValueStorageInfile< VALUES > Struct Template Reference

Common implementation bits of ValueStorage deserializers. More...

#include <serializer.h>

Inheritance diagram for dballe::memdb::serialize::CSVValueStorageInfile< VALUES >:
dballe::memdb::serialize::CSVInfile dballe::CSVReader

Public Types

typedef VALUES::value_type value_type
 

Public Member Functions

 CSVValueStorageInfile (VALUES &values)
 
const VALUES::value_type & by_lineno (size_t lineno) const
 
- Public Member Functions inherited from dballe::memdb::serialize::CSVInfile
 CSVInfile (const std::string &pathname)
 
void open (const std::string &pathname)
 Same as CSVReader::open, but it considers missing files as empty files.
 
template<typename INFILE >
void read_attrs (const INFILE &values)
 
- Public Member Functions inherited from dballe::CSVReader
 CSVReader (std::istream &in)
 
 CSVReader (const std::string &pathname)
 
void open (const std::string &pathname)
 Open the given file and sets close_on_exit to true.
 
void close ()
 Sets in to 0. More...
 
int as_int (unsigned col) const
 Return the given column, as an integer. More...
 
int as_int_withmissing (unsigned col) const
 Return the given column, as an integer. More...
 
wreport::Varcode as_varcode (unsigned col) const
 Return the given column, as a Varcode. More...
 
bool move_to_data (unsigned number_col=0)
 Find the first line where the given column exists and starts with a number. More...
 
bool next ()
 Read the next CSV line, returning false if EOF is reached.
 

Data Fields

VALUES & values
 
std::map< size_t, size_t > id_map
 
- Data Fields inherited from dballe::memdb::serialize::CSVInfile
std::string pathname
 
- Data Fields inherited from dballe::CSVReader
bool close_on_exit
 If true, the input stream will be deleted upon destruction. More...
 
std::string line
 Last line read.
 
std::vector< std::string > cols
 Parsed CSV columns for the last line read.
 

Additional Inherited Members

- Static Public Member Functions inherited from dballe::CSVReader
static std::string unescape (const std::string &csvstr)
 
- Protected Member Functions inherited from dballe::CSVReader
int next_char ()
 
- Protected Attributes inherited from dballe::CSVReader
std::istream * in
 

Detailed Description

template<typename VALUES>
struct dballe::memdb::serialize::CSVValueStorageInfile< VALUES >

Common implementation bits of ValueStorage deserializers.

It supports mapping line numbers to the IDs of deserialized values.


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