libdballe 9.13
conversion.h
1#ifndef DBALLE_CMDLINE_CONVERSION_H
2#define DBALLE_CMDLINE_CONVERSION_H
3
4#include <dballe/cmdline/processor.h>
5
6namespace wreport {
7struct Bulletin;
8}
9
10namespace dballe {
11struct File;
12
13namespace cmdline {
14
15struct Converter : public Action
16{
17 File* file = nullptr;
18 const char* dest_rep_memo = nullptr;
19 const char* dest_template = nullptr;
20 bool bufr2netcdf_categories = false;
21
22 Converter() {}
23 ~Converter();
24
25 void set_exporter(dballe::Encoding encoding,
26 const impl::ExporterOptions& opts);
27
32 bool operator()(const cmdline::Item& item) override;
33
34protected:
35 Exporter* exporter = nullptr;
36 const BulletinExporter* bexporter = nullptr;
37
48 const wreport::Bulletin& msg);
49
54 void
56 const std::vector<std::shared_ptr<dballe::Message>>& msgs);
57
63 const BinaryMessage& orig, const wreport::Bulletin& bulletin,
64 const std::vector<std::shared_ptr<dballe::Message>>& msgs);
65};
66
67} // namespace cmdline
68} // namespace dballe
69
70#endif
Binary message.
Definition file.h:135
Definition exporter.h:111
Message exporter interface.
Definition exporter.h:65
File object for doing I/O on binary message streams.
Definition file.h:18
Definition processor.h:109
bool operator()(const cmdline::Item &item) override
Convert the item as configured in the Converter, and write it to the output file.
void process_dba_msg_from_bulletin(const BinaryMessage &orig, const wreport::Bulletin &bulletin, const std::vector< std::shared_ptr< dballe::Message > > &msgs)
Perform conversion of decded data, using the original bulletin for type/subtype/localsubtype informat...
void process_dba_msg(const BinaryMessage &orig, const std::vector< std::shared_ptr< dballe::Message > > &msgs)
Perform conversion of decoded data, auto-inferring type/subtype/localsubtype from the Messages conten...
void process_bufrex_msg(const BinaryMessage &orig, const wreport::Bulletin &msg)
Perform conversion at the encoding level only (e.g.
Definition processor.h:89
ExporterOptions with default constructor usable.
Definition msg.h:39