#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;
+}
#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;