libdballe  6.8
Data Structures | Public Member Functions | Static Public Member Functions | Protected Attributes
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

Data Structures

struct  Options
 

Public Member Functions

 Exporter (const Options &opts)
 
virtual void to_rawmsg (const Msgs &msgs, Rawmsg &msg) const =0
 Encode a message. More...
 
virtual void to_bulletin (const Msgs &msgs, wreport::Bulletin &msg) const =0
 Export to a Bulletin.
 
virtual std::auto_ptr
< wreport::Bulletin > 
make_bulletin () const
 Create a bulletin that works with this exporter. More...
 

Static Public Member Functions

static std::auto_ptr< Exportercreate (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

virtual std::auto_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.

virtual void dballe::msg::Exporter::to_rawmsg ( const Msgs msgs,
Rawmsg msg 
) const
pure virtual

Encode a message.

Parameters
msgsMessage to encode
Return values
rmsgThe resulting Rawmsg

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


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