1 #ifndef DBALLE_IMPORTER_H
2 #define DBALLE_IMPORTER_H
4 #include <dballe/fwd.h>
27 bool simplified =
true;
33 void print(FILE* out);
39 static std::unique_ptr<ImporterOptions>
create();
42 static std::unique_ptr<ImporterOptions>
create(
const std::string& s);
80 virtual Encoding
encoding()
const = 0;
129 static std::unique_ptr<Importer>
create(Encoding type,
const std::string& opts);
static std::unique_ptr< ImporterOptions > create()
Create with default values.
Message importer interface.
Definition: importer.h:62
virtual Encoding encoding() const =0
Return the encoding for this importer.
std::vector< std::shared_ptr< Message > > from_binary(const BinaryMessage &msg) const
Decode a message from its raw encoded representation.
virtual std::vector< std::shared_ptr< Message > > from_bulletin(const wreport::Bulletin &msg) const =0
Import a decoded BUFR/CREX message.
Binary message.
Definition: file.h:130
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.
std::string to_string() const
Generate a string summary of import options.
static const ImporterOptions defaults
Default importer options.
Definition: importer.h:45
void print(FILE *out)
Print a summary of the options to out.
static std::unique_ptr< Importer > create(Encoding type, const ImporterOptions &opts=ImporterOptions::defaults)
Instantiate an importer.
Options to control message import.
Definition: importer.h:24