return *this;
}
+ TPythonDump&
+ TPythonDump::
+ operator<<(SMESH::SMESH_Hypothesis_ptr theArg)
+ {
+ SALOMEDS::Study_var aStudy = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
+ SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg);
+ if(aSObject->_is_nil() && !CORBA::is_nil(theArg))
+ myStream << "hyp_" << theArg->GetId();
+ else
+ *this << CORBA::Object_ptr( theArg );
+ 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() || CORBA::is_nil( theArg ))
+ return *this << aSObject;
+ SMESH::long_array_var anElementsId = theArg->GetIDs();
+ return *this << anElementsId;
+ }
+
TPythonDump&
TPythonDump::
operator<<(SMESH::FilterLibrary_i* theArg)
TCollection_AsciiString aSavedTrace (oldValue);
// Add trace of API methods calls and replace study entries by names
- TCollection_AsciiString aScript =
- "# -*- coding: iso-8859-1 -*-\n"
- "### This file is generated by SALOME automatically by dump python functionality of SMESH component\n\n";
+ TCollection_AsciiString aScript;
aScript += DumpPython_impl(aStudy, aMap, aMapNames,
isPublished, isValidScript, aSavedTrace);