#include "SALOMEDSClient_Study.hxx"
+#ifdef WITH_MEDGEN
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(MED_Gen)
+#endif // WITH_MEDGEN
class QWidget;
class QDialog;
//----------------------------------------------------------------------------
VISU_Gen_i* GetVisuGen(const CAM_Module* theModule);
+#ifdef WITH_MEDGEN
SALOME_MED::MED_Gen_var GetMEDEngine();
+#endif // WITH_MEDGEN
// Selection
LightApp_SelectionMgr* GetSelectionMgr(const SalomeApp_Module* theModule);
#include <omnithread.h>
#include CORBA_SERVER_HEADER(SALOME_Session)
#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
+#ifdef WITH_MEDGEN
#include CORBA_SERVER_HEADER(MED_Gen)
+#endif // WITH_MEDGEN
// QT Includes
#include <QDir>
ProcessVoidEvent(new TEvent(aStudyName));
+#ifdef WITH_MEDGEN
// Load MED component if necessary
- if(!myStudyDocument->FindComponent("MED")->_is_nil())
- {
- SALOME_LifeCycleCORBA aLCC(SalomeApp_Application::namingService());
- Engines::EngineComponent_var aComponent = aLCC.FindOrLoad_Component("FactoryServer","MED");
- SALOME_MED::MED_Gen_var aMedEngine = SALOME_MED::MED_Gen::_narrow(aComponent);
-
- if(!CORBA::is_nil(aMedEngine))
- {
- SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
- try {
- aStudyBuilder->LoadWith( myStudyDocument->FindComponent( "MED" ), aMedEngine );
- }
- catch( const SALOME::SALOME_Exception& ) {
- // Oops, something went wrong while loading
- // See also SalomeApp_Study::openDataModel()
- }
- }
- }
+ if (!myStudyDocument->FindComponent("MED")->_is_nil())
+ {
+ SALOME_LifeCycleCORBA aLCC(SalomeApp_Application::namingService());
+ Engines::EngineComponent_var aComponent = aLCC.FindOrLoad_Component("FactoryServer","MED");
+ SALOME_MED::MED_Gen_var aMedEngine = SALOME_MED::MED_Gen::_narrow(aComponent);
+
+ if(!CORBA::is_nil(aMedEngine))
+ {
+ SALOMEDS::StudyBuilder_var aStudyBuilder = myStudyDocument->NewBuilder();
+ try {
+ aStudyBuilder->LoadWith( myStudyDocument->FindComponent( "MED" ), aMedEngine );
+ }
+ catch( const SALOME::SALOME_Exception& ) {
+ // Oops, something went wrong while loading
+ // See also SalomeApp_Study::openDataModel()
+ }
+ }
+ }
+#endif // WITH_MEDGEN
} else {
INFOS("CORBA::is_nil(theStudy)");
}