X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_PythonDump.hxx;fp=src%2FSMESH_I%2FSMESH_PythonDump.hxx;h=a6dfb766922a54a010a4ff9e38daeea61427eba9;hb=0146a69d8258d1264247a2970627f89e514fc6f6;hp=587b2bd6b5396ce650061061f4a8e787627d6f7b;hpb=fb2fc0723635036634f572b9d1dad6af5d253c61;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_PythonDump.hxx b/src/SMESH_I/SMESH_PythonDump.hxx index 587b2bd6b..a6dfb7669 100644 --- a/src/SMESH_I/SMESH_PythonDump.hxx +++ b/src/SMESH_I/SMESH_PythonDump.hxx @@ -239,6 +239,27 @@ namespace SMESH TPythonDump& operator<<(const std::string& theArg); + + template + 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();