26 Value(
Value&& o) : m_var(o.m_var) { o.m_var =
nullptr; }
32 Value(std::unique_ptr<wreport::Var>&& var) : m_var(var.
release()) {}
39 bool operator==(
const Value& o)
const;
40 bool operator!=(
const Value& o)
const;
58 void reset(std::unique_ptr<wreport::Var>&& var);
93 bool operator==(
const DBValue& o)
const;
94 bool operator!=(
const DBValue& o)
const;
100std::ostream& operator<<(std::ostream&,
const Value&);
101std::ostream& operator<<(std::ostream&,
const DBValue&);
Container for a wreport::Var pointer.
Definition: value.h:19
void print(FILE *out) const
Print the contents of this Value.
Value(std::unique_ptr< wreport::Var > &&var)
Construct from a wreport::Var, taking ownership of it.
Definition: value.h:32
void reset(const wreport::Var &var)
Fill from a wreport::Var.
Value(const wreport::Var &var)
Construct from a wreport::Var.
void reset(std::unique_ptr< wreport::Var > &&var)
Fill from a wreport::Var, taking ownership of it.
wreport::Varcode code() const
Return the varcode of the variable, or 0 if no variable has been set.
std::unique_ptr< wreport::Var > release()
Return the Var pointer, setting the Value to undefined.
Container for a wreport::Var pointer, and its database ID.
Definition: value.h:72
int data_id
Database ID of the value.
Definition: value.h:76
void print(FILE *out) const
Print the contents of this Value.
DBValue(int data_id, std::unique_ptr< wreport::Var > &&var)
Construct from a wreport::Var, taking ownership of it.
Definition: value.h:87
DBValue(int data_id, const wreport::Var &var)
Construct from a wreport::Var.
Definition: value.h:83