SHAPER 9.16.0
Config_Common.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef CONFIG_COMMON_H_
21#define CONFIG_COMMON_H_
22
23#include "Config_def.h"
24
25#include <string>
26#include <list>
27#include <stdarg.h>
28
29//>> Forward declaration of xmlNodePtr.
30typedef struct _xmlNode xmlNode;
31typedef xmlNode *xmlNodePtr;
32struct _xmlNode;
33//<<
34
35//>> Forward declaration of xmlDocPtr.
36typedef struct _xmlDoc xmlDoc;
37typedef xmlDoc *xmlDocPtr;
38struct _xmlDoc;
39//<<
40
44CONFIG_EXPORT bool isElementNode(xmlNodePtr theNode);
45
54CONFIG_EXPORT bool isNode(xmlNodePtr theNode, const char* theNodeName, ...);
55
56//#define isNode(p) _isNode(p, NULL)
57
64CONFIG_EXPORT bool isAttributeNode(xmlNodePtr theNode);
65
70CONFIG_EXPORT bool isWidgetNode(xmlNodePtr theNode);
71
72CONFIG_EXPORT bool isCaseNode(xmlNodePtr theNode);
73
81CONFIG_EXPORT bool hasChild(xmlNodePtr theNode);
82
83
87CONFIG_EXPORT bool hasParent(xmlNodePtr theNode);
88
92CONFIG_EXPORT bool hasParent(xmlNodePtr theNode, const char* theNodeName, ...);
93
97CONFIG_EXPORT xmlNodePtr hasParentRecursive(xmlNodePtr theNode, const char* theNodeName, ...);
98
99
103CONFIG_EXPORT bool getParametersInfo(xmlNodePtr theNode, std::string& outPropertyId,
104 std::list<std::string>& outValidatorParameters);
105
117CONFIG_EXPORT std::string library(const std::string& theLibName);
118
122CONFIG_EXPORT std::string getProperty(xmlNodePtr theNode, const char* thePropName);
123
127CONFIG_EXPORT std::string getContent(xmlNodePtr theNode);
128
132std::string getNormalizedProperty(xmlNodePtr theNode, const char* thePropName);
133
142CONFIG_EXPORT bool getBooleanAttribute(xmlNodePtr theNode,
143 const char* theAttributeName,
144 bool theDefault);
145
150CONFIG_EXPORT std::string normalize(const char* theString);
155CONFIG_EXPORT std::string normalize(const std::string& theString);
156
157#endif