X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM%2FGEOM_PythonDump.cxx;h=14c84dc8baca1ab1d98ada7a3b402d7d9a7760db;hb=8cee57a1875ffe457096f1f098d6378eb337d2e1;hp=d11673b2e21457017b18e4981c9f5bc323135a30;hpb=9499b99fe2dcb53e1ea364f97986f8f432b04600;p=modules%2Fgeom.git diff --git a/src/GEOM/GEOM_PythonDump.cxx b/src/GEOM/GEOM_PythonDump.cxx index d11673b2e..14c84dc8b 100644 --- a/src/GEOM/GEOM_PythonDump.cxx +++ b/src/GEOM/GEOM_PythonDump.cxx @@ -43,19 +43,12 @@ namespace GEOM TCollection_AsciiString aDescr; if ( myAppend ) aDescr = myFunction->GetDescription() + "\n\t"; - aDescr += (char *)myStream.str().c_str(); + std::string aString = myStream.str(); + aDescr += (char *)aString.c_str(); myFunction->SetDescription( aDescr ); } } -// TPythonDump::operator TCollection_AsciiString () const -// { -// if (myCounter == 1) { -// return TCollection_AsciiString ((char *)myStream.str().c_str()); -// } -// return TCollection_AsciiString (); -// } - TPythonDump& TPythonDump::operator<< (long int theArg) { myStream<GetEntry(), anEntry); - myStream << anEntry.ToCString(); + if (theObject.IsNull()) { + myStream << "None"; + } else { + TCollection_AsciiString anEntry; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + myStream << anEntry.ToCString(); + } return *this; } @@ -120,7 +117,7 @@ namespace GEOM TDF_Tool::TagList(theObj1->GetEntry(), aTags1); TDF_Tool::TagList(theObj2->GetEntry(), aTags2); TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2); - for (; aListIter1.More(); aListIter1.Next()) { + for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) { if (!aListIter2.More()) return theObj1; // anObj1 is stored under anObj2