ListOfGO PublishNamedShapesInStudy(in SALOMEDS::Study theStudy,
//in SObject theSObject,
in Object theObject);
+
+ /*!
+ * Returns a pointer to SALOME Notebook interface.
+ * \param theStudyID is a SALOMEDS Study ID
+ */
+ SALOME::Notebook GetNotebook(in long theStudyID);
};
};
return ret;
}
+//=================================================================================
+// function : GetNotebook()
+// purpose : Returns a pointer to SALOME Notebook object by an id of the study
+//=================================================================================
+SALOME::Notebook_ptr GEOM_Gen_i::GetNotebook( CORBA::Long theStudyID )
+{
+ CORBA::Object_var aSMObject = name_service->Resolve( "/myStudyManager" );
+ SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow( aSMObject );
+ SALOMEDS::Study_var aStudy = aStudyManager->GetStudyByID( theStudyID );
+ SALOME::Notebook_var aNotebook = aStudy->GetNotebook();
+ return aNotebook._retn();
+}
+
//=====================================================================================
// EXPORTED METHODS
//=====================================================================================
virtual bool hasObjectInfo();
virtual char* getObjectInfo(CORBA::Long studyId, const char* entry);
+ SALOME::Notebook_ptr GetNotebook(CORBA::Long theStudyID);
+
//-----------------------------------------------------------------------//
// Internal methods //
//-----------------------------------------------------------------------//
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return aGEOMObject._retn();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return GEOM::GEOM_Object::_nil();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
if (!GetOperations()->IsDone() || anObject.IsNull())
return GEOM::GEOM_Object::_nil();
- return GetObject(anObject);
+ return GetObject(anObject, false);
}
//=============================================================================
* GetObject
*/
//=============================================================================
-GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObject)
+GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObject,
+ bool theIsDependent)
{
GEOM::GEOM_Object_var GO;
if (theObject.IsNull()) return GO._retn();
TCollection_AsciiString anEntry;
TDF_Tool::Entry(theObject->GetEntry(), anEntry);
GO = _engine->GetObject(theObject->GetDocID(), anEntry.ToCString());
- return GO._retn();
+ GEOM::GEOM_Object_ptr aResult = GO._retn();
+ if (theIsDependent && !CORBA::is_nil(aResult)) {
+ SALOME::Notebook_ptr aNotebook = _engine->GetNotebook(aResult->GetStudyID());
+ if (!CORBA::is_nil(aNotebook))
+ aResult->StoreDependencies(aNotebook);
+ }
+ return aResult;
}
//=============================================================================
virtual CORBA::Long GetStudyID();
- virtual GEOM::GEOM_Object_ptr GetObject(Handle(GEOM_Object) theObject);
+ virtual GEOM::GEOM_Object_ptr GetObject(Handle(GEOM_Object) theObject, bool theIsDependent = true);
virtual Handle(GEOM_Object) GetObjectImpl(GEOM::GEOM_Object_ptr theObject);
virtual void StartOperation();