X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_ModuleReader.h;h=c32eb37d96f566b537068a45f614dbef66e513e9;hb=c6a92152ecb67e86489d0a17c8df5fa2e5bcf84e;hp=4f9b61a77a86dc40056b40a8f82d3964c5f1ed63;hpb=6654a921211670c15a79a997ca666a174fe8a6f6;p=modules%2Fshaper.git diff --git a/src/Config/Config_ModuleReader.h b/src/Config/Config_ModuleReader.h index 4f9b61a77..c32eb37d9 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 * @@ -8,18 +10,27 @@ #ifndef CONFIG_MODULEREADER_H_ #define CONFIG_MODULEREADER_H_ -#include +#include #include #include #include #include - -class Config_ModuleReader: public Config_XMLReader +class Config_ModuleReader : public Config_XMLReader { + enum PluginType { + Binary = 0, + Intrenal = 1, + Python = 2 + }; + enum PluginPlatform { + All = 0, + OpenParts = 1, + Salome = 2 + }; -public: + public: CONFIG_EXPORT Config_ModuleReader(const char* theEventGenerated = 0); CONFIG_EXPORT virtual ~Config_ModuleReader(); @@ -27,16 +38,28 @@ public: CONFIG_EXPORT std::string getModuleName(); -protected: + 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: void processNode(xmlNodePtr aNode); bool processChildren(xmlNodePtr aNode); - std::list importPlugin(const std::string& thePluginFile, - const std::string& thePluginLibrary); + bool isAvaliableOnThisPlatform(const std::string& thePluginPlatform); + 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; + bool myHaveSalome; };