libdballe  7.21
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
dballe::msg::Exporter Class Referenceabstract

Message exporter. More...

#include <codec.h>

Inheritance diagram for dballe::msg::Exporter:
dballe::msg::WRExporter dballe::msg::BufrExporter dballe::msg::CrexExporter

Classes

struct  Options
 

Public Member Functions

 Exporter (const Options &opts)
 
virtual std::string to_binary (const Messages &msgs) const =0
 Encode a message. More...
 
virtual std::unique_ptr< wreport::Bulletinto_bulletin (const Messages &msgs) const =0
 Export to a Bulletin.
 
virtual std::unique_ptr< wreport::Bulletinmake_bulletin () const
 Create a bulletin that works with this exporter. More...
 

Static Public Member Functions

static std::unique_ptr< Exportercreate (File::Encoding type, const Options &opts=Options())
 Instantiate the right importer for the given type.
 

Protected Attributes

Options opts
 

Detailed Description

Message exporter.

This class is designed like a configurable virtual functor.

Exporters of various kinds can provide their implementations.

Member Function Documentation

◆ make_bulletin()

virtual std::unique_ptr<wreport::Bulletin> dballe::msg::Exporter::make_bulletin ( ) const
virtual

Create a bulletin that works with this exporter.

Returns
the bulletin, or NULL of this is an exporter for a format not covered by Bulletin

Reimplemented in dballe::msg::CrexExporter, and dballe::msg::BufrExporter.

◆ to_binary()

virtual std::string dballe::msg::Exporter::to_binary ( const Messages msgs) const
pure virtual

Encode a message.

Parameters
msgsMessage to encode
Return values
rmsgThe resulting BinaryMessage

Implemented in dballe::msg::CrexExporter, and dballe::msg::BufrExporter.


The documentation for this class was generated from the following file: