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&
return *this;
}
+ TPythonDump&
+ TPythonDump::operator<<(const SMESH::nodes_array& theArg)
+ {
+ DumpArray( theArg, *this );
+ return *this;
+ }
+
TPythonDump&
TPythonDump::operator<<(const SMESH::string_array& theArray)
{
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 );
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SMESH_Mesh)
+#include CORBA_SERVER_HEADER(GEOM_Gen)
#include CORBA_SERVER_HEADER(SALOMEDS)
#include <TCollection_AsciiString.hxx>
TPythonDump&
operator<<(const SMESH::string_array& theArg);
+ TPythonDump&
+ operator<<(const SMESH::nodes_array& theArg);
+
TPythonDump&
operator<<(SMESH::SMESH_Hypothesis_ptr theArg);
TPythonDump&
operator<<(const SMESH::ListOfGroups * theList);
+ TPythonDump&
+ operator<<(const GEOM::ListOfGO& theList);
+
TPythonDump&
operator<<(const SMESH::ListOfIDSources& theList);