From ddd93b69c30b65829f6ffa5666e2f36d2e085cfc Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 3 Dec 2009 12:45:41 +0000 Subject: [PATCH] Uncommented part of DumpPython() method. --- src/GEOM_I/GEOM_DumpPython.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/GEOM_I/GEOM_DumpPython.cc b/src/GEOM_I/GEOM_DumpPython.cc index a134a060c..e1969c68f 100644 --- a/src/GEOM_I/GEOM_DumpPython.cc +++ b/src/GEOM_I/GEOM_DumpPython.cc @@ -44,7 +44,6 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy, CORBA::Boolean isPublished, CORBA::Boolean& isValidScript) { -/*ASL: temporary commented for Notebook SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy); if(CORBA::is_nil(aStudy)) return new Engines::TMPFile(0); @@ -57,6 +56,7 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy, TVariablesList aVariableMap; + /*ASL: temporary commented for Notebook SALOMEDS::ChildIterator_var Itr = aStudy->NewChildIterator(aSO); for(Itr->InitEx(true); Itr->More(); Itr->Next()) { SALOMEDS::SObject_var aValue = Itr->Value(); @@ -91,6 +91,7 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy, } } } + */ TCollection_AsciiString aScript = "# -*- coding: iso-8859-1 -*-\n" @@ -110,10 +111,10 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy, } aScript += "\n\tpass\n"; -*/ - int aLen = 0;/*ASL: aScript.Length(); */ + + int aLen = aScript.Length(); unsigned char* aBuffer = new unsigned char[aLen+1]; - //ASL : strcpy((char*)aBuffer, aScript.ToCString()); + strcpy((char*)aBuffer, aScript.ToCString()); CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1); -- 2.39.2