|
libdballe
7.7
|
Store an array of physical data all on the same level. More...
#include <context.h>
Public Member Functions | |
| Context (const Level &lev, const Trange &tr) | |
| Context (const Context &c) | |
| Context & | operator= (const Context &src) |
| bool | is_station () const |
| int | compare (const Context &ctx) const |
| Compare two dba_msg_context strutures, for use in sorting. More... | |
| int | compare (const Level &lev, const Trange &tr) const |
| Compare a Context struture with level and time range information, for use in sorting. More... | |
| void | set (const wreport::Var &var) |
| Add a Var to the level. More... | |
| void | set (std::unique_ptr< wreport::Var > var) |
| Add a Var to the level. More... | |
| void | seti (wreport::Varcode code, int val) |
| Add or replace an integer value. More... | |
| void | setd (wreport::Varcode code, double val) |
| Add or replace a double value. More... | |
| void | setc (wreport::Varcode code, const char *val) |
| Add or replace a string value. More... | |
| const wreport::Var * | find (wreport::Varcode code) const |
| Find a variable given its varcode. More... | |
| wreport::Var * | edit (wreport::Varcode code) |
| Find a variable given its varcode. More... | |
| bool | remove (wreport::Varcode code) |
| Remove a variable given its varcode. More... | |
| const wreport::Var * | find_by_id (int id) const |
| Find a variable given its shortcut ID. More... | |
| const wreport::Var * | find_vsig () const |
| If this context is the right context for a vertical sounding significance and contains a vertical sounding significance variable, return it. More... | |
| void | print (FILE *out) const |
| Dump all the contents of the context to the given stream. More... | |
| unsigned | diff (const Context &ctx) const |
| Compute the differences between two contexts. More... | |
| void | lua_push (struct lua_State *L) |
| Push the variable as an object in the lua stack. | |
Static Public Member Functions | |
| static Context * | lua_check (struct lua_State *L, int idx) |
| Check that the element at idx is a dba_msg_context. More... | |
Data Fields | |
| Level | level |
| Trange | trange |
| std::vector< wreport::Var * > | data |
| The variables in this context. | |
Protected Member Functions | |
| int | find_index (wreport::Varcode code) const |
| Return the index of the var `code' in l, or -1 if it was not found. | |
Store an array of physical data all on the same level.
| int dballe::msg::Context::compare | ( | const Context & | ctx | ) | const |
Compare two dba_msg_context strutures, for use in sorting.
| ctx | First context to compare |
Compare a Context struture with level and time range information, for use in sorting.
| unsigned dballe::msg::Context::diff | ( | const Context & | ctx | ) | const |
Compute the differences between two contexts.
Details of the differences found will be formatted using the notes system (
| ctx | Context to compare with this one |
| wreport::Var* dballe::msg::Context::edit | ( | wreport::Varcode | code | ) |
Find a variable given its varcode.
| code | The wreport::Varcode of the variable to query. See vartable.h |
| const wreport::Var* dballe::msg::Context::find | ( | wreport::Varcode | code | ) | const |
Find a variable given its varcode.
| code | The wreport::Varcode of the variable to query. See vartable.h |
| const wreport::Var* dballe::msg::Context::find_by_id | ( | int | id | ) | const |
Find a variable given its shortcut ID.
| id | Shortcut ID of the value to set (see vars.h) |
| const wreport::Var* dballe::msg::Context::find_vsig | ( | ) | const |
If this context is the right context for a vertical sounding significance and contains a vertical sounding significance variable, return it.
Else, return NULL.
| bool dballe::msg::Context::is_station | ( | ) | const |
|
static |
Check that the element at idx is a dba_msg_context.
| void dballe::msg::Context::print | ( | FILE * | out | ) | const |
Dump all the contents of the context to the given stream.
| out | The stream to dump the contents of the level to. |
| bool dballe::msg::Context::remove | ( | wreport::Varcode | code | ) |
Remove a variable given its varcode.
| code | The wreport::Varcode of the variable to query. See vartable.h |
| void dballe::msg::Context::set | ( | const wreport::Var & | var | ) |
Add a Var to the level.
If a variable exists with the same code, it is replaced
| var | The variable to add or replace. |
| void dballe::msg::Context::set | ( | std::unique_ptr< wreport::Var > | var | ) |
Add a Var to the level.
If a variable exists with the same code, it is replaced
The Context will take ownership of memory management for var
| var | The variable to add or replace. |
| void dballe::msg::Context::setc | ( | wreport::Varcode | code, |
| const char * | val | ||
| ) |
Add or replace a string value.
| code | The wreport::Varcode of the destination value. |
| val | The string value of the data |
| void dballe::msg::Context::setd | ( | wreport::Varcode | code, |
| double | val | ||
| ) |
Add or replace a double value.
| code | The wreport::Varcode of the destination value. |
| val | The double value of the data |
| void dballe::msg::Context::seti | ( | wreport::Varcode | code, |
| int | val | ||
| ) |
Add or replace an integer value.
| code | The wreport::Varcode of the destination value. |
| val | The integer value of the data |
1.8.9.1