From: asl Date: Sat, 21 Nov 2009 12:10:42 +0000 (+0000) Subject: dump notebook to python X-Git-Tag: PHASE_17_Part1_V1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=51b74e342d4707e17538f1a00865c706e952af1f;p=modules%2Fkernel.git dump notebook to python --- diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.cxx b/src/SALOMEDS/SALOMEDS_Driver_i.cxx index f41cfc7a6..0aec6fc2d 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.cxx @@ -225,7 +225,17 @@ SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::DumpPython(SALOMEDSImpl_Study* theStudy SALOMEDS::unlock(); CORBA::Boolean aValidScript, aPublished = isPublished; - Engines::TMPFile_var aStream = aComponent->DumpPython(st.in(), aPublished, aValidScript); + Engines::TMPFile_var aStream; + if( CORBA::is_nil( aComponent ) ) + { + SALOME_NotebookDriver* aNbDriver = dynamic_cast + ( st_servant->_default_POA()->reference_to_servant( _driver ) ); + if( aNbDriver ) + aStream = aNbDriver->DumpPython( st._retn(), aValidScript ); + } + else + aStream = aComponent->DumpPython(st.in(), aPublished, aValidScript); + SALOMEDSImpl_TMPFile* aTMPFile = new Engines_TMPFile_i(aStream._retn()); theStreamLength = aTMPFile->Size(); isValidScript = aValidScript; @@ -242,9 +252,6 @@ SALOMEDS_DriverFactory_i::SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB) { _orb = CORBA::ORB::_duplicate(theORB); _name_service = new SALOME_NamingService(_orb); - - SALOME_NotebookDriver* aDriver = new SALOME_NotebookDriver(); - myNotebookDriver = aDriver->_this(); } SALOMEDS_DriverFactory_i::~SALOMEDS_DriverFactory_i() diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.hxx b/src/SALOMEDS/SALOMEDS_Driver_i.hxx index 09f69c398..8ead21ccb 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.hxx @@ -133,9 +133,6 @@ public: virtual SALOMEDSImpl_Driver* GetDriverByType(const std::string& theComponentType); virtual SALOMEDSImpl_Driver* GetDriverByIOR(const std::string& theIOR); - -private: - SALOMEDS::Driver_var myNotebookDriver; }; #endif