Salome HOME
IPAL54585: Extrusion 3D algo fails with "OCC exception. Standard_NoSuchObject: NColle...
[modules/smesh.git] / src / SMESH_I / SMESH_PythonDump.hxx
index 587b2bd6b5396ce650061061f4a8e787627d6f7b..a6dfb766922a54a010a4ff9e38daeea61427eba9 100644 (file)
@@ -239,6 +239,27 @@ namespace SMESH
     TPythonDump&
     operator<<(const std::string& theArg);
 
+
+    template<class TArray, class TStream>
+      static TStream& DumpArray(const TArray& theArray, TStream & theStream)
+    {
+      if ( theArray.length() == 0 )
+      {
+        theStream << "[]";
+      }
+      else
+      {
+        theStream << "[ ";
+        for (CORBA::ULong i = 1; i <= theArray.length(); i++) {
+          theStream << theArray[i-1];
+          if ( i < theArray.length() )
+            theStream << ", ";
+        }
+        theStream << " ]";
+      }
+      return theStream;
+    }
+
     static const char* SMESHGenName() { return "smeshgen"; }
     static const char* MeshEditorName() { return "mesh_editor"; }
     static const char* NotPublishedObjectName();