Sorted storage for all the dba_msg_datum present on one level. More...
#include <dballe/msg/msg.h>#include <stdio.h>Go to the source code of this file.
Data Structures | |
| struct | _dba_msg_context |
| Store an array of physical data all on the same level. More... | |
Functions | |
| dba_err | dba_msg_context_create (int ltype1, int l1, int ltype2, int l2, int pind, int p1, int p2, dba_msg_context *l) |
| Create a new dba_msg_context. | |
| dba_err | dba_msg_context_copy (dba_msg_context src, dba_msg_context *dst) |
| Copy an existing level. | |
| void | dba_msg_context_delete (dba_msg_context l) |
| Delete a dba_msg_context. | |
| int | dba_msg_context_compare (const dba_msg_context l1, const dba_msg_context l2) |
| Compare two dba_msg_context strutures, for use in sorting. | |
| int | dba_msg_context_compare2 (const dba_msg_context l, int ltype1, int l1, int ltype2, int l2, int pind, int p1, int p2) |
| Compare a dba_msg_context struture with some level information, for use in sorting. | |
| dba_err | dba_msg_context_set_nocopy (dba_msg_context l, dba_var var) |
| Add a dba_var to the level, taking over its memory management. | |
| dba_var | dba_msg_context_find (dba_msg_context l, dba_varcode code) |
| Find a datum given its description. | |
| dba_var | dba_msg_context_find_by_id (dba_msg_context l, int id) |
| Find a datum given its shortcut ID. | |
| dba_var | dba_msg_context_find_vsig (dba_msg_context l) |
| If this context is the right context for a vertical sounding significance and contains a vertical sounding significance variable, return it. | |
| void | dba_msg_context_print (dba_msg_context l, FILE *out) |
| Dump all the contents of the level to the given stream. | |
| void | dba_msg_context_diff (dba_msg_context l1, dba_msg_context l2, int *diffs, FILE *out) |
| Print the differences between two dba_msg_context to a stream. | |
| dba_err | dba_msg_context_lua_push (dba_msg_context var, struct lua_State *L) |
| Push the variable as an object in the lua stack. | |
| dba_msg_context | dba_msg_context_lua_check (struct lua_State *L, int idx) |
| Check that the element at idx is a dba_msg_context. | |
Sorted storage for all the dba_msg_datum present on one level.
| int dba_msg_context_compare | ( | const dba_msg_context | l1, | |
| const dba_msg_context | l2 | |||
| ) |
Compare two dba_msg_context strutures, for use in sorting.
| l1 | First dba_msg_context to compare | |
| l2 | Second dba_msg_context to compare |
References _dba_msg_context::l1, _dba_msg_context::l2, _dba_msg_context::ltype1, _dba_msg_context::ltype2, _dba_msg_context::p1, _dba_msg_context::p2, and _dba_msg_context::pind.
| int dba_msg_context_compare2 | ( | const dba_msg_context | l, | |
| int | ltype1, | |||
| int | l1, | |||
| int | ltype2, | |||
| int | l2, | |||
| int | pind, | |||
| int | p1, | |||
| int | p2 | |||
| ) |
Compare a dba_msg_context struture with some level information, for use in sorting.
| l | First dba_msg_context to compare | |
| ltype | Type of the level. See Level type values. | |
| l1 | L1 value of the level. See Level type values. | |
| l2 | L2 value of the level. See Level type values. | |
| pind | Time range type indicator. See Time range values. | |
| p1 | Time range P1 indicator. See Time range values. | |
| p2 | Time range P2 indicator. See Time range values. |
References _dba_msg_context::l1, _dba_msg_context::l2, _dba_msg_context::ltype1, _dba_msg_context::ltype2, _dba_msg_context::p1, _dba_msg_context::p2, and _dba_msg_context::pind.
| dba_err dba_msg_context_copy | ( | dba_msg_context | src, | |
| dba_msg_context * | dst | |||
| ) |
Copy an existing level.
| src | The level to copy. |
| dst | The newly created duplicate. |
References _dba_msg_context::data, _dba_msg_context::data_count, DBA_RUN_OR_GOTO, DBA_RUN_OR_RETURN, _dba_msg_context::l1, _dba_msg_context::l2, _dba_msg_context::ltype1, _dba_msg_context::ltype2, _dba_msg_context::p1, _dba_msg_context::p2, and _dba_msg_context::pind.
| dba_err dba_msg_context_create | ( | int | ltype1, | |
| int | l1, | |||
| int | ltype2, | |||
| int | l2, | |||
| int | pind, | |||
| int | p1, | |||
| int | p2, | |||
| dba_msg_context * | l | |||
| ) |
Create a new dba_msg_context.
| l | The newly created level. |
References _dba_msg_context::data, _dba_msg_context::data_alloc, _dba_msg_context::data_count, _dba_msg_context::l1, _dba_msg_context::l2, _dba_msg_context::ltype1, _dba_msg_context::ltype2, _dba_msg_context::p1, _dba_msg_context::p2, and _dba_msg_context::pind.
| void dba_msg_context_delete | ( | dba_msg_context | l | ) |
Delete a dba_msg_context.
| l | The level to delete. |
References _dba_msg_context::data, _dba_msg_context::data_alloc, and _dba_msg_context::data_count.
| void dba_msg_context_diff | ( | dba_msg_context | l1, | |
| dba_msg_context | l2, | |||
| int * | diffs, | |||
| FILE * | out | |||
| ) |
Print the differences between two dba_msg_context to a stream.
| l1 | First level to compare | |
| l2 | Second level to compare |
| diffs | Integer variable that will be incremented by the number of differences found. |
| out | The stream to dump a description of the differences to. |
References _dba_msg_context::data, _dba_msg_context::data_count, _dba_msg_context::l1, _dba_msg_context::l2, _dba_msg_context::ltype1, _dba_msg_context::ltype2, _dba_msg_context::p1, _dba_msg_context::p2, and _dba_msg_context::pind.
| dba_var dba_msg_context_find | ( | dba_msg_context | l, | |
| dba_varcode | code | |||
| ) |
Find a datum given its description.
| l | The level to query | |
| code | The dba_varcode of the variable to query. See vartable.h |
References _dba_msg_context::data.
| dba_var dba_msg_context_find_by_id | ( | dba_msg_context | l, | |
| int | id | |||
| ) |
Find a datum given its shortcut ID.
| l | The level to query | |
| id | Shortcut ID of the value to set (see vars.h) |
| dba_var dba_msg_context_find_vsig | ( | dba_msg_context | l | ) |
If this context is the right context for a vertical sounding significance and contains a vertical sounding significance variable, return it.
Else, return NULL.
References DBA_VAR, _dba_msg_context::ltype1, _dba_msg_context::p1, _dba_msg_context::p2, and _dba_msg_context::pind.
| dba_msg_context dba_msg_context_lua_check | ( | struct lua_State * | L, | |
| int | idx | |||
| ) |
Check that the element at idx is a dba_msg_context.
References dba_error_unimplemented, and dba_msg_context_lua_check().
Referenced by dba_msg_context_lua_check().
| void dba_msg_context_print | ( | dba_msg_context | l, | |
| FILE * | out | |||
| ) |
Dump all the contents of the level to the given stream.
| l | The level to dump | |
| out | The stream to dump the contents of the level to. |
References _dba_msg_context::data, _dba_msg_context::data_count, _dba_msg_context::l1, _dba_msg_context::l2, _dba_msg_context::ltype1, _dba_msg_context::ltype2, _dba_msg_context::p1, _dba_msg_context::p2, and _dba_msg_context::pind.
| dba_err dba_msg_context_set_nocopy | ( | dba_msg_context | l, | |
| dba_var | var | |||
| ) |
Add a dba_var to the level, taking over its memory management.
| l | The level to add the variable to. | |
| var | The variable to add. |
References _dba_msg_context::data, _dba_msg_context::data_alloc, _dba_msg_context::data_count, and DBA_RUN_OR_RETURN.
1.6.3