class
#include <selection.hpp>
v_1_0_0::FileReaderRegistry Hold all available FileReaderDescriptors and all supported Formats.
A FileReaderDescriptor instance is registered via instantiating the template subclass RegisterDescriptor with the appropriate Descriptor type.
A Format along with its byte and filename characteristics is registered via instantiating the template subclass RegisterFormat with the appropriate Format type.
Public static functions
- static auto default_audio_selection() -> const FileReaderSelection*
- Default selection for AudioReaders.
- static auto default_toc_selection() -> const FileReaderSelection*
- Default selection for MetatdataParsers.
- static auto formats() -> const FormatList*
- List of supported Formats.
- static auto has_format(const Format f) -> bool
- Return TRUE iff at least one descriptor is registered that accepts
f
. - static auto reader(const std::string& id) -> std::unique_ptr<FileReaderDescriptor>
- Get a FileReaderDescriptor by its id.
- static auto readers() -> const FileReaders*
- Set of available FileReaderDescriptors.
Protected static functions
- static void add_format(std::unique_ptr<Matcher> m)
- Add a Matcher for a Format to this registry.
- static void add_reader(std::unique_ptr<FileReaderDescriptor> d)
- Add a descriptor to this registry.
- static auto call_maker(FunctionReturningUniquePtr<FileReaderDescriptor> create) -> std::unique_ptr<FileReaderDescriptor>
- Instantiate the concrete FileReaderDescriptor with the given name.
- static auto call_maker(FunctionReturningUniquePtr<Matcher> create) -> std::unique_ptr<Matcher>
- Instantiate the concrete Matcher with the given name.
Function documentation
static const FileReaderSelection* arcsdec:: v_1_0_0:: FileReaderRegistry:: default_audio_selection()
Default selection for AudioReaders.
Returns | The default selector for determining an AudioReader |
---|
This is used to initialize ToCParser and the Calculators with the same default selection setup for audio readers.
static const FileReaderSelection* arcsdec:: v_1_0_0:: FileReaderRegistry:: default_toc_selection()
Default selection for MetatdataParsers.
Returns | The default selector for determining a MetadataParser |
---|
This is used to initialize ToCParser and the Calculators with the same default selection setup for ToCs.
static const FormatList* arcsdec:: v_1_0_0:: FileReaderRegistry:: formats()
List of supported Formats.
Returns | List of supported formats |
---|
static bool arcsdec:: v_1_0_0:: FileReaderRegistry:: has_format(const Format f)
Return TRUE iff at least one descriptor is registered that accepts f
.
Parameters | |
---|---|
f in | The format to check for |
Returns | TRUE iff descriptors for are registered, otherwise FALSE |
static std::unique_ptr<FileReaderDescriptor> arcsdec:: v_1_0_0:: FileReaderRegistry:: reader(const std::string& id)
Get a FileReaderDescriptor by its id.
Parameters | |
---|---|
id in | Id of the FileReaderDescriptor to lookup |
Returns | The FileReaderDescriptor with the specified id or nullptr. |
static const FileReaders* arcsdec:: v_1_0_0:: FileReaderRegistry:: readers()
Set of available FileReaderDescriptors.
Returns | Set of available descriptors for FileReaders |
---|
static void arcsdec:: v_1_0_0:: FileReaderRegistry:: add_format(std::unique_ptr<Matcher> m) protected
Add a Matcher for a Format to this registry.
Parameters | |
---|---|
m in | Matcher to add. |
static void arcsdec:: v_1_0_0:: FileReaderRegistry:: add_reader(std::unique_ptr<FileReaderDescriptor> d) protected
Add a descriptor to this registry.
Parameters | |
---|---|
d in | Descriptor to add. |
static std::unique_ptr<FileReaderDescriptor> arcsdec:: v_1_0_0:: FileReaderRegistry:: call_maker(FunctionReturningUniquePtr<FileReaderDescriptor> create) protected
Instantiate the concrete FileReaderDescriptor with the given name.
Parameters | |
---|---|
create in | Function pointer to create the instance |
Returns | Instance returned by create |
static std::unique_ptr<Matcher> arcsdec:: v_1_0_0:: FileReaderRegistry:: call_maker(FunctionReturningUniquePtr<Matcher> create) protected
Instantiate the concrete Matcher with the given name.
Parameters | |
---|---|
create in | Function pointer to create the instance |
Returns | Instance returned by create |