libdballe 9.6
|
A bulletin that has been decoded and physically interpreted. More...
#include <message.h>
Public Member Functions | |
virtual MessageType | get_type () const =0 |
Return the type of the data in the message. | |
virtual Datetime | get_datetime () const =0 |
Get the reference Datetime for this message. | |
virtual Coords | get_coords () const =0 |
Get the reference coordinates for this message. | |
virtual Ident | get_ident () const =0 |
Get the station identifier for this message. | |
virtual std::string | get_report () const =0 |
Get the report for this message. | |
virtual std::shared_ptr< Message > | clone () const =0 |
Return a copy of this message. | |
const wreport::Var * | get (const Level &lev, const Trange &tr, wreport::Varcode code) const |
Get a variable given its code, level and time range information. | |
const wreport::Var * | get (const char *shortcut) const |
Get a variable given its shortcut name. | |
const wreport::Var * | get (const std::string &shortcut) const |
Get a variable given its shortcut name. | |
void | set (const Level &lev, const Trange &tr, wreport::Varcode code, const wreport::Var &var) |
Add or replace a value. | |
void | set (const Level &lev, const Trange &tr, const wreport::Var &var) |
Add or replace a value. | |
void | set (const Level &lev, const Trange &tr, std::unique_ptr< wreport::Var > var) |
Add or replace a value, taking ownership of the source variable without copying it. | |
void | set (const char *shortcut, std::unique_ptr< wreport::Var > var) |
Add or replace a value, taking ownership of the source variable without copying it. | |
void | set (const char *shortcut, const wreport::Var &var) |
Add or replace a value. | |
virtual bool | foreach_var (std::function< bool(const Level &, const Trange &, const wreport::Var &)>) const =0 |
Iterate the contents of the message. | |
virtual std::shared_ptr< CursorStation > | query_stations (const Query &query) const =0 |
Return a Cursor to access the station information in the message. | |
virtual std::shared_ptr< CursorStationData > | query_station_data (const Query &query) const =0 |
Query the station variables in the message. | |
virtual std::shared_ptr< CursorData > | query_data (const Query &query) const =0 |
Query the variables in the message. | |
virtual void | print (FILE *out) const =0 |
Print all the contents of this message to an output stream. | |
virtual unsigned | diff (const Message &msg) const =0 |
Compute the differences between two Messages. | |
Static Public Member Functions | |
static std::shared_ptr< Message > | create (MessageType type) |
Create a new empty message. | |
Protected Member Functions | |
virtual const wreport::Var * | get_impl (const Level &lev, const Trange &tr, wreport::Varcode code) const =0 |
Implementation of get(const Level&, const Trange&, wreport::Varcode) | |
virtual void | set_impl (const Level &lev, const Trange &tr, std::unique_ptr< wreport::Var > var)=0 |
Implementation of set(const Level& const Trange&, std::unique_ptr<wreport::Var>) | |
A bulletin that has been decoded and physically interpreted.
Message collects zero or more variables that have been forecast or measured by the same station in the same instant.
Each variable is annotated with its vertical level/layer information, and its time range / statistical information.
The representation in Message is as connected as possible to physics rather than to observations.
|
pure virtual |
Return a copy of this message.
Implemented in dballe::impl::Message.
|
pure virtual |
Compute the differences between two Messages.
Details of the differences found will be formatted using the wreport notes system (
Implemented in dballe::impl::Message.
|
pure virtual |
Iterate the contents of the message.
Implemented in dballe::impl::Message.
const wreport::Var * dballe::Message::get | ( | const char * | shortcut | ) | const |
Get a variable given its shortcut name.
const wreport::Var * dballe::Message::get | ( | const Level & | lev, |
const Trange & | tr, | ||
wreport::Varcode | code | ||
) | const |
Get a variable given its code, level and time range information.
const wreport::Var * dballe::Message::get | ( | const std::string & | shortcut | ) | const |
Get a variable given its shortcut name.
|
pure virtual |
Get the reference coordinates for this message.
Implemented in dballe::impl::Message.
|
pure virtual |
Get the reference Datetime for this message.
Implemented in dballe::impl::Message.
|
pure virtual |
Get the station identifier for this message.
Implemented in dballe::impl::Message.
|
protectedpure virtual |
Implementation of get(const Level&, const Trange&, wreport::Varcode)
Implemented in dballe::impl::Message.
|
pure virtual |
Get the report for this message.
Implemented in dballe::impl::Message.
|
pure virtual |
Return the type of the data in the message.
Implemented in dballe::impl::Message.
|
pure virtual |
Print all the contents of this message to an output stream.
Implemented in dballe::impl::Message.
|
pure virtual |
Query the variables in the message.
query | The query data (note: currently ignored) |
Implemented in dballe::impl::Message.
|
pure virtual |
Query the station variables in the message.
query | The query data (note: currently ignored) |
Implemented in dballe::impl::Message.
|
pure virtual |
Return a Cursor to access the station information in the message.
The cursor will have only one result, with the one station present in the message, contain all station vars.
query | The query data (note: currently ignored) |
Implemented in dballe::impl::Message.
void dballe::Message::set | ( | const char * | shortcut, |
const wreport::Var & | var | ||
) |
void dballe::Message::set | ( | const char * | shortcut, |
std::unique_ptr< wreport::Var > | var | ||
) |
void dballe::Message::set | ( | const Level & | lev, |
const Trange & | tr, | ||
const wreport::Var & | var | ||
) |
void dballe::Message::set | ( | const Level & | lev, |
const Trange & | tr, | ||
std::unique_ptr< wreport::Var > | var | ||
) |
void dballe::Message::set | ( | const Level & | lev, |
const Trange & | tr, | ||
wreport::Varcode | code, | ||
const wreport::Var & | var | ||
) |
|
protectedpure virtual |
Implementation of set(const Level& const Trange&, std::unique_ptr<wreport::Var>)
Implemented in dballe::impl::Message.