libdballe
8.3
|
High level objects for working with DB-All.e DB summaries. More...
#include <summary.h>
Public Member Functions | |
BaseSummary (const BaseSummary &)=delete | |
BaseSummary (BaseSummary &&)=delete | |
BaseSummary & | operator= (const BaseSummary &)=delete |
BaseSummary & | operator= (BaseSummary &&)=delete |
bool | operator== (const BaseSummary &o) const |
const summary::StationEntries< Station > & | stations () const |
const core::SortedSmallUniqueValueSet< std::string > & | reports () const |
const core::SortedSmallUniqueValueSet< dballe::Level > & | levels () const |
const core::SortedSmallUniqueValueSet< dballe::Trange > & | tranges () const |
const core::SortedSmallUniqueValueSet< wreport::Varcode > & | varcodes () const |
const Datetime & | datetime_min () const |
Recompute reports, levels, tranges, and varcodes. More... | |
const Datetime & | datetime_max () const |
unsigned | data_count () const |
std::unique_ptr< dballe::CursorSummary > | query_summary (const Query &query) const |
Query the contents of the summary. More... | |
void | add (const Station &station, const summary::VarDesc &vd, const dballe::DatetimeRange &dtrange, size_t count) |
Add an entry to the summary. | |
void | add_cursor (const dballe::CursorSummary &cur) |
Add an entry to the summary taken from the current status of cur. | |
void | add_message (const dballe::Message &message) |
Add the contents of a Message. | |
void | add_messages (const std::vector< std::shared_ptr< dballe::Message >> &messages) |
Add the contents of a Messages. | |
template<typename OSummary > | |
void | add_summary (const BaseSummary< OSummary > &summary) |
Merge the copy of another summary into this one. | |
void | add_filtered (const BaseSummary &summary, const dballe::Query &query) |
Merge the copy of another summary into this one. | |
void | to_json (core::JSONWriter &writer) const |
Serialize to JSON. | |
void | load_json (core::json::Stream &in) |
Load contents from JSON, merging with the current contents. | |
DBALLE_TEST_ONLY void | dump (FILE *out) const |
Protected Member Functions | |
void | recompute_summaries () const |
Protected Attributes | |
summary::StationEntries< Station > | entries |
core::SortedSmallUniqueValueSet< std::string > | m_reports |
core::SortedSmallUniqueValueSet< dballe::Level > | m_levels |
core::SortedSmallUniqueValueSet< dballe::Trange > | m_tranges |
core::SortedSmallUniqueValueSet< wreport::Varcode > | m_varcodes |
dballe::DatetimeRange | dtrange |
size_t | count = 0 |
bool | dirty = false |
High level objects for working with DB-All.e DB summaries.
|
inline |
Recompute reports, levels, tranges, and varcodes.
Call this after performing changes to the summary, to make those sets valid before reading them.
std::unique_ptr<dballe::CursorSummary> dballe::db::BaseSummary< Station >::query_summary | ( | const Query & | query | ) | const |
Query the contents of the summary.
query | The record with the query data (see technical specifications, par. 1.6.4 "parameter output/input") |