INCLUDE(Common)
INCLUDE(XMLProcessing)
+FIND_PACKAGE(SWIG REQUIRED)
+INCLUDE(${SWIG_USE_FILE})
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Events
${PYTHON_INCLUDE_DIR})
Config_Translator.cpp
)
+SET(CMAKE_SWIG_FLAGS -threads -Wall)
+SET_SOURCE_FILES_PROPERTIES(ConfigAPI.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(ConfigAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET(SWIG_SCRIPTS
+ ${CMAKE_CURRENT_BINARY_DIR}/ConfigAPI.py
+)
+SET(SWIG_LINK_LIBRARIES
+ Config
+ ${PYTHON_LIBRARIES}
+)
+SWIG_ADD_MODULE(ConfigAPI python ConfigAPI.i ${PROJECT_HEADERS})
+SWIG_LINK_LIBRARIES(ConfigAPI ${SWIG_LINK_LIBRARIES})
+IF(WIN32)
+ SET_TARGET_PROPERTIES(_ConfigAPI PROPERTIES DEBUG_OUTPUT_NAME _ConfigAPI_d)
+ENDIF(WIN32)
+
+
SET(XML_RESOURCES
${CMAKE_CURRENT_BINARY_DIR}/plugins.xml
dataModel.xml
INSTALL(TARGETS Config DESTINATION ${SHAPER_INSTALL_BIN})
INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+
+INSTALL(TARGETS _ConfigAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
--- /dev/null
+/* Config.i */
+
+%module ConfigAPI
+%{
+ #include "Config_swig.h"
+%}
+
+// to avoid error on this
+#define CONFIG_EXPORT
+
+%include "typemaps.i"
+%include "std_string.i"
+
+%include "Config_ModuleReader.h"
--- /dev/null
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File: Config_swig.h
+// Created: Jan 16, 2017
+// Author: Vitaly SMETANNIKOV
+
+#ifndef SRC_CONFIG_SWIG_H_
+#define SRC_CONFIG_SWIG_H_
+
+ #include "Config_ModuleReader.h"
+
+#endif /* SRC_CONFIG_SWIG_H_ */
<plugin library="CollectionPlugin" configuration="plugin-Collection.xml"/>
<plugin library="ExchangePlugin" configuration="plugin-Exchange.xml"/>
<plugin script="addons_Features" configuration="addons_Features.xml"/>
- <plugin script="ConnectorPlugin" configuration="plugin-Connector.xml" dependency="Geometry"/>
+ <plugin script="ConnectorPlugin" configuration="plugin-Connector.xml" dependency="GEOM"/>
<plugin library="ParametersPlugin" configuration="plugin-Parameters.xml"/>
@DEFAULT_SOLVER@
<!--
if (aFirstCall) {
// to be sure that plugins are loaded,
// even before the first "createFeature" call (in unit tests)
+
LoadPluginsInfo();
// creation of the root document is always outside of the transaction, so, avoid checking it
setCheckTransactions(false);
{
if (myPluginsInfoLoaded) // nothing to do
return;
-
+ Config_ModuleReader::loadScript("salome.shaper.initConfig");
// Read plugins information from XML files
Config_ModuleReader aModuleReader(Config_FeatureMessage::MODEL_EVENT());
aModuleReader.readAll();
void SHAPERGUI::initialize(CAM_Application* theApp)
{
LightApp_Module::initialize(theApp);
- inspectSalomeModules();
myWorkshop->startApplication();
LightApp_Application* anApp = dynamic_cast<LightApp_Application*>(theApp);
application()->putInfo(theInfo, theMSecs);
}
-void SHAPERGUI::inspectSalomeModules()
-{
- QStringList aModuleNames;
- getApp()->modules(aModuleNames, false);
- foreach(QString eachModule, aModuleNames) {
- Config_ModuleReader::addDependencyModule(eachModule.toStdString());
- }
-}
-
bool SHAPERGUI::abortAllOperations()
{
return workshop()->operationMgr()->abortAllOperations();
/// \brief Set flag about opened document state
void setIsOpened(bool theOpened) { myIsOpened = theOpened; }
- /// Register current modules of SALOME
- void inspectSalomeModules();
-
public slots:
/// \brief The method is redefined to connect to the study viewer before the data
/// model is filled by opened file. This file open will flush redisplay signals for,