ExporterRegistry
Overview
ExporterRegistry is a class in Aspose.Slides FOSS for C++.
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
This class provides 6 methods for working with ExporterRegistry objects in Go programs.
Available methods include: clear, get_exporter, get_exporter_class, get_supported_formats, is_format_supported, unregister_exporter.
All exported members are accessible to any Go application after adding the package via go get github.com/aspose-pdf-foss/aspose-pdf-foss-for-go.
Methods
| Signature | Description |
|---|---|
unregister_exporter(format_value: std::string_view) → bool | Unregister an exporter for a specific format. |
get_exporter(format_value: std::string_view) → std::unique_ptr<ExporterBase> | Returns a unique_ptr to the exporter handling the specified format |
get_exporter_class(format_value: std::string_view) → std::optional<ExporterFactory> | Returns an optional containing the factory for the given format |
is_format_supported(format_value: std::string_view) → bool | Check 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. |