1 #ifndef DBALLE_IMPORTER_H 2 #define DBALLE_IMPORTER_H 4 #include <dballe/fwd.h> 27 bool simplified =
true;
29 enum class DomainErrors
35 } domain_errors = DomainErrors::THROW;
42 void print(FILE* out);
48 static std::unique_ptr<ImporterOptions>
create();
51 static std::unique_ptr<ImporterOptions>
create(
const std::string& s);
89 virtual Encoding
encoding()
const = 0;
138 static std::unique_ptr<Importer>
create(Encoding type,
const std::string& opts);
145 using Importer::Importer;
std::vector< std::shared_ptr< Message > > from_binary(const BinaryMessage &msg) const
Decode a message from its raw encoded representation.
Binary message.
Definition: file.h:130
void print(FILE *out)
Print a summary of the options to out.
virtual std::vector< std::shared_ptr< Message > > from_bulletin(const wreport::Bulletin &msg) const
Import a decoded BUFR/CREX message.
Message importer interface.
Definition: importer.h:71
static std::unique_ptr< ImporterOptions > create()
Create with default values.
Definition: importer.h:142
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
std::string to_string() const
Generate a string summary of import options.
virtual Encoding encoding() const =0
Return the encoding for this importer.
static const ImporterOptions defaults
Default importer options.
Definition: importer.h:54
virtual bool foreach_decoded(const BinaryMessage &msg, std::function< bool(std::shared_ptr< Message >)> dest) const =0
Decode a message from its raw encoded representation, calling dest on each resulting Message...
std::vector< std::shared_ptr< Message > > from_bulletin(const wreport::Bulletin &msg) const override=0
Import a decoded BUFR/CREX message.