* Author: sbh
*/
-#ifndef Config_Common_H_
-#define Config_Common_H_
+#ifndef CONFIG_COMMON_H_
+#define CONFIG_COMMON_H_
-#include "Config.h"
+#include "Config_def.h"
#include <string>
+#include <list>
#include <stdarg.h>
//>> Forward declaration of xmlNodePtr.
*/
CONFIG_EXPORT bool isNode(xmlNodePtr theNode, const char* theNodeName, ...);
+/*
+ * Checks is the given node is attribute (widget) node.
+ */
+CONFIG_EXPORT bool isWidgetNode(xmlNodePtr theNode);
+
/*
* Every xml node has child. Even if there is no explicit
* child nodes libxml gives the "Text node" as child.
*/
CONFIG_EXPORT bool hasChild(xmlNodePtr theNode);
+/*
+ *
+ */
+CONFIG_EXPORT bool getValidatorInfo(xmlNodePtr theNode, std::string& outValidatorId,
+ std::list<std::string>& outValidatorParameters);
+
/*!
\brief Convert the given parameter to the platform-specific library name.
*/
CONFIG_EXPORT std::string library(const std::string& theLibName);
+/*
+ * Returns named property for a given node as std::string.
+ */
+CONFIG_EXPORT std::string getProperty(xmlNodePtr theNode, const char* thePropName);
+
+/*
+ * Checks if the given XML node has the given attribute,
+ * if yes - returns it's bool value, if no, or if the value can not
+ * be converted to bool - returns theDefault value.
+ * \param theAttributeName attribute to check
+ * \param theDefault default value on bad data
+ * \return the boolean result
+ */
+CONFIG_EXPORT bool getBooleanAttribute(xmlNodePtr theNode,
+ const char* theAttributeName,
+ bool theDefault);
+
#endif