2 * Config_ModuleReader.cpp
4 * Created on: Mar 20, 2014
8 #include <Config_ModuleReader.h>
9 #include <Config_FeatureReader.h>
11 #include <libxml\parser.h>
12 #include <libxml\tree.h>
18 Config_ModuleReader::Config_ModuleReader()
19 : Config_XMLReader("plugins.xml"),
24 Config_ModuleReader::~Config_ModuleReader()
29 * Get module name from plugins.xml
32 std::string Config_ModuleReader::getModuleName()
34 xmlNodePtr aRoot = findRoot();
35 return getProperty(aRoot, "module");
41 void Config_ModuleReader::processNode(xmlNodePtr theNode)
43 if(isNode(theNode, "plugin")) {
44 std::string aPluginName = getProperty(theNode, "configuration");
46 importPlugin(aPluginName);
47 m_pluginsList.push_back(aPluginName);
51 bool Config_ModuleReader::processChildren(xmlNodePtr theNode)
53 return isNode(theNode, "plugins");
56 void Config_ModuleReader::importPlugin(const std::string& thePluginName)
58 Config_FeatureReader aReader(thePluginName);
62 void Config_ModuleReader::setAutoImport(bool enabled)
64 m_isAutoImport = enabled;
67 const std::list<std::string>& Config_ModuleReader::pluginsList() const