|
| Record (const Record &rec) |
|
std::unique_ptr< dballe::Record > | clone () const override |
| Return a copy of this record.
|
|
Record & | operator= (const Record &rec) |
|
void | clear () override |
| Remove all contents from the record.
|
|
void | clear_vars () override |
| Remove all Bxxyyy keys from the record, leaving the rest intact.
|
|
void | seti (const char *key, int val) override |
| Set a key to an integer value. More...
|
|
void | setd (const char *key, double val) override |
| Set a key to a double value.
|
|
void | setc (const char *key, const char *val) override |
| Set a key to a string value. More...
|
|
void | sets (const char *key, const std::string &val) override |
| Set a key to a string value. More...
|
|
void | setf (const char *key, const char *val) override |
| Set a key to a string value. More...
|
|
void | set_datetime (const Datetime &dt) override |
| Set year, month, day, hour, min, sec.
|
|
void | set_datetimerange (const DatetimeRange &range) override |
| Set datetime-min and datetime-max values.
|
|
void | set_coords (const Coords &c) override |
| Set lat, lon.
|
|
void | set_latrange (const LatRange &lr) override |
| Set latmin, latmax.
|
|
void | set_lonrange (const LonRange &lr) override |
| Set lonmin, lonmax.
|
|
void | set_level (const Level &lev) override |
| Set leveltype1, l1, leveltype2, l2.
|
|
void | set_trange (const Trange &tr) override |
| Set pindicator, p1, p2.
|
|
void | set_var (const wreport::Var &var) override |
| Set var.code() == var.value()
|
|
void | set_var_acquire (std::unique_ptr< wreport::Var > &&var) override |
| Set var.code() == var.
|
|
void | unset (const char *name) override |
| Remove/unset a key from the record.
|
|
const wreport::Var * | get (const char *key) const override |
| Get a value, if set, or nullptr if not.
|
|
void | add (const dballe::Record &source) override |
| Copy all data from the record source into dest. More...
|
|
bool | contains (const dballe::Record &subset) const override |
| Return true if all elements of subset are present in this record, with the same value.
|
|
bool | equals (const dballe::Record &rec) const override |
| Check if two records are the same.
|
|
void | foreach_key_ref (std::function< void(const char *, const wreport::Var &)> dest) const override |
|
void | foreach_key_copy (std::function< void(const char *, std::unique_ptr< wreport::Var > &&)> dest) const override |
|
void | print (FILE *out) const override |
| Print the contents of this record to the given stream.
|
|
void | set_to_difference (const Record &source1, const Record &source2) |
| Set the record to contain only those fields that change source1 into source2. More...
|
|
Level | get_level () const |
| Compose a Level out of the leveltype1...l2 values.
|
|
Trange | get_trange () const |
| Compose a Trange out of the pindicator...p2 values.
|
|
Datetime | get_datetime () const |
| Compose a Datetime out of the year...sec values.
|
|
DatetimeRange | get_datetimerange () const |
| Compose a DatetimeRange out of the yearmin...secmax values.
|
|
bool | iter_keys (std::function< bool(dba_keyword, const wreport::Var &)> f) const |
| Iterate all keys in the record, calling f on them. More...
|
|
const std::vector< wreport::Var * > & | vars () const |
| Return the varcode-sorted vector with the variables.
|
|
void | set_from_string (const char *str) |
| Set a value in the record according to an assignment encoded in a string. More...
|
|
void | set_from_test_string (const std::string &s) |
| Set a record from a ", "-separated string of assignments. More...
|
|
std::string | to_string () const |
| Encode in a one-liner of comma-separated assignments.
|
|
void | set (const char *key, int val) |
|
void | set (const char *key, double val) |
|
void | set (const char *key, const char *val) |
|
void | set (const char *key, const std::string &val) |
|
void | set (const Datetime &dt) |
|
void | set (const DatetimeRange &dt) |
|
void | set (const Coords &c) |
|
void | set (const LatRange &lr) |
|
void | set (const LonRange &lr) |
|
void | set (const Level &lev) |
|
void | set (const Trange &tr) |
|
void | set (const wreport::Var &var) |
|
void | set (std::unique_ptr< wreport::Var > &&var) |
|
virtual bool | isset (const char *key) const |
| Check if a value is set.
|
|
bool | operator== (const Record &rec) const |
| Check if two records are the same.
|
|
bool | operator!= (const Record &rec) const |
| Check if two records differ.
|
|
const wreport::Var & | operator[] (const char *key) const |
| Get a value, if set, or throw an exception if not.
|
|
const char * | enq (const char *key, const char *def) const |
|
template<typename T > |
T | enq (const char *key, const T &def) const |
|
void | foreach_key (std::function< void(const char *, const wreport::Var &)> dest) const |
| Generate a sequence of key names and const Var& for all the contents of the record.
|
|
void | foreach_key (std::function< void(const char *, std::unique_ptr< wreport::Var > &&)> dest) const |
| Generate a sequence of key names and unique_ptr<Var> for all the contents of the record.
|
|
|
int | find_item (wreport::Varcode code) const throw () |
| Find an item by wreport::Varcode, returning -1 if not found.
|
|
wreport::Var & | get_item (wreport::Varcode code) |
| Find an item by wreport::Varcode, raising an exception if not found.
|
|
const wreport::Var & | get_item (wreport::Varcode code) const |
| Find an item by wreport::Varcode, raising an exception if not found.
|
|
void | remove_item (wreport::Varcode code) |
| Remove an item by wreport::Varcode.
|
|
const wreport::Var * | key_peek (dba_keyword parameter) const throw () |
| Look at the value of a parameter. More...
|
|
const wreport::Var * | var_peek (wreport::Varcode code) const throw () |
| Look at the value of a variable. More...
|
|
void | key_unset (dba_keyword parameter) |
| Remove a parameter from the record. More...
|
|
void | var_unset (wreport::Varcode code) |
| Remove a parameter from the record. More...
|
|
wreport::Var & | obtain (const char *key) |
| Return the Var for a key, creating it if it is missing.
|
|
wreport::Var & | obtain (dba_keyword key) |
| Return the Var for a key, creating it if it is missing.
|
|
wreport::Var & | obtain (wreport::Varcode code) |
| Return the Var for a variable, creating it if it is missing.
|
|
DB-All.E record.
A Record is a container for one observation of meteorological values, that includes anagraphical informations, physical location of the observation in time and space, and all the observed variables.