X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_DumpPython.cxx;fp=src%2FSMESH_I%2FSMESH_DumpPython.cxx;h=78d9bf959534dcecbbb1574f5456a515bc71a12a;hp=43ffd029bf2d152242bcdc67fd1a3983183b5dfe;hb=f7aba4830d53719b963fdb7fccc98b760fdef2d1;hpb=b117205bfdd48805999ef5e225e1e474da733fc5 diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 43ffd029b..78d9bf959 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -240,13 +240,20 @@ namespace SMESH template void DumpArray(const TArray& theArray, TPythonDump & theStream) { - theStream << "[ "; - for (int i = 1; i <= theArray.length(); i++) { - theStream << theArray[i-1]; - if ( i < theArray.length() ) - theStream << ", "; + if ( theArray.length() == 0 ) + { + theStream << "[]"; + } + else + { + theStream << "[ "; + for (int i = 1; i <= theArray.length(); i++) { + theStream << theArray[i-1]; + if ( i < theArray.length() ) + theStream << ", "; + } + theStream << " ]"; } - theStream << " ]"; } TPythonDump& @@ -263,6 +270,13 @@ namespace SMESH return *this; } + TPythonDump& + TPythonDump::operator<<(const SMESH::nodes_array& theArg) + { + DumpArray( theArg, *this ); + return *this; + } + TPythonDump& TPythonDump::operator<<(const SMESH::string_array& theArray) { @@ -517,6 +531,11 @@ namespace SMESH DumpArray( *theList, *this ); return *this; } + TPythonDump& TPythonDump::operator<<(const GEOM::ListOfGO& theList) + { + DumpArray( theList, *this ); + return *this; + } TPythonDump& TPythonDump::operator<<(const SMESH::ListOfIDSources& theList) { DumpArray( theList, *this );