1 #ifndef DBALLE_DB_SUMMARY_H 2 #define DBALLE_DB_SUMMARY_H 4 #include <dballe/core/query.h> 34 wreport::Varcode varcode;
36 int count = MISSING_INT;
53 std::vector<summary::Entry> summary;
63 std::set<int> all_stations;
64 std::set<std::string> all_reports;
65 std::set<dballe::Level> all_levels;
66 std::set<dballe::Trange> all_tranges;
67 std::set<wreport::Varcode> all_varcodes;
72 unsigned count = MISSING_INT;
77 const Datetime& datetime_min()
const {
return dtrange.
min; }
78 const Datetime& datetime_max()
const {
return dtrange.
max; }
79 unsigned data_count()
const {
return count; }
85 summary::Support supports(
const Query& query)
const;
130 bool empty()
const {
return summaries.empty(); }
133 unsigned size()
const {
return summaries.size(); }
148 Support query(
const Query& query,
bool exact, std::function<
bool(
const Entry&)> match);
Cursor iterating over summary entries.
Definition: db.h:137
Information on how a value has been sampled or computed with regards to time.
Definition: types.h:565
bool is_valid() const
Return true if the summary has been filled with data.
Definition: summary.h:75
Standard dballe::Query implementation.
Definition: core/query.h:29
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
Vertical level or layer.
Definition: types.h:515
Functions used to connect to DB-All.e and insert, query and delete data.
Range of datetimes.
Definition: types.h:255
Datetime max
Upper bound of the range.
Definition: types.h:260
Stack of summary in increasing order of selectivity.
Definition: summary.h:117
bool empty() const
Check if the stack is empty.
Definition: summary.h:130
Datetime min
Lower bound of the range.
Definition: types.h:258
High level objects for working with DB-All.e DB summaries.
Definition: summary.h:46
Query used to filter DB-All.e data.
Definition: query.h:14
Date and time.
Definition: types.h:147
std::vector< Summary > summaries
Summaries for the current query.
Definition: summary.h:126
const Summary & top() const
Return the topmost summary.
Definition: summary.h:139
unsigned size() const
Return the stack size. Only really useful for tests.
Definition: summary.h:133