libdballe
7.7
|
#include <codec.h>
Data Structures | |
struct | Options |
Public Member Functions | |
Importer (const Options &opts) | |
Messages | from_binary (const BinaryMessage &msg) const |
Decode a message from its raw encoded representation. More... | |
virtual bool | foreach_decoded (const BinaryMessage &msg, std::function< bool(std::unique_ptr< Message > &&)> dest) const =0 |
Decode a message from its raw encoded representation, calling dest on each resulting Message. More... | |
virtual Messages | from_bulletin (const wreport::Bulletin &msg) const =0 |
Import a decoded BUFR/CREX message. | |
Static Public Member Functions | |
static std::unique_ptr< Importer > | create (File::Encoding type, const Options &opts=Options()) |
Instantiate the right importer for the given type. | |
Protected Attributes | |
Options | opts |
Message importer.
This class is designed like a configurable virtual functor.
Importers of various kinds can provide their implementations.
|
pure virtual |
Decode a message from its raw encoded representation, calling dest on each resulting Message.
Return false from dest to stop decoding.
rmsg | Encoded message. |
dest | The function that consumes the decoded messages. |
Implemented in dballe::msg::AOFImporter, dballe::msg::CrexImporter, and dballe::msg::BufrImporter.
Messages dballe::msg::Importer::from_binary | ( | const BinaryMessage & | msg | ) | const |
Decode a message from its raw encoded representation.
rmsg | Encoded message |
msgs | The resulting ::dba_msg |