1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
4 * Config_WidgetReader.h
6 * Created on: Apr 2, 2014
10 #ifndef CONFIG_WIDGETREADER_H_
11 #define CONFIG_WIDGETREADER_H_
13 #include <Config_def.h>
14 #include <Config_XMLReader.h>
20 * \class Config_WidgetReader
22 * \brief Class that dumps xml definitions of widgets for
23 * further processing in the WidgetFactory
25 class Config_WidgetReader : public Config_XMLReader
28 CONFIG_EXPORT Config_WidgetReader(const std::string& theXmlFile);
29 CONFIG_EXPORT virtual ~Config_WidgetReader();
31 /// Extract feature's widget configuration from local cache, stored on node processing
32 CONFIG_EXPORT std::string featureWidgetCfg(const std::string& theFeatureName);
33 /// Extract feature's description from local cache, stored on node processing
34 CONFIG_EXPORT std::string featureDescription(const std::string& theFeatureName);
37 /// Overloaded method. Defines how to process each node
38 void processNode(xmlNodePtr theNode);
39 /// Overloaded method. Defines if the given node should be parsed recursively
40 bool processChildren(xmlNodePtr theNode);
41 /// Extracts xml definition of the given node and it's children
42 std::string dumpNode(xmlNodePtr theNode);
43 /// Replace all "source" nodes with their content (used before dumping nodes)
44 void resolveSourceNodes(xmlNodePtr theNode);
47 std::map<std::string, std::string> myWidgetCache;
48 std::map<std::string, std::string> myDescriptionCache;
52 #endif /* CONFIG_WIDGETREADER_H_ */