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