0022362: EDF SMESH: Quadrangle (mapping) algorithm: enforced vertices

+    operator<<(const SMESH::nodes_array& theArg);
+    operator<<(const GEOM::ListOfGO& theList);
This commit is contained in:
eap 2013-12-17 08:16:41 +00:00
parent 5ee62cf3f5
commit a623b301fb
2 changed files with 32 additions and 6 deletions

View File

@ -240,13 +240,20 @@ namespace SMESH
template<class TArray> template<class TArray>
void DumpArray(const TArray& theArray, TPythonDump & theStream) void DumpArray(const TArray& theArray, TPythonDump & theStream)
{ {
theStream << "[ "; if ( theArray.length() == 0 )
for (int i = 1; i <= theArray.length(); i++) { {
theStream << theArray[i-1]; theStream << "[]";
if ( i < theArray.length() ) }
theStream << ", "; else
{
theStream << "[ ";
for (int i = 1; i <= theArray.length(); i++) {
theStream << theArray[i-1];
if ( i < theArray.length() )
theStream << ", ";
}
theStream << " ]";
} }
theStream << " ]";
} }
TPythonDump& TPythonDump&
@ -263,6 +270,13 @@ namespace SMESH
return *this; return *this;
} }
TPythonDump&
TPythonDump::operator<<(const SMESH::nodes_array& theArg)
{
DumpArray( theArg, *this );
return *this;
}
TPythonDump& TPythonDump&
TPythonDump::operator<<(const SMESH::string_array& theArray) TPythonDump::operator<<(const SMESH::string_array& theArray)
{ {
@ -517,6 +531,11 @@ namespace SMESH
DumpArray( *theList, *this ); DumpArray( *theList, *this );
return *this; return *this;
} }
TPythonDump& TPythonDump::operator<<(const GEOM::ListOfGO& theList)
{
DumpArray( theList, *this );
return *this;
}
TPythonDump& TPythonDump::operator<<(const SMESH::ListOfIDSources& theList) TPythonDump& TPythonDump::operator<<(const SMESH::ListOfIDSources& theList)
{ {
DumpArray( theList, *this ); DumpArray( theList, *this );

View File

@ -27,6 +27,7 @@
#include <SALOMEconfig.h> #include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SMESH_Mesh) #include CORBA_SERVER_HEADER(SMESH_Mesh)
#include CORBA_SERVER_HEADER(GEOM_Gen)
#include CORBA_SERVER_HEADER(SALOMEDS) #include CORBA_SERVER_HEADER(SALOMEDS)
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
@ -162,6 +163,9 @@ namespace SMESH
TPythonDump& TPythonDump&
operator<<(const SMESH::string_array& theArg); operator<<(const SMESH::string_array& theArg);
TPythonDump&
operator<<(const SMESH::nodes_array& theArg);
TPythonDump& TPythonDump&
operator<<(SMESH::SMESH_Hypothesis_ptr theArg); operator<<(SMESH::SMESH_Hypothesis_ptr theArg);
@ -216,6 +220,9 @@ namespace SMESH
TPythonDump& TPythonDump&
operator<<(const SMESH::ListOfGroups * theList); operator<<(const SMESH::ListOfGroups * theList);
TPythonDump&
operator<<(const GEOM::ListOfGO& theList);
TPythonDump& TPythonDump&
operator<<(const SMESH::ListOfIDSources& theList); operator<<(const SMESH::ListOfIDSources& theList);