From edba852a4383ba627a1916dbe4a628306445fba0 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 28 Oct 2011 12:51:17 +0000 Subject: [PATCH] + operator<<(const SMESH::string_array& theArg); --- src/SMESH_I/SMESH_DumpPython.cxx | 13 +++++++++++++ src/SMESH_I/SMESH_PythonDump.hxx | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 013824fc8..680d724eb 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -178,6 +178,19 @@ namespace SMESH return *this; } + TPythonDump& + TPythonDump::operator<<(const SMESH::string_array& theArray) + { + myStream << "[ "; + for (int i = 1; i <= theArray.length(); i++) { + myStream << "'" << theArray[i-1] << "'"; + if ( i < theArray.length() ) + myStream << ", "; + } + myStream << " ]"; + return *this; + } + TPythonDump& TPythonDump:: operator<<(SALOMEDS::SObject_ptr aSObject) diff --git a/src/SMESH_I/SMESH_PythonDump.hxx b/src/SMESH_I/SMESH_PythonDump.hxx index 8233241dc..f641e2983 100644 --- a/src/SMESH_I/SMESH_PythonDump.hxx +++ b/src/SMESH_I/SMESH_PythonDump.hxx @@ -38,7 +38,7 @@ class Resource_DataMapOfAsciiStringAsciiString; // =========================================================================================== /*! - * \brief Tool converting SMESH engine calls into commands defined in smesh.py + * \brief Tool converting SMESH engine calls into commands defined in smeshDC.py * * Implementation is in SMESH_2smeshpy.cxx */ @@ -119,6 +119,9 @@ namespace SMESH TPythonDump& operator<<(const SMESH::double_array& theArg); + TPythonDump& + operator<<(const SMESH::string_array& theArg); + TPythonDump& operator<<(SMESH::SMESH_Hypothesis_ptr theArg); -- 2.39.2