arcsdec::v_1_0_0::FileReaderDescriptor class

Abstract base class for the properties of a FileReader.

A FileReaderDescriptor provides all required information to decide whether a a given file can be read by readers specified and created by this descriptor. It can create an opaque reader that can read the successfully matched file.

Derived classes

class v_1_0_0::DescriptorCue
Libcue-based parser for Cuesheets.
class v_1_0_0::DescriptorCuesheet
Parser for Cuesheets.
class v_1_0_0::DescriptorFFmpeg
FFmpeg-based AudioReader for virtually any lossless audio format.
class v_1_0_0::DescriptorFlac
Libflac-based reader for fLaC containers holding fLaC data.
class v_1_0_0::DescriptorSndfile
Libsndfile-based reader for some lossless audio input formats.
class v_1_0_0::DescriptorToc
Libcdio-based parser for CDRDAO's .toc files.
class v_1_0_0::DescriptorWavPCM
Reader for RIFF WAVE files containing PCM data.
class v_1_0_0::DescriptorWavpack
Wavpack-5-based reader for losslessly encoded wavpack files.

Constructors, destructors, conversion operators

~FileReaderDescriptor() virtual noexcept
Virtual default destructor.

Public functions

auto accepts(const Codec codec) const -> bool
Check for acceptance of the specified codec.
auto accepts(const Format format) const -> bool
Check for acceptance of the specified format.
auto accepts(const Format format, const Codec codec) const -> bool
Check for acceptance of the specified Format and Codec pair.
auto clone() const -> std::unique_ptr<FileReaderDescriptor>
Clone this instance.
auto codecs() const -> const std::set<Codec>
Set of accepted codecs.
auto create_reader() const -> std::unique_ptr<FileReader>
Create an opaque reader for the tested file.
auto formats() const -> const std::set<Format>
Set of accepted formats.
auto id() const -> std::string
Id of this FileReaderDescriptor type.
auto input_type() const -> InputType
Returns TRUE iff this descriptor is for an AudioReader, otherwise FALSE.
auto libraries() const -> LibInfo
Names of the libraries the reader used to implement the reader.
auto name() const -> std::string
Name of this FileReaderDescriptor type.

Function documentation

bool arcsdec::v_1_0_0::FileReaderDescriptor::accepts(const Codec codec) const

Check for acceptance of the specified codec.

Parameters
codec in The codec to check for
Returns TRUE if codec is accepted, otherwise FALSE

A descriptor accepts a Codec iff it is contained in codecs().

bool arcsdec::v_1_0_0::FileReaderDescriptor::accepts(const Format format) const

Check for acceptance of the specified format.

Parameters
format in The format to check for
Returns TRUE if format is accepted, otherwise FALSE

A descriptor accepts a Format iff it is contained in formats().

bool arcsdec::v_1_0_0::FileReaderDescriptor::accepts(const Format format, const Codec codec) const

Check for acceptance of the specified Format and Codec pair.

Parameters
format in The Format to check for
codec in The Codec to check for
Returns TRUE if format and codec are accepted, otherwise FALSE

A specified Codec may be accepted on its own, but not together with the specified Format.

std::unique_ptr<FileReaderDescriptor> arcsdec::v_1_0_0::FileReaderDescriptor::clone() const

Clone this instance.

Returns A deep copy of the instance

Provides a deep copy of the instance.

const std::set<Codec> arcsdec::v_1_0_0::FileReaderDescriptor::codecs() const

Set of accepted codecs.

Returns The set of accepted codecs.

std::unique_ptr<FileReader> arcsdec::v_1_0_0::FileReaderDescriptor::create_reader() const

Create an opaque reader for the tested file.

Returns A FileReader that can read the tested file

const std::set<Format> arcsdec::v_1_0_0::FileReaderDescriptor::formats() const

Set of accepted formats.

Returns The set of accepted formats.

std::string arcsdec::v_1_0_0::FileReaderDescriptor::id() const

Id of this FileReaderDescriptor type.

Returns A human-readable id of this FileReaderDescriptor

The id can be used as key in a FileReaderRegistry.

InputType arcsdec::v_1_0_0::FileReaderDescriptor::input_type() const

Returns TRUE iff this descriptor is for an AudioReader, otherwise FALSE.

Returns InputType of this Descriptor

LibInfo arcsdec::v_1_0_0::FileReaderDescriptor::libraries() const

Names of the libraries the reader used to implement the reader.

Returns Names of the underlying libraries

Each library is represented by its name and the filepath of the concrete binary object loaded at runtime.

std::string arcsdec::v_1_0_0::FileReaderDescriptor::name() const

Name of this FileReaderDescriptor type.

Returns A human-readable name of this FileReaderDescriptor