libdballe 9.14
dballe::DBValues Struct Reference

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

#include <values.h>

Inheritance diagram for dballe::DBValues:
dballe::impl::ValuesBase< DBValue >

Public Member Functions

 DBValues (const Values &)
 DBValues (Values &&)
DBValues & operator= (const Values &)
DBValues & operator= (Values &&)
bool vars_equal (const DBValues &o) const
 Check if the variables are the same, regardless of the data_id.
void set_data_id (wreport::Varcode code, int data_id)
 Set the database ID for the Value with this wreport::Varcode.
void clear_ids ()
 Reset all the database IDs.
Public Member Functions inherited from dballe::impl::ValuesBase< DBValue >
ValuesBase & operator= (const ValuesBase &)=default
const_iterator begin () const
const_iterator end () const
const_iterator cbegin () const
const_iterator cend () const
iterator find (wreport::Varcode code) noexcept
size_t size () const
bool empty () const
void clear ()
void reserve (typename std::vector< DBValue >::size_type size)
bool operator== (const ValuesBase< DBValue > &o) const
bool operator!= (const ValuesBase< DBValue > &o) const
void set (const wreport::Var &)
 Set from a wreport::Var.
void unset (wreport::Varcode code)
 Remove one variable.
void merge (const ValuesBase< DBValue > &vals)
 Add all the variables from vals.
void setf (const C &code, const T &val)
const DBValuevalue (wreport::Varcode code) const
 Lookup a value, throwing an exception if not found.
const wreport::Varvar (wreport::Varcode code) const
 Lookup a wreport::Var, throwing an exception if not found.
const DBValuemaybe_value (wreport::Varcode code) const
 Lookup a value, returning nullptr if not found.
const wreport::Varmaybe_var (wreport::Varcode code) const
 Lookup a variable, returning nullptr if not found.
enq (C code, const T &def)
 Get the value of a variable, or def if it is not set.
void move_to_attributes (wreport::Var &dest)
 Move all the Var as attributes to dest.
void move_to (std::function< void(std::unique_ptr< wreport::Var >)> dest)
 Move all the Var passing them to the given function.
void print (FILE *out) const
 Print the contents of this Values.
std::vector< uint8_t > encode () const
 Encode these values in a DB-All.e specific binary representation.

Additional Inherited Members

Public Types inherited from dballe::impl::ValuesBase< DBValue >
typedef std::vector< DBValue >::const_iterator const_iterator
typedef std::vector< DBValue >::iterator iterator
Static Public Member Functions inherited from dballe::impl::ValuesBase< DBValue >
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.
Protected Member Functions inherited from dballe::impl::ValuesBase< DBValue >
iterator insert_new (DBValue &&val)
Protected Attributes inherited from dballe::impl::ValuesBase< DBValue >
std::vector< DBValuem_values

Detailed Description

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


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