API for selecting FileReaders module
API for selecting FileReaders for given input files.
A concrete DescriptorPreference assigns a preference value to each descriptor based on the specified Format and Codec. It represents a preference to use the descriptor in question to read a file with this Format and Codec.
A concrete FileReaderSelector can select a matching FileReaderDescriptor by a pair of Format and Codec from a list of available FileReaderDescriptors. The concrete selection mechanism is implemented by the subclass.
FileReaderSelection provides an API for selecting a FileReaderDescriptor from a set of available descriptors. It uses a concrete DescriptorPreference and a concrete FileReaderSelector to actually select the descriptor based on the preference. An instance of the selected descriptor is returned which can then create the concrete FileReader instance.
A convenience interface to this entire mechanism is provided by functions select_descriptor() and select_reader().
Class FileReaderRegistry holds the set of available FileReaderDescriptors as well as the set of supported Formats. It also defines default selections for Metadata/TOC formats as well as audio formats.
Classes
- class arcsdec::v_1_0_0::DefaultPreference
- DescriptorPreference for the most specific descriptor (with least supported Formats and Codecs).
- class arcsdec::v_1_0_0::DefaultSelector
- FileReaderSelector for first descriptor (in order of occurrence) with highest preference.
- class arcsdec::v_1_0_0::DescriptorPreference
- Interface for a descriptor preference.
-
template<typename P, typename S>class arcsdec::v_1_0_0::FileReaderPreferenceSelection
- FileReaderSelection of FileReaderDescriptors.
- class arcsdec::v_1_0_0::FileReaderRegistry
- Registry holding all available FileReaderDescriptors and all supported Formats.
- class arcsdec::v_1_0_0::FileReaderSelection
- Interface to select a FileReaderDescriptor by Format and Codec.
- class arcsdec::v_1_0_0::FileReaderSelector
- Interface for a selector on a set of FileReaderDescriptor instances.
- class arcsdec::v_1_0_0::FormatPreference
- DescriptorPreference for the most specific descriptor that accepts the Format.
- class arcsdec::v_1_0_0::IdSelector
- FileReaderSelector for a specific descriptor id.
- class arcsdec::v_1_0_0::MinPreference
- DescriptorPreference that is always DescriptorPreference::
MIN_PREFERENCE. -
template<class D>struct arcsdec::v_1_0_0::RegisterDescriptor
- Register a FileReaderDescriptor type.
-
template<enum Format F>struct arcsdec::v_1_0_0::RegisterFormat
- Register a Format.
Typedefs
- using FileReaders = std::unordered_map<std::string, std::unique_ptr<FileReaderDescriptor>>
- Type for the container of available FileReaderDescriptor instances.
- using FormatList = std::vector<std::unique_ptr<Matcher>>
- An unordered list of Matchers for Formats.
Typedef documentation
using FileReaders = std::unordered_map<std::string, std::unique_ptr<FileReaderDescriptor>>
#include <selection.hpp>
Type for the container of available FileReaderDescriptor instances.
A single FileReaderDescriptor can be requested by its id. FileReaderDescriptor instances come without an inherent ordering.
using FormatList = std::vector<std::unique_ptr<Matcher>>
#include <selection.hpp>
An unordered list of Matchers for Formats.