20#ifndef CONFIG_COMMON_H_
21#define CONFIG_COMMON_H_
23#include "Config_def.h"
30typedef struct _xmlNode xmlNode;
31typedef xmlNode *xmlNodePtr;
36typedef struct _xmlDoc xmlDoc;
37typedef xmlDoc *xmlDocPtr;
44CONFIG_EXPORT
bool isElementNode(xmlNodePtr theNode);
54CONFIG_EXPORT
bool isNode(xmlNodePtr theNode,
const char* theNodeName, ...);
64CONFIG_EXPORT
bool isAttributeNode(xmlNodePtr theNode);
70CONFIG_EXPORT
bool isWidgetNode(xmlNodePtr theNode);
72CONFIG_EXPORT
bool isCaseNode(xmlNodePtr theNode);
81CONFIG_EXPORT
bool hasChild(xmlNodePtr theNode);
87CONFIG_EXPORT
bool hasParent(xmlNodePtr theNode);
92CONFIG_EXPORT
bool hasParent(xmlNodePtr theNode,
const char* theNodeName, ...);
97CONFIG_EXPORT xmlNodePtr hasParentRecursive(xmlNodePtr theNode,
const char* theNodeName, ...);
103CONFIG_EXPORT
bool getParametersInfo(xmlNodePtr theNode, std::string& outPropertyId,
104 std::list<std::string>& outValidatorParameters);
117CONFIG_EXPORT std::string library(
const std::string& theLibName);
122CONFIG_EXPORT std::string getProperty(xmlNodePtr theNode,
const char* thePropName);
127CONFIG_EXPORT std::string getContent(xmlNodePtr theNode);
132std::string getNormalizedProperty(xmlNodePtr theNode,
const char* thePropName);
142CONFIG_EXPORT
bool getBooleanAttribute(xmlNodePtr theNode,
143 const char* theAttributeName,
150CONFIG_EXPORT std::string normalize(
const char* theString);
155CONFIG_EXPORT std::string normalize(
const std::string& theString);