libdballe
7.19
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dballe
db
v6
v6/levtr.h
1
#ifndef DBALLE_DB_V6_LEVTR_H
2
#define DBALLE_DB_V6_LEVTR_H
3
4
#include <
dballe/core/defs.h
>
5
#include <memory>
6
#include <cstdio>
7
8
namespace
dballe
{
9
struct
Record;
10
struct
Msg;
11
12
namespace
msg {
13
struct
Context;
14
}
15
16
namespace
db {
17
namespace
v6 {
18
22
struct
LevTr
23
{
24
struct
DBRow
25
{
27
int
id
;
29
int
ltype1
;
31
int
l1
;
33
int
ltype2
;
35
int
l2
;
37
int
pind
;
39
int
p1
;
41
int
p2
;
42
};
43
44
virtual
~
LevTr
();
45
50
virtual
int
obtain_id(
const
Level
& lev,
const
Trange
& tr) = 0;
51
53
virtual
const
DBRow
* read(
int
id
) = 0;
54
56
virtual
void
read_all(std::function<
void
(
const
DBRow
&)> dest) = 0;
57
59
virtual
void
dump(FILE* out) = 0;
60
};
61
62
struct
LevTrCache
63
{
64
virtual
~
LevTrCache
();
65
71
virtual
bool
to_rec(
int
id
,
Record
& rec) = 0;
72
74
virtual
Level
to_level(
int
id
)
const
= 0;
75
77
virtual
Trange
to_trange(
int
id
)
const
= 0;
78
84
virtual
msg::Context
* to_msg(
int
id
,
Msg
& msg) = 0;
85
87
virtual
void
invalidate() = 0;
88
90
virtual
void
dump(FILE* out)
const
= 0;
91
93
static
std::unique_ptr<LevTrCache> create(
LevTr
& levtr);
94
};
95
96
}
97
}
98
}
99
100
#endif
101
dballe::msg::Context
Store an array of physical data all on the same level.
Definition:
context.h:44
dballe::db::v6::LevTr::DBRow::l1
int l1
Level L1 SQL parameter.
Definition:
v6/levtr.h:31
dballe::Msg
Storage for related physical data.
Definition:
msg.h:70
dballe::db::v6::LevTr::DBRow::p1
int p1
Time range P1 SQL parameter.
Definition:
v6/levtr.h:39
dballe::Trange
Information on how a value has been sampled or computed with regards to time.
Definition:
types.h:587
dballe::Record
Key/value store where keys are strings and values are wreport variables.
Definition:
record.h:16
dballe
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition:
cmdline.h:17
dballe::db::v6::LevTr::DBRow::id
int id
lev_tr ID SQL parameter
Definition:
v6/levtr.h:27
dballe::db::v6::LevTr::DBRow::l2
int l2
Level L2 SQL parameter.
Definition:
v6/levtr.h:35
dballe::db::v6::LevTr::DBRow::ltype2
int ltype2
Second level type SQL parameter.
Definition:
v6/levtr.h:33
dballe::db::v6::LevTrCache
Definition:
v6/levtr.h:62
dballe::Level
Vertical level or layer.
Definition:
types.h:532
dballe::db::v6::LevTr::DBRow
Definition:
v6/levtr.h:24
dballe::db::v6::LevTr
Precompiled queries to manipulate the lev_tr table.
Definition:
v6/levtr.h:22
dballe::db::v6::LevTr::DBRow::pind
int pind
Time range type SQL parameter.
Definition:
v6/levtr.h:37
dballe::db::v6::LevTr::DBRow::p2
int p2
Time range P2 SQL parameter.
Definition:
v6/levtr.h:41
dballe::db::v6::LevTr::DBRow::ltype1
int ltype1
First level type SQL parameter.
Definition:
v6/levtr.h:29
defs.h
Common definitions.
Generated by
1.8.11