|
libdballe 5.10
|
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. | |
| int | compare (const Level &lev, const Trange &tr) const |
| Compare a Context struture with level and time range information, for use in sorting. | |
| void | set (const wreport::Var &var) |
| Add a Var to the level. | |
| void | set (std::auto_ptr< wreport::Var > var) |
| Add a Var to the level. | |
| const wreport::Var * | find (wreport::Varcode code) const |
| Find a variable given its varcode. | |
| wreport::Var * | edit (wreport::Varcode code) |
| Find a variable given its varcode. | |
| bool | remove (wreport::Varcode code) |
| Remove a variable given its varcode. | |
| const wreport::Var * | find_by_id (int id) const |
| Find a variable given its shortcut ID. | |
| 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. | |
| void | print (FILE *out) const |
| Dump all the contents of the context to the given stream. | |
| unsigned | diff (const Context &ctx) const |
| Compute the differences between two contexts. | |
| 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. | |
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 Context* dballe::msg::Context::lua_check | ( | struct lua_State * | L, |
| int | idx | ||
| ) | [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 | ( | std::auto_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::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. |
1.7.4