libdballe  7.21
Public Types | Public Member Functions | Static Public Member Functions | List of all members
dballe::Values Struct Reference

Collection of Value objects, indexed by wreport::Varcode. More...

#include <values.h>

Inheritance diagram for dballe::Values:

Public Types

typedef std::map< wreport::Varcode, values::Value >::const_iterator const_iterator
 
typedef std::map< wreport::Varcode, values::Value >::iterator iterator
 

Public Member Functions

 Values (const dballe::Record &rec)
 
const_iterator begin () const
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 
size_t size () const
 
bool empty () const
 
void clear ()
 
void erase (wreport::Varcode code)
 
bool operator== (const Values &o) const
 
const values::Valueoperator[] (wreport::Varcode code) const
 
const values::Valueoperator[] (const char *code) const
 
const values::Valueoperator[] (const std::string &code) const
 
const values::Valueget (wreport::Varcode code) const
 
const values::Valueget (const char *code) const
 
const values::Valueget (const std::string &code) const
 
void set (const wreport::Var &)
 Set from a wreport::Var.
 
void set (std::unique_ptr< wreport::Var > &&)
 Set from a wreport::Var, taking ownership of it.
 
void set (const Values &vals)
 Set with all the variables from vals.
 
template<typename C , typename T >
void set (C code, const T &val)
 Set from a variable created by dballe::newvar()
 
void add_data_id (wreport::Varcode code, int data_id)
 Set the database ID for the Value with this wreport::Varcode.
 
void set_from_record (const Record &rec)
 Set from the contents of a dballe::Record.
 
void clear_ids ()
 Reset all the database IDs.
 
std::vector< uint8_t > encode () const
 Encode these values in a DB-All.e specific binary representation.
 
void print (FILE *out) const
 Print the contents of this Values.
 

Static Public Member Functions

static std::vector< uint8_t > encode_attrs (const wreport::Var &var)
 Encode the attributes of var in a DB-All.e specific binary representation.
 
static void decode (const std::vector< uint8_t > &buf, std::function< void(std::unique_ptr< wreport::Var >)> dest)
 Decode variables from a DB-All.e specific binary representation.
 

Detailed Description

Collection of Value objects, indexed by wreport::Varcode.


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