libdballe  9.11
context.h
Go to the documentation of this file.
1 #ifndef DBA_MSG_CONTEXT_H
2 #define DBA_MSG_CONTEXT_H
3 
10 #include <dballe/var.h>
11 #include <dballe/types.h>
12 #include <dballe/values.h>
13 #include <vector>
14 #include <memory>
15 
16 namespace dballe {
17 namespace impl {
18 namespace msg {
19 
23 class Context
24 {
25 protected:
29  int find_index(wreport::Varcode code) const;
30 
31 public:
32  Level level;
33  Trange trange;
34  Values values;
35 
36  Context(const Level& lev, const Trange& tr);
37  Context(const Context& c) = default;
38  Context(Context&& c) = default;
39 
40  Context& operator=(const Context& src) = default;
41  Context& operator=(Context&& src) = default;
42 
51  int compare(const Context& ctx) const;
52 
60  int compare(const Level& lev, const Trange& tr) const;
61 
67  const wreport::Var* find_vsig() const;
68 
75  void print(FILE* out) const;
76 
88  unsigned diff(const Context& ctx) const;
89 };
90 
91 }
92 }
93 }
94 
95 #endif
Common base types used by most of DB-All.e code.
void print(FILE *out) const
Dump all the contents of the context to the given stream.
Create wreport variables from the DB-All.e B table.
int compare(const Context &ctx) const
Compare two dba_msg_context strutures, for use in sorting.
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:686
Definition: cmdline.h:18
Vertical level or layer.
Definition: types.h:624
const wreport::Var * find_vsig() const
If this context is the right context for a vertical sounding significance and contains a vertical sou...
Store an array of physical data all on the same level.
Definition: context.h:23
uint16_t Varcode
Structures used as input to database insert functions.
unsigned diff(const Context &ctx) const
Compute the differences between two contexts.
Collection of Value objects, indexed by wreport::Varcode.
Definition: values.h:176
int find_index(wreport::Varcode code) const
Return the index of the var ‘code’ in l, or -1 if it was not found.