RelationshipsManager
Přehled
RelationshipsManager je třída v Aspose.Slides FOSS pro C++.
Správní soubor .rels spojený s danou částí OPC. Nahrává existující vztahy na konstrukci a poskytuje metody pro dotazování, přidávání a odstranění vztahů. Zavolejte save ((() k zachování změn.
| 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. |