Merge branch 'master' into cached_output_directory_vars

pull/3903/head
Kim Kulling 2021-05-20 14:12:29 +02:00 committed by GitHub
commit b622eb5689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -174,6 +174,11 @@ public:
return false;
}
/// @brief Will return truem if a root node is there.
/// @return true in case of an existing root.
bool hasRoot() const {
return nullptr != mDoc;
}
/// @brief Will return the document pointer, is nullptr if no xml-file was parsed.
/// @return The pointer showing to the document.
pugi::xml_document *getDocument() const {
@ -183,12 +188,20 @@ public:
/// @brief Will return the root node, const version.
/// @return The root node.
const TNodeType getRootNode() const {
static pugi::xml_node none;
if (nullptr == mDoc) {
return none;
}
return mDoc->root();
}
/// @brief Will return the root node, non-const version.
/// @return The root node.
TNodeType getRootNode() {
static pugi::xml_node none;
if (nullptr == mDoc) {
return none;
}
return mDoc->root();
}