|
libdballe 9.13
|
High level objects for working with DB-All.e DB summaries. More...
#include <summary_memory.h>
Public Member Functions | |
| BaseSummaryMemory (const std::filesystem::path &path) | |
| const summary::StationEntries< Station > & | _entries () const |
| bool | stations (std::function< bool(const Station &)>) const override |
| bool | reports (std::function< bool(const std::string &)>) const override |
| bool | levels (std::function< bool(const Level &)>) const override |
| bool | tranges (std::function< bool(const Trange &)>) const override |
| bool | varcodes (std::function< bool(const wreport::Varcode &)>) const override |
| Datetime | datetime_min () const override |
| Recompute reports, levels, tranges, and varcodes. | |
| Datetime | datetime_max () const override |
| unsigned | data_count () const override |
| std::shared_ptr< dballe::CursorSummary > | query_summary (const Query &query) const override |
| Query the contents of the summary. | |
| bool | iter (std::function< bool(const Station &, const summary::VarDesc &, const DatetimeRange &, size_t)>) const override |
| Iterate the contents of this summary. | |
| bool | iter_filtered (const dballe::Query &query, std::function< bool(const Station &, const summary::VarDesc &, const DatetimeRange &, size_t)>) const override |
| Iterate the contents of this summary. | |
| void | clear () override |
| Completely empty the summary. | |
| void | add (const Station &station, const summary::VarDesc &vd, const dballe::DatetimeRange &dtrange, size_t count) override |
| Add an entry to the summary. | |
| void | add_summary (const BaseSummary< dballe::Station > &summary) override |
| Merge the copy of another summary into this one. | |
| void | add_summary (const BaseSummary< dballe::DBStation > &summary) override |
| Merge the copy of another summary into this one. | |
| void | add_filtered (const BaseSummary< Station > &summary, const dballe::Query &query) override |
| Merge the copy of another summary into this one. | |
| void | commit () override |
| Write changes to disk. | |
| void | to_json (core::JSONWriter &writer) const override |
| Serialize to JSON. | |
| void | load_json (core::json::Stream &in) override |
| Load contents from JSON, merging with the current contents. | |
| DBALLE_TEST_ONLY void | dump (FILE *out) const override |
Public Member Functions inherited from dballe::db::BaseSummary< Station > | |
| BaseSummary (const BaseSummary &)=delete | |
| BaseSummary (BaseSummary &&)=delete | |
| BaseSummary & | operator= (const BaseSummary &)=delete |
| BaseSummary & | operator= (BaseSummary &&)=delete |
| 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. | |
Protected Member Functions | |
| void | recompute_summaries () const |
Protected Attributes | |
| summary::StationEntries< Station > | entries |
| std::filesystem::path | path |
| 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 |
Additional Inherited Members | |
Public Types inherited from dballe::db::BaseSummary< Station > | |
| typedef Station | station_type |
High level objects for working with DB-All.e DB summaries.
|
overridevirtual |
Add an entry to the summary.
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Merge the copy of another summary into this one.
Reimplemented from dballe::db::BaseSummary< Station >.
|
overridevirtual |
Merge the copy of another summary into this one.
Reimplemented from dballe::db::BaseSummary< Station >.
|
overridevirtual |
Merge the copy of another summary into this one.
Reimplemented from dballe::db::BaseSummary< Station >.
|
overridevirtual |
Completely empty the summary.
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Write changes to disk.
Implements dballe::db::BaseSummary< Station >.
|
inlineoverridevirtual |
Implements dballe::db::BaseSummary< Station >.
|
inlineoverridevirtual |
Implements dballe::db::BaseSummary< Station >.
|
inlineoverridevirtual |
Recompute reports, levels, tranges, and varcodes.
Call this after performing changes to the summary, to make those sets valid before reading them.
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Iterate the contents of this summary.
There is no guarantee on sorting order.
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Iterate the contents of this summary.
There is no guarantee on sorting order.
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Load contents from JSON, merging with the current contents.
Reimplemented from dballe::db::BaseSummary< Station >.
|
overridevirtual |
Query the contents of the summary.
| query | The record with the query data (see technical specifications, par. 1.6.4 "parameter output/input") |
Reimplemented from dballe::db::BaseSummary< Station >.
|
overridevirtual |
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Serialize to JSON.
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Implements dballe::db::BaseSummary< Station >.
|
overridevirtual |
Implements dballe::db::BaseSummary< Station >.