29 #include <unordered_map> 31 #include <xlnt/xlnt_config.hpp> 32 #include <xlnt/packaging/relationship.hpp> 33 #include <xlnt/utils/path.hpp> 53 std::vector<path> parts()
const;
65 bool has_relationship(
const path &source,
const std::string &rel_id)
const;
79 class relationship relationship(const path &source,
const std::string &rel_id)
const;
84 std::vector<xlnt::relationship> relationships(
const path &source)
const;
89 std::vector<xlnt::relationship> relationships(
const path &source,
relationship_type type)
const;
95 path canonicalize(
const std::vector<xlnt::relationship> &rels)
const;
105 std::string register_relationship(
const class relationship &rel);
113 std::unordered_map<std::string, std::string> unregister_relationship(
const uri &source,
const std::string &rel_id);
120 bool has_content_type(
const path &part)
const;
127 std::string content_type(
const path &part)
const;
134 bool has_default_type(
const std::string &extension)
const;
139 std::vector<std::string> extensions_with_default_types()
const;
146 std::string default_type(
const std::string &extension)
const;
151 void register_default_type(
const std::string &extension,
const std::string &type);
156 void unregister_default_type(
const std::string &extension);
164 bool has_override_type(
const path &part)
const;
171 std::string override_type(
const path &part)
const;
176 std::vector<path> parts_with_overriden_types()
const;
181 void register_override_type(
const path &part,
const std::string &type);
186 void unregister_override_type(
const path &part);
196 std::string next_relationship_id(
const path &part)
const;
201 std::unordered_map<std::string, std::string> default_content_types_;
206 std::unordered_map<path, std::string> override_content_types_;
211 std::unordered_map<path, std::unordered_map<std::string, xlnt::relationship>> relationships_;
Represents an association between a source Package or part, and a target object which can be a part o...
Definition: relationship.hpp:103
Enumerates the possible types a cell can be determined by it's current value.
Definition: cell.hpp:36
bool operator!=(std::nullptr_t, const cell &cell)
Returns true if this cell is initialized.
Encapsulates a uniform resource identifier (URI) as described by RFC 3986.
Definition: uri.hpp:38
bool operator==(std::nullptr_t, const cell &cell)
Returns true if this cell is uninitialized.
Encapsulates a path that points to location in a filesystem.
Definition: path.hpp:43
relationship_type
All package relationships must be one of these defined types.
Definition: relationship.hpp:54
target_mode
Specifies whether the target of a relationship is inside or outside the Package.
Definition: relationship.hpp:39
The manifest keeps track of all files in the OOXML package and their type and relationships.
Definition: manifest.hpp:41