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