ExporterRegistry

Vue de l’ensemble

‘ExporterRegistry’ est une classe dans Aspose.Slides FOSS pour C++.

Registre central pour les exportateurs de format. maintient une cartographie des lignes de valeur SaveFormat à leurs usines d’exportation correspondantes. Les nouveaux exportteurs peuvent être enregistrés dynamiquement, ce qui facilite l’ajout de nouveaux formats d’exporte. @code // Enregistrement d ́un exportateurRegister::register_exporter (); // Obtenez un exportteur pour un format auto-exporteur = ExporterRegistry::get_Exporter(“Pptx”); si (exportaire) { exporter->exports_presentation(package, “output.pptx”); } @endcode

Cette classe fournit 7 méthodes pour travailler avec les objets de registre d’exportateur dans des programmes C++. Les méthodologies disponibles comprennent: ‘ExporterRegistry’, ‘clear’, `get_exporter’, ‘get-exporteur_class’, ‘get - supported_formats’, “is_format_supported’, «unregister_ exporter’. Tous les membres publics sont accessibles à toute application C ++ après l’installation du package Aspose.Slides FOSS pour le pack C+.

méthodes

SignatureDescription
ExporterRegistry()
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 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)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.

Voir aussi

  • Aspose.Slides - référence API d’entreprise
 Français