|
denigma 4.0.0
|
Lightweight registry for locating converters by source and target format. More...
#include <conversion.h>
Public Member Functions | |
| void | add (std::unique_ptr< IConverter > converter) |
| Adds a converter to the registry. | |
| void | add (std::unique_ptr< IMultiOutputConverter > converter) |
| Adds a multi-output converter to the registry. | |
| void | add (std::unique_ptr< IReaderConverter > converter) |
| Adds a reader-backed converter to the registry. | |
| void | add (std::unique_ptr< IReaderMultiOutputConverter > converter) |
| Adds a reader-backed multi-output converter to the registry. | |
| const IConverter * | find (FormatId sourceFormat, FormatId targetFormat) const |
| Returns the first registered converter matching the requested formats, or nullptr. | |
| const IMultiOutputConverter * | findMultiOutput (FormatId sourceFormat, FormatId targetFormat) const |
| Returns the first registered multi-output converter matching the requested formats, or nullptr. | |
| const IReaderConverter * | findReader (FormatId sourceFormat, FormatId targetFormat) const |
| Returns the first registered reader-backed converter matching the requested formats, or nullptr. | |
| const IReaderMultiOutputConverter * | findReaderMultiOutput (FormatId sourceFormat, FormatId targetFormat) const |
| Returns the first registered reader-backed multi-output converter matching the requested formats, or nullptr. | |
| ConversionArtifact | convert (FormatId sourceFormat, FormatId targetFormat, std::span< const std::byte > input, const ConversionRequest &request={}) const |
| Converts an in-memory input with the registered adapter for the requested formats. | |
| ConversionArtifact | convert (FormatId sourceFormat, FormatId targetFormat, const IRandomAccessReader &input, const ConversionRequest &request={}) const |
| Converts a random-access input with the registered adapter for the requested formats. | |
Lightweight registry for locating converters by source and target format.
|
inline |
Converts a random-access input with the registered adapter for the requested formats.
Returns an error diagnostic when no matching adapter is registered.
|
inline |
Converts an in-memory input with the registered adapter for the requested formats.
Returns an error diagnostic when no matching adapter is registered.