]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
SMESH_IDSource can be not-published object
authoreap <eap@opencascade.com>
Fri, 19 Mar 2010 14:56:03 +0000 (14:56 +0000)
committereap <eap@opencascade.com>
Fri, 19 Mar 2010 14:56:03 +0000 (14:56 +0000)
+    operator<<(SMESH::SMESH_IDSource_ptr theArg);

src/SMESH_I/SMESH_DumpPython.cxx
src/SMESH_I/SMESH_PythonDump.hxx

index 5cc57fa79f640ea87111356d4213da733e10d62e..44d42e0e560e93f999617735021807edfa671a0f 100644 (file)
@@ -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)
index bde5ae9f7880f0b14357b1970deec21aca1d113a..2a7e2cf029168020f6c87676ca1990c0cec7ae28 100644 (file)
@@ -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);