libdballe 9.6
Public Member Functions | List of all members
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 &&)
 
DBValuesoperator= (const Values &)
 
DBValuesoperator= (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 (const ValuesBase &)=default
 
 ValuesBase (ValuesBase &&)=default
 
ValuesBaseoperator= (const ValuesBase &)=default
 
ValuesBaseoperator= (ValuesBase &&)=default
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
iterator find (wreport::Varcode code) noexcept
 
const_iterator find (wreport::Varcode code) const 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 set (std::unique_ptr< wreport::Var > &&)
 Set from a wreport::Var, taking ownership of it.
 
void set (DBValue &&val)
 Set with a Value.
 
void set (const C &code, const T &val)
 Set a variable value, creating it if it does not exist.
 
void unset (wreport::Varcode code)
 Remove one variable.
 
void merge (const ValuesBase< DBValue > &vals)
 Add all the variables from vals.
 
void merge (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 DBValuevalue (const char *code) const
 
const DBValuevalue (const std::string &code) const
 
const wreport::Varvar (wreport::Varcode code) const
 Lookup a wreport::Var, throwing an exception if not found.
 
const wreport::Varvar (const char *code) const
 
const wreport::Varvar (const std::string &code) const
 
wreport::Varvar (wreport::Varcode code)
 Lookup a wreport::Var, throwing an exception if not found (non-const version)
 
wreport::Varvar (const char *code)
 
wreport::Varvar (const std::string &code)
 
const DBValuemaybe_value (wreport::Varcode code) const
 Lookup a value, returning nullptr if not found.
 
const DBValuemaybe_value (const char *code) const
 
const DBValuemaybe_value (const std::string &code) const
 
const wreport::Varmaybe_var (wreport::Varcode code) const
 Lookup a variable, returning nullptr if not found.
 
const wreport::Varmaybe_var (const char *code) const
 
const wreport::Varmaybe_var (const std::string &code) const
 
wreport::Varmaybe_var (wreport::Varcode code)
 Lookup a variable, returning nullptr if not found (non-const version)
 
wreport::Varmaybe_var (const char *code)
 
wreport::Varmaybe_var (const std::string &code)
 
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: