libdballe  7.6
conversion.h
1 #ifndef DBALLE_CMDLINE_CONVERSION_H
2 #define DBALLE_CMDLINE_CONVERSION_H
3 
4 #include <dballe/cmdline/processor.h>
5 
6 namespace wreport {
7 struct Bulletin;
8 }
9 
10 namespace dballe {
11 struct File;
12 
13 namespace msg {
14 struct Importer;
15 struct Exporter;
16 }
17 
18 namespace cmdline {
19 
20 struct Converter : public Action
21 {
22  File* file;
23  const char* dest_rep_memo;
24  const char* dest_template;
25  bool bufr2netcdf_categories;
26 
27  msg::Exporter* exporter;
28 
29  Converter() : file(0), dest_rep_memo(0), dest_template(0), bufr2netcdf_categories(false), exporter(0) {}
30  ~Converter();
31 
36  virtual bool operator()(const cmdline::Item& item);
37 
38 protected:
45  void process_bufrex_msg(const BinaryMessage& orig, const wreport::Bulletin& msg);
46 
51  void process_dba_msg(const BinaryMessage& orig, const Messages& msgs);
52 
57  void process_dba_msg_from_bulletin(const BinaryMessage& orig, const wreport::Bulletin& bulletin, const Messages& msgs);
58 };
59 
60 }
61 }
62 
63 #endif
Definition: processor.h:97
void process_bufrex_msg(const BinaryMessage &orig, const wreport::Bulletin &msg)
Perform conversion at the encoding level only (e.g.
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
Definition: processor.h:80
Binary message.
Definition: file.h:131
Ordered collection of messages.
Definition: message.h:64
Definition: conversion.h:6
Definition: conversion.h:20
virtual bool operator()(const cmdline::Item &item)
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 Messages &msgs)
Perform conversion of decded data, using the original bulletin for type/subtype/localsubtype informat...
Message exporter.
Definition: codec.h:104
void process_dba_msg(const BinaryMessage &orig, const Messages &msgs)
Perform conversion of decoded data, auto-inferring type/subtype/localsubtype from the Messages conten...
File object for doing I/O on binary message streams.
Definition: file.h:17