Message importer interface.
More...
#include <importer.h>
|
|
| Importer (const Importer &)=delete |
|
| Importer (Importer &&)=delete |
|
Importer & | operator= (const Importer &)=delete |
|
Importer & | operator= (Importer &&)=delete |
| virtual Encoding | encoding () const =0 |
| | Return the encoding for this importer.
|
| std::vector< std::shared_ptr< Message > > | from_binary (const BinaryMessage &msg) const |
| | Decode a message from its raw encoded representation.
|
| virtual std::vector< std::shared_ptr< Message > > | from_bulletin (const wreport::Bulletin &msg) const |
| | Import a decoded BUFR/CREX message.
|
| 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.
|
Message importer interface.
◆ create() [1/2]
◆ create() [2/2]
| std::unique_ptr< Importer > dballe::Importer::create |
( |
Encoding | type, |
|
|
const std::string & | opts ) |
|
static |
Instantiate an importer.
- Parameters
-
| type | The input file type |
| opts | Options controlling import behaviour |
◆ encoding()
| virtual Encoding dballe::Importer::encoding |
( |
| ) |
const |
|
pure virtual |
◆ foreach_decoded()
| virtual bool dballe::Importer::foreach_decoded |
( |
const BinaryMessage & | msg, |
|
|
std::function< bool(std::shared_ptr< Message >)> | dest ) const |
|
pure virtual |
Decode a message from its raw encoded representation, calling dest on each resulting Message.
Return false from dest to stop decoding.
- Parameters
-
| msg | Encoded message. |
| dest | The function that consumes the decoded messages. |
- Returns
- true if it got to the end of decoding, false if dest returned false.
◆ from_binary()
| std::vector< std::shared_ptr< Message > > dballe::Importer::from_binary |
( |
const BinaryMessage & | msg | ) |
const |
Decode a message from its raw encoded representation.
- Parameters
-
- Return values
-
| msgs | The resulting messages |
◆ from_bulletin()
| virtual std::vector< std::shared_ptr< Message > > dballe::Importer::from_bulletin |
( |
const wreport::Bulletin & | msg | ) |
const |
|
virtual |
The documentation for this class was generated from the following file: