InMemoryOpcPackage

Vue de l’ensemble

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

Package OPC en mémoire avec support de fichier ZIP I/O. Gère un package Open Packaging Conventions comme une carte en mémorisation des noms de parties pour les arées bytes. Soutient le chargement et l’épargne aux archives Z IP (cours de fichiers ou flux), conservant des pièces inconnues pour la fidélité du voyage rond.

Cette classe fournit 14 méthodes pour travailler avec les objets InMemoryOpcPackage dans des programmes C++. Les méthodologies disponibles comprennent: InMmory Opc Packages, close , create_new ; delete_part; get_partie : ‘get-part_names.has_parti ? , 'open ! , ‘save ، 'set_parte. Tous les membres publics sont accessibles à n’importe quelle application C ++ après l’installation de l’Aspose.Slides FOSS pour le package C+.

méthodes

SignatureDescription
InMemoryOpcPackage()
open(path: std::filesystem::path)InMemoryOpcPackageOpen an OPC package from a file path.
open(stream: std::istream)InMemoryOpcPackageOpen an OPC package from a file path.
create_new()InMemoryOpcPackageCreate a new empty OPC package.
save(path: std::filesystem::path)Save the package to a file path as a ZIP archive.
save(stream: std::ostream)Save the package to a file path as a ZIP archive.
get_part(part_name: std::string_view)std::optional<std::vector<uint8_t>>Retrieve a part’s content by name. Returns nullopt if the part does not exist.
set_part(part_name: std::string_view, content: std::vector<uint8_t>)Store (or overwrite) a part with the given content.
set_part(part_name: std::string_view, content: std::string_view)Store (or overwrite) a part with the given content.
has_part(part_name: std::string_view)boolCheck whether a part exists in the package.
delete_part(part_name: std::string_view)boolDelete a part from the package.
get_part_names()std::vector<std::string>Get a list of all part names in the package.
source_path()std::optional<std::string>Get the original file path if the package was loaded from a file.
close()Close the package and release resources. Clears all in-memory part data. The package should not be used after closing.

Voir aussi

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