Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Issue #328: bug with hanging of the app on absent file sourcing fixed
[modules/shaper.git]
/
src
/
Config
/
Config_ModuleReader.h
diff --git
a/src/Config/Config_ModuleReader.h
b/src/Config/Config_ModuleReader.h
index 3bd5d39f3f75c8289f5566e5fc44ec8bfc1e553f..c32eb37d96f566b537068a45f614dbef66e513e9 100644
(file)
--- 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
*
/*
* Config_XMLModuleReader.h
*
@@
-15,11
+17,20
@@
#include <list>
#include <string>
#include <list>
#include <string>
-
-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();
CONFIG_EXPORT Config_ModuleReader(const char* theEventGenerated = 0);
CONFIG_EXPORT virtual ~Config_ModuleReader();
@@
-27,20
+38,28
@@
public:
CONFIG_EXPORT std::string getModuleName();
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 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);
void processNode(xmlNodePtr aNode);
bool processChildren(xmlNodePtr aNode);
+ bool isAvaliableOnThisPlatform(const std::string& thePluginPlatform);
std::list<std::string> importPlugin(const std::string& thePluginLibrary,
const std::string& thePluginFile);
std::list<std::string> 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<std::string, std::string> myFeaturesInFiles;
std::map<std::string, std::string> myFeaturesInFiles;
+ static std::map<std::string, PluginType> myPluginTypes;
const char* myEventGenerated;
const char* myEventGenerated;
+ bool myHaveSalome;
};
};