Salome HOME
Update comments
[modules/gui.git] / src / SalomeApp / SalomeApp_DataOwner.cxx
1 #include "SalomeApp_DataOwner.h"
2
3 #include "SalomeApp_DataObject.h"
4
5 #ifdef WNT
6 #include <typeinfo.h>
7 #endif
8
9 #include <iostream.h>
10
11 /*!Constructor. Initialize by \a theEntry.*/
12 SalomeApp_DataOwner
13 ::SalomeApp_DataOwner( const QString& theEntry ): 
14   myEntry( theEntry )
15 {
16 }
17
18 /*!Constructor. Initialize by \a SALOME_InteractiveObject.*/
19 SalomeApp_DataOwner
20 ::SalomeApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ):
21   myEntry(!theIO.IsNull()? theIO->getEntry(): ""),
22   myIO(theIO)
23 {
24 }
25
26 /*!Destructor. Do nothing.*/
27 SalomeApp_DataOwner
28 ::~SalomeApp_DataOwner()
29 {
30 }
31
32 /*!Checks: Is current data owner equal \a obj.*/
33 bool
34 SalomeApp_DataOwner
35 ::isEqual( const SUIT_DataOwner& obj ) const
36 {
37   const SalomeApp_DataOwner* other = dynamic_cast<const SalomeApp_DataOwner*>( &obj );
38
39   return other && entry() == other->entry();
40 }
41
42 /*!Gets entry.*/
43 QString
44 SalomeApp_DataOwner
45 ::entry() const
46 {
47   return myEntry;
48 }
49
50 /*!Gets SALOME_InteractiveObject.*/
51 const Handle(SALOME_InteractiveObject)&
52 SalomeApp_DataOwner
53 ::IO() const
54 {
55   return myIO;
56 }