X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_DumpPython.cxx;h=c50fa07edb871fdfe5210bda4120eedf89a99bdf;hb=290a70345b8930a17fdcc5d9c3c6c65d3fb72f68;hp=629a7d8f1cc13d883d4c1f2318109074939006e4;hpb=9e0ab432ccaa69bbbc5e846ef2b68c32782c91ad;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 629a7d8f1..c50fa07ed 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -19,6 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SMESH_Gen_i_DumpPython.cxx // Created : Thu Mar 24 17:17:59 2005 // Author : Julia DOROVSKIKH @@ -353,21 +354,23 @@ namespace SMESH return *this; } - TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups * theList){ - if(theList && theList->length() > 0 ) { - SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy(); - myStream << "["; - int aListLen = theList->length(); - for(int i = 0 ; i < aListLen; i++){ - SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,(*theList)[i]); - if(!aSObject->_is_nil()) { - myStream << aSObject->GetID(); - i < (aListLen - 1) ? myStream<<", " : myStream<<"]"; - } - + TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups& theList) + { + SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); + SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy(); + myStream << "["; + int aListLen = theList.length(); + for(int i = 0 ; i < aListLen; i++) + { + SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theList[i]); + if(!aSObject->_is_nil()) { + CORBA::String_var entry = aSObject->GetID(); + myStream << entry; + if ( i < (aListLen - 1) ) + myStream<<", "; } } + myStream<<"]"; return *this; } @@ -376,10 +379,10 @@ namespace SMESH //================================================================================ /*! - * \brief Return marker of long string literal beginning - * \param type - a name of functionality producing the string literal - * \retval TCollection_AsciiString - the marker string to be written into - * a raw python script + * \brief Return marker of long string literal beginning + * \param type - a name of functionality producing the string literal + * \retval TCollection_AsciiString - the marker string to be written into + * a raw python script */ //================================================================================