ExporterRegistry
General
ExporterRegistry és una classe en Aspose.Slides FOSS per a C++.
Registre central per als exportadors de format. Manten un mapping des de les cadenes de valors SaveFormat a les seves fàbriques d’exportador corresponents. Els nous exportadores es poden registrar dinàmicament, fent més fàcil afegir nous formats d ’exportació. @code // Registrar un exportador ExporterRegistry::register_exporter (); // Obtén un exporter per a un format auto-exportator = ExporterRegistry get_xporter ((“Pptx “); si (exportador) { exportadora->export_presentation ((package, “output.pptx”); } @endcode
Mètodes
| 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 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) → 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. |