ExporterRegistry

ExporterRegistry

Overview

ExporterRegistry is a class in Aspose.Slides for CPP. Inherits from: ExporterRegistry.

Central registry for format exporters. Maintains a mapping from SaveFormat value strings to their corresponding exporter factories. New exporters can be registered dynamically, making it easy to add new export formats. @code // Register an exporter ExporterRegistry::register_exporter (); // Get an exporter for a format auto exporter = ExporterRegistry::get_exporter(“Pptx”); if (exporter) { exporter->export_presentation(package, “output.pptx”); } @endcode

Methods

SignatureDescription
unregister_exporter(format_value: std::string_view)boolUnregister an exporter for a specific format.
get_exporter(format_value: std::string_view)std::unique_ptr<ExporterBase>Returns a unique_ptr to the exporter instance for the specified format
get_exporter_class(format_value: std::string_view)std::optional<ExporterFactory>Returns an optional containing the factory for the format, if registered
is_format_supported(format_value: std::string_view)boolCheck if a format has a registered exporter.
get_supported_formats()std::vector<std::string>Register an exporter class for its supported formats. Calls T::get_supported_formats() to discover which format strings the exporter handles, then maps each to a factory that creates T.
clear()Clear all registered exporters. Mainly for testing.