Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom.git into Dev_0.7.1
[modules/shaper.git] / src / Config / Config_WidgetReader.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 /*
4  * Config_WidgetReader.h
5  *
6  *  Created on: Apr 2, 2014
7  *      Author: sbh
8  */
9
10 #ifndef CONFIG_WIDGETREADER_H_
11 #define CONFIG_WIDGETREADER_H_
12
13 #include <Config_def.h>
14 #include <Config_XMLReader.h>
15
16 #include <map>
17 #include <string>
18
19 /*!
20  * \class Config_WidgetReader
21  * \brief Class that dumps xml definitions of widgets for
22  * further processing in the WidgetFactory
23  */
24 class Config_WidgetReader : public Config_XMLReader
25 {
26  public:
27   CONFIG_EXPORT Config_WidgetReader(const std::string& theXmlFile);
28   CONFIG_EXPORT virtual ~Config_WidgetReader();
29
30   CONFIG_EXPORT std::string featureWidgetCfg(const std::string& theFeatureName);
31   CONFIG_EXPORT std::string featureDescription(const std::string& theFeatureName);
32
33  protected:
34   void processNode(xmlNodePtr theNode);
35   bool processChildren(xmlNodePtr theNode);
36   std::string dumpNode(xmlNodePtr theNode);
37   void resolveSourceNodes(xmlNodePtr theNode);
38
39  private:
40   std::map<std::string, std::string> myWidgetCache;
41   std::map<std::string, std::string> myDescriptionCache;
42
43 };
44
45 #endif /* CONFIG_WIDGETREADER_H_ */