]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Introduce a SALOME_IntaractiveObject attribute
authorapo <apo@opencascade.com>
Tue, 31 May 2005 09:51:43 +0000 (09:51 +0000)
committerapo <apo@opencascade.com>
Tue, 31 May 2005 09:51:43 +0000 (09:51 +0000)
src/SalomeApp/SalomeApp_DataOwner.cxx
src/SalomeApp/SalomeApp_DataOwner.h

index a3d3ad9711f04e661d2ad181fedc18de45d28255..a3b6963782cee5066ec421508058cce1921114f5 100644 (file)
@@ -8,24 +8,43 @@
 
 #include <iostream.h>
 
-SalomeApp_DataOwner::SalomeApp_DataOwner( const QString& entry )
-: myEntry( entry )
+SalomeApp_DataOwner
+::SalomeApp_DataOwner( const QString& theEntry ): 
+  myEntry( theEntry )
 {
-  //cout << "---> created DataOwner with entry = " << entry << endl;
 }
 
-SalomeApp_DataOwner::~SalomeApp_DataOwner()
+SalomeApp_DataOwner
+::SalomeApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ):
+  myEntry(!theIO.IsNull()? theIO->getEntry(): ""),
+  myIO(theIO)
 {
 }
 
-bool SalomeApp_DataOwner::isEqual( const SUIT_DataOwner& obj ) const
+SalomeApp_DataOwner
+::~SalomeApp_DataOwner()
+{
+}
+
+bool
+SalomeApp_DataOwner
+::isEqual( const SUIT_DataOwner& obj ) const
 {
   const SalomeApp_DataOwner* other = dynamic_cast<const SalomeApp_DataOwner*>( &obj );
 
   return other && entry() == other->entry();
 }
 
-QString SalomeApp_DataOwner::entry() const
+QString
+SalomeApp_DataOwner
+::entry() const
 {
   return myEntry;
 }
+
+const Handle(SALOME_InteractiveObject)&
+SalomeApp_DataOwner
+::IO() const
+{
+  return myIO;
+}
index 128463cbb0071b19a97f08563a649330e82947cc..5f81f69799aab559b489750bd6a54bc688cc2992 100644 (file)
@@ -2,19 +2,23 @@
 #ifndef SALOMEAPP_DATAOWNER_H
 #define SALOMEAPP_DATAOWNER_H
 
-#include <SUIT_DataOwner.h>
+#include "SUIT_DataOwner.h"
+#include "SALOME_InteractiveObject.hxx"
 
 class SalomeApp_DataOwner : public SUIT_DataOwner
 {
 public:
+    SalomeApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO );
     SalomeApp_DataOwner( const QString& );
     virtual ~SalomeApp_DataOwner();
 
     virtual bool isEqual( const SUIT_DataOwner& ) const;
-    QString      entry() const;
+    const Handle(SALOME_InteractiveObject)& IO() const;
+    QString entry() const;
 
 private:
     QString  myEntry;
+    Handle(SALOME_InteractiveObject) myIO;
 };
 
 typedef SMART(SalomeApp_DataOwner) SalomeApp_DataOwnerPtr;