libdballe 9.6
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
16namespace dballe {
17namespace impl {
18namespace msg {
19
24{
25protected:
30
31public:
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
Store an array of physical data all on the same level.
Definition: context.h:24
const wreport::Var * find_vsig() const
If this context is the right context for a vertical sounding significance and contains a vertical sou...
void print(FILE *out) const
Dump all the contents of the context to the given stream.
int compare(const Context &ctx) const
Compare two dba_msg_context strutures, for use in sorting.
int find_index(wreport::Varcode code) const
Return the index of the var ‘code’ in l, or -1 if it was not found.
unsigned diff(const Context &ctx) const
Compute the differences between two contexts.
int compare(const Level &lev, const Trange &tr) const
Compare a Context struture with level and time range information, for use in sorting.
uint16_t Varcode
Vertical level or layer.
Definition: types.h:625
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:687
Collection of Value objects, indexed by wreport::Varcode.
Definition: values.h:177
Common base types used by most of DB-All.e code.
Structures used as input to database insert functions.
Create wreport variables from the DB-All.e B table.