Message importer interface.
More...
#include <importer.h>
Message importer interface.
◆ create() [1/2]
Instantiate an importer.
- Parameters
-
type | The input file type |
opts | Options controlling import behaviour |
◆ create() [2/2]
static 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 |
◆ 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 |
The documentation for this class was generated from the following file: