]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0022362: EDF SMESH: Quadrangle (mapping) algorithm: enforced vertices
authoreap <eap@opencascade.com>
Tue, 17 Dec 2013 08:16:41 +0000 (08:16 +0000)
committereap <eap@opencascade.com>
Tue, 17 Dec 2013 08:16:41 +0000 (08:16 +0000)
+    operator<<(const SMESH::nodes_array& theArg);
+    operator<<(const GEOM::ListOfGO& theList);

src/SMESH_I/SMESH_DumpPython.cxx
src/SMESH_I/SMESH_PythonDump.hxx

index 43ffd029bf2d152242bcdc67fd1a3983183b5dfe..78d9bf959534dcecbbb1574f5456a515bc71a12a 100644 (file)
@@ -240,13 +240,20 @@ namespace SMESH
   template<class TArray>
   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 );
index 595e732fa952be39a50f2372bba61d872e0bdae4..1f9d5a623c597e851ddd2e790c786e02db2d8048 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
+#include CORBA_SERVER_HEADER(GEOM_Gen)
 #include CORBA_SERVER_HEADER(SALOMEDS)
 
 #include <TCollection_AsciiString.hxx>
@@ -162,6 +163,9 @@ namespace SMESH
     TPythonDump&
     operator<<(const SMESH::string_array& theArg);
 
+    TPythonDump&
+    operator<<(const SMESH::nodes_array& theArg);
+
     TPythonDump&
     operator<<(SMESH::SMESH_Hypothesis_ptr theArg);
 
@@ -216,6 +220,9 @@ namespace SMESH
     TPythonDump&
     operator<<(const SMESH::ListOfGroups * theList);
 
+    TPythonDump&
+    operator<<(const GEOM::ListOfGO& theList);
+
     TPythonDump&
     operator<<(const SMESH::ListOfIDSources& theList);