]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Added method GetSObject
authorsrn <srn@opencascade.com>
Wed, 30 Mar 2005 09:48:41 +0000 (09:48 +0000)
committersrn <srn@opencascade.com>
Wed, 30 Mar 2005 09:48:41 +0000 (09:48 +0000)
src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.cxx
src/SALOMEDSImpl/SALOMEDSImpl_GenericAttribute.hxx

index 881b9fe245bce097ec2e647016dd81585c8f47cc..89df8e7a2c43ce9fe053bc6696c7a76e91b4d6cb 100644 (file)
@@ -41,3 +41,10 @@ void SALOMEDSImpl_GenericAttribute::CheckLocked()
     throw LockProtection("LockProtection");
   }                                         
 }
+
+Handle(SALOMEDSImpl_SObject) SALOMEDSImpl_GenericAttribute::GetSObject()
+{
+  TDF_Label aLabel = Label();
+  if(aLabel.IsNull()) return NULL;
+  return SALOMEDSImpl_Study::GetStudy(aLabel)->GetSObject(aLabel);
+}
index f2df392293373f5b86e7cca83ec55939dbfb7630..31e710f7de3600cc8dc1a787dd65fe387538860f 100644 (file)
@@ -11,6 +11,8 @@
 #include <TDF_Attribute.hxx>
 #include <Standard_GUID.hxx>     
 
+#include "SALOMEDSImpl_SObject.hxx"
+
 class Handle(TDF_Attribute);
 class Handle(TDF_RelocationTable);
 
@@ -34,6 +36,7 @@ Standard_EXPORT virtual void Load(const TCollection_AsciiString&) {}
 Standard_EXPORT virtual TCollection_AsciiString Type();
 Standard_EXPORT virtual void CheckLocked();
 Standard_EXPORT TCollection_AsciiString GetClassType() { return _type; }
+Standard_EXPORT Handle(SALOMEDSImpl_SObject) GetSObject();
 
 Standard_EXPORT static char* Impl_GetType(const Handle(TDF_Attribute)& theAttr); 
 Standard_EXPORT static void Impl_CheckLocked(const Handle(TDF_Attribute)& theAttr);