X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_ModuleReader.h;h=2281eb5cd33910e46bd16949e25b8b8b7afe6f7e;hb=031fb5e7c551e695afa72a9de299f118a40d8d88;hp=3bd5d39f3f75c8289f5566e5fc44ec8bfc1e553f;hpb=ae347a8a8014a15245199a3bb603413628e3f7d4;p=modules%2Fshaper.git diff --git a/src/Config/Config_ModuleReader.h b/src/Config/Config_ModuleReader.h index 3bd5d39f3..2281eb5cd 100644 --- a/src/Config/Config_ModuleReader.h +++ b/src/Config/Config_ModuleReader.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + /* * Config_XMLModuleReader.h * @@ -15,11 +17,15 @@ #include #include - -class Config_ModuleReader: public Config_XMLReader +class Config_ModuleReader : public Config_XMLReader { + enum PluginType { + Binary = 0, + Intrenal = 1, + Python = 2 + }; -public: + public: CONFIG_EXPORT Config_ModuleReader(const char* theEventGenerated = 0); CONFIG_EXPORT virtual ~Config_ModuleReader(); @@ -27,19 +33,25 @@ public: CONFIG_EXPORT std::string getModuleName(); + CONFIG_EXPORT static void loadPlugin(const std::string thePluginName); /// loads the library with specific name, appends "lib*.dll" or "*.so" depending on the platform CONFIG_EXPORT static void loadLibrary(const std::string theLibName); + /// loads the python module with specified name + CONFIG_EXPORT static void loadScript(const std::string theFileName); -protected: + protected: void processNode(xmlNodePtr aNode); bool processChildren(xmlNodePtr aNode); std::list importPlugin(const std::string& thePluginLibrary, const std::string& thePluginFile); + std::string addPlugin(const std::string& aPluginLibrary, + const std::string& aPluginScript, + const std::string& aPluginConf); - -private: + private: std::map myFeaturesInFiles; + static std::map myPluginTypes; const char* myEventGenerated; };