InMemoryOpcPackage

InMemoryOpcPackage

Overview

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

In-memory OPC package with ZIP file I/O support. Manages an Open Packaging Conventions package as an in-memory map of part names to byte arrays. Supports loading from and saving to ZIP archives (file paths or streams), preserving unknown parts for round-trip fidelity.

Methods

SignatureDescription
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.
set_part(part_name: std::string_view, content: std::string_view)Store (or overwrite) a part with the given content.
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.