X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_Common.h;h=eb7cbc9fa9f2ef97be584f2437e95554b823ddce;hb=b5893b0a30fac08134c24de4565cb513a43affa6;hp=52fc1e1726fa0adbfedd95f72a7f3a930995c362;hpb=5ba89a77cdb9638a6d298c2aa5233d26576d9ed0;p=modules%2Fshaper.git diff --git a/src/Config/Config_Common.h b/src/Config/Config_Common.h index 52fc1e172..eb7cbc9fa 100644 --- a/src/Config/Config_Common.h +++ b/src/Config/Config_Common.h @@ -43,6 +43,8 @@ CONFIG_EXPORT bool isElementNode(xmlNodePtr theNode); */ CONFIG_EXPORT bool isNode(xmlNodePtr theNode, const char* theNodeName, ...); +//#define isNode(p) _isNode(p, NULL) + /*! * Checks if the given node is attribute node. * Attribute node represents a widget, that is able to store/restore @@ -79,6 +81,12 @@ CONFIG_EXPORT bool hasParent(xmlNodePtr theNode); */ CONFIG_EXPORT bool hasParent(xmlNodePtr theNode, const char* theNodeName, ...); +/*! + * Checks if the given node has any valid parent in hierarchy with any of the given node names. + */ +CONFIG_EXPORT xmlNodePtr hasParentRecursive(xmlNodePtr theNode, const char* theNodeName, ...); + + /*! * Returns named property for an id node as std::string and the parameters of the node. */ @@ -103,6 +111,11 @@ CONFIG_EXPORT std::string library(const std::string& theLibName); */ CONFIG_EXPORT std::string getProperty(xmlNodePtr theNode, const char* thePropName); +/*! + * Returns content of the node as std::string if it is exists. + */ +CONFIG_EXPORT std::string getContent(xmlNodePtr theNode); + /*! * Returns normalized (lower case) named property for a given node as std::string. */