RelationshipsManager
Overview
RelationshipsManager is a class in Aspose.Slides FOSS for C++.
Manages the .rels file associated with a given OPC part. Loads existing relationships on construction and provides methods to query, add, and remove relationships. Call save() to persist changes.
This class provides 9 methods for working with RelationshipsManager objects in C++ programs.
Available methods include: RelationshipsManager, add_relationship, get_all_relationships, get_relationship, get_relationships_by_type, get_rels_part_name, part_name, remove_relationship, save.
All public members are accessible to any C++ application after installing the Aspose.Slides FOSS for C++ package.
Methods
| Signature | Description |
|---|---|
RelationshipsManager(package: OpcPackage, source_part: std::string_view) | Construct a relationships manager for the given part. Empty string for root relationships (_rels/.rels). |
get_relationship(rel_id: std::string_view) → std::optional<Relationship> | Get a relationship by ID. |
get_relationships_by_type(type: std::string_view) → std::vector<Relationship> | Get all relationships filtered by type. |
get_all_relationships() → std::vector<Relationship> | Get all relationships. |
add_relationship(rel_type: std::string_view, target: std::string_view, rel_id: std::string_view, target_mode: std::optional<std::string_view>) → std::string | Add a new relationship. |
remove_relationship(rel_id: std::string_view) → bool | Remove a relationship by ID. |
save() | Manages the .rels file associated with a given OPC part. Loads existing relationships on construction and provides methods to |
get_rels_part_name(source_part: std::string_view) → std::string | Compute the .rels part name for any given part path. Examples: "" -> “_rels/.rels” “ppt/presentation.xml” -> “ppt/_rels/presentation.xml.rels” “ppt/slides/slide1.xml” -> “ppt/slides/_rels/slide1.xml.rels” |
part_name() → std::string | Get the .rels file part name. |