From 8a6ef93bb1c308fd3dc0b4204ae0bc40e39ca805 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 19 Mar 2010 14:56:03 +0000 Subject: [PATCH] SMESH_IDSource can be not-published object + operator<<(SMESH::SMESH_IDSource_ptr theArg); --- src/SMESH_I/SMESH_DumpPython.cxx | 13 +++++++++++++ src/SMESH_I/SMESH_PythonDump.hxx | 3 +++ 2 files changed, 16 insertions(+) diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 5cc57fa79..44d42e0e5 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -221,6 +221,19 @@ namespace SMESH return *this; } + TPythonDump& + TPythonDump:: + operator<<(SMESH::SMESH_IDSource_ptr theArg) + { + SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); + SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); + SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg); + if(!aSObject->_is_nil()) + return *this << aSObject; + SMESH::long_array_var anElementsId = theArg->GetIDs(); + return *this << anElementsId; + } + TPythonDump& TPythonDump:: operator<<(SMESH::FilterLibrary_i* theArg) diff --git a/src/SMESH_I/SMESH_PythonDump.hxx b/src/SMESH_I/SMESH_PythonDump.hxx index bde5ae9f7..2a7e2cf02 100644 --- a/src/SMESH_I/SMESH_PythonDump.hxx +++ b/src/SMESH_I/SMESH_PythonDump.hxx @@ -120,6 +120,9 @@ namespace SMESH TPythonDump& operator<<(SMESH::SMESH_Hypothesis_ptr theArg); + TPythonDump& + operator<<(SMESH::SMESH_IDSource_ptr theArg); + TPythonDump& operator<<(SALOMEDS::SObject_ptr theArg); -- 2.39.2