IOFormat
1.12.0
Loading...
Searching...
No Matches
ExtractorPlugin.h
1
#pragma once
2
3
#include <memory>
4
5
#include <iolink/storage/RandomAccess.h>
6
#include <iolink/storage/StreamAccess.h>
7
#include <iolink/view/View.h>
8
9
#include <ioformat/OptionMap.h>
10
#include <ioformat/plugin/FormatPlugin.h>
11
12
namespace
ioformat
13
{
14
21
class
ExtractorPlugin
:
public
FormatPlugin
22
{
23
public
:
27
static
constexpr
uint64_t
PLUGIN_API_VERSION
= 2;
28
35
inline
uint64_t
api
() const final
override
{
return
PLUGIN_API_VERSION
; }
36
49
virtual
std::shared_ptr<iolink::View>
open
(
const
std::string& src,
50
const
std::string& format,
51
const
OptionMap
& options) = 0;
52
65
virtual
std::shared_ptr<iolink::View>
open
(std::shared_ptr<iolink::StreamAccess> src,
66
const
std::string& format,
67
const
OptionMap
& options) = 0;
68
81
virtual
std::shared_ptr<iolink::View>
open
(std::shared_ptr<iolink::RandomAccess> src,
82
const
std::string& format,
83
const
OptionMap
& options) = 0;
84
};
85
91
#define IOFORMAT_EXTRACTOR_PLUGIN_TOKEN ioformat_extractor_plugin
92
100
#define IOFORMAT_EXTRACTOR_PLUGIN_SYMBOL "ioformat_extractor_plugin"
101
110
#define IOFORMAT_DECLARE_EXTRACTOR_PLUGIN(PLUGIN_CLASS) \
111
IOFORMAT_DECLARE_PLUGIN(PLUGIN_CLASS, IOFORMAT_EXTRACTOR_PLUGIN_TOKEN)
112
113
}
// namespace ioformat
ioformat::ExtractorPlugin
Extractor plugin interface.
Definition
ExtractorPlugin.h:22
ioformat::ExtractorPlugin::open
virtual std::shared_ptr< iolink::View > open(std::shared_ptr< iolink::StreamAccess > src, const std::string &format, const OptionMap &options)=0
Open a stream for reading.
ioformat::ExtractorPlugin::open
virtual std::shared_ptr< iolink::View > open(const std::string &src, const std::string &format, const OptionMap &options)=0
Open a file for reading.
ioformat::ExtractorPlugin::PLUGIN_API_VERSION
static constexpr uint64_t PLUGIN_API_VERSION
The actual API version of that plugin.
Definition
ExtractorPlugin.h:27
ioformat::ExtractorPlugin::open
virtual std::shared_ptr< iolink::View > open(std::shared_ptr< iolink::RandomAccess > src, const std::string &format, const OptionMap &options)=0
Open a random access for reading.
ioformat::ExtractorPlugin::api
uint64_t api() const final override
Get the API version of the plugin.
Definition
ExtractorPlugin.h:35
ioformat::FormatPlugin
Plugin class for format encoding/decoding.
Definition
FormatPlugin.h:15
ioformat::OptionMap
A map of heterogeneous options.
Definition
OptionMap.h:34
ioformat
Global namespace which contains all methods to encode/decode data from/into different resources (file...
Definition
Error.h:6
ioformat
public
include
ioformat
plugin
ExtractorPlugin.h
Generated on Fri Sep 12 2025 14:14:37 for IOFormat by
1.9.8