libdballe 9.6
|
High level objects for working with DB-All.e DB summaries. More...
#include <summary.h>
Public Types | |
typedef Station | station_type |
Public Member Functions | |
BaseSummary (const BaseSummary &)=delete | |
BaseSummary (BaseSummary &&)=delete | |
BaseSummary & | operator= (const BaseSummary &)=delete |
BaseSummary & | operator= (BaseSummary &&)=delete |
virtual bool | stations (std::function< bool(const Station &)>) const =0 |
virtual bool | reports (std::function< bool(const std::string &)>) const =0 |
virtual bool | levels (std::function< bool(const Level &)>) const =0 |
virtual bool | tranges (std::function< bool(const Trange &)>) const =0 |
virtual bool | varcodes (std::function< bool(const wreport::Varcode &)>) const =0 |
virtual Datetime | datetime_min () const =0 |
Recompute reports, levels, tranges, and varcodes. | |
virtual Datetime | datetime_max () const =0 |
virtual unsigned | data_count () const =0 |
virtual std::shared_ptr< dballe::CursorSummary > | query_summary (const Query &query) const |
Query the contents of the summary. | |
virtual void | clear ()=0 |
Completely empty the summary. | |
virtual void | add (const Station &station, const summary::VarDesc &vd, const dballe::DatetimeRange &dtrange, size_t count)=0 |
Add an entry to the summary. | |
virtual void | add_cursor (const dballe::CursorSummary &cur) |
Add an entry to the summary taken from the current status of cur. | |
virtual void | add_message (const dballe::Message &message, bool station_data=true, bool data=true) |
Add the contents of a Message. | |
virtual void | add_messages (const std::vector< std::shared_ptr< dballe::Message > > &messages, bool station_data=true, bool data=true) |
Add the contents of a Messages. | |
virtual void | add_summary (const BaseSummary< dballe::Station > &summary) |
Merge the copy of another summary into this one. | |
virtual void | add_summary (const BaseSummary< dballe::DBStation > &summary) |
Merge the copy of another summary into this one. | |
virtual void | add_filtered (const BaseSummary< Station > &summary, const dballe::Query &query) |
Merge the copy of another summary into this one. | |
virtual void | commit ()=0 |
Write changes to disk. | |
virtual bool | iter (std::function< bool(const Station &, const summary::VarDesc &, const DatetimeRange &, size_t)>) const =0 |
Iterate the contents of this summary. There is no guarantee on sorting order. | |
virtual bool | iter_filtered (const dballe::Query &query, std::function< bool(const Station &, const summary::VarDesc &, const DatetimeRange &, size_t)>) const =0 |
Iterate the contents of this summary. There is no guarantee on sorting order. | |
virtual void | to_json (core::JSONWriter &writer) const =0 |
Serialize to JSON. | |
virtual void | load_json (core::json::Stream &in) |
Load contents from JSON, merging with the current contents. | |
virtual DBALLE_TEST_ONLY void | dump (FILE *out) const =0 |
High level objects for working with DB-All.e DB summaries.
|
pure virtual |
Add an entry to the summary.
Implemented in dballe::db::BaseSummaryMemory< Station >, and dballe::db::BaseSummaryXapian< Station >.
|
virtual |
Merge the copy of another summary into this one.
Reimplemented in dballe::db::BaseSummaryMemory< Station >.
|
virtual |
Merge the copy of another summary into this one.
Reimplemented in dballe::db::BaseSummaryMemory< Station >.
|
virtual |
Merge the copy of another summary into this one.
Reimplemented in dballe::db::BaseSummaryMemory< Station >.
|
pure virtual |
Completely empty the summary.
Implemented in dballe::db::BaseSummaryMemory< Station >, and dballe::db::BaseSummaryXapian< Station >.
|
pure virtual |
Write changes to disk.
Implemented in dballe::db::BaseSummaryMemory< Station >, and dballe::db::BaseSummaryXapian< Station >.
|
pure virtual |
Recompute reports, levels, tranges, and varcodes.
Call this after performing changes to the summary, to make those sets valid before reading them.
Implemented in dballe::db::BaseSummaryMemory< Station >, and dballe::db::BaseSummaryXapian< Station >.
|
pure virtual |
Iterate the contents of this summary. There is no guarantee on sorting order.
Implemented in dballe::db::BaseSummaryMemory< Station >, and dballe::db::BaseSummaryXapian< Station >.
|
pure virtual |
Iterate the contents of this summary. There is no guarantee on sorting order.
Implemented in dballe::db::BaseSummaryMemory< Station >, and dballe::db::BaseSummaryXapian< Station >.
|
virtual |
Load contents from JSON, merging with the current contents.
Reimplemented in dballe::db::BaseSummaryMemory< Station >.
|
virtual |
Query the contents of the summary.
query | The record with the query data (see technical specifications, par. 1.6.4 "parameter output/input") |
Reimplemented in dballe::db::BaseSummaryMemory< Station >.
|
pure virtual |
Serialize to JSON.
Implemented in dballe::db::BaseSummaryMemory< Station >, and dballe::db::BaseSummaryXapian< Station >.