Salome HOME
Merge branch 'origin/BR_PORTING_CENTOS_6_3'
[modules/shaper.git] / src / Config / Config_ModuleReader.h
1 /*
2  * Config_XMLModuleReader.h
3  *
4  *  Created on: Mar 20, 2014
5  *      Author: sbh
6  */
7
8 #ifndef CONFIG_MODULEREADER_H_
9 #define CONFIG_MODULEREADER_H_
10
11 #include <Config.h>
12 #include <Config_XMLReader.h>
13
14 #include <map>
15 #include <string>
16
17
18 class Config_ModuleReader: public Config_XMLReader
19 {
20
21 public:
22   CONFIG_EXPORT Config_ModuleReader(const char* theEventGenerated = 0);
23   CONFIG_EXPORT virtual ~Config_ModuleReader();
24
25   CONFIG_EXPORT void setAutoImport(bool enabled);
26   CONFIG_EXPORT const std::map<std::string, std::string>& plugins() const;
27
28   CONFIG_EXPORT std::string getModuleName();
29
30 protected:
31   void processNode(xmlNodePtr aNode);
32   bool processChildren(xmlNodePtr aNode);
33
34   void importPlugin(const std::string& thePluginName,
35                     const std::string& thePluginLibrary = "");
36
37 private:
38   bool myIsAutoImport;
39   std::map<std::string, std::string> myPluginsMap;
40   const char* myEventGenerated;
41
42 };
43
44 #endif /* CONFIG_XMLMODULEREADER_H_ */