Salome HOME
updated copyright message
[modules/gui.git] / src / LightApp / LightApp_DataOwner.cxx
1 // Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 #include "LightApp_DataOwner.h"
24
25 /*!Constructor. Initialize by \a theEntry.*/
26 LightApp_DataOwner::LightApp_DataOwner( const QString& theEntry )
27 : myEntry( theEntry )
28 {
29 }
30
31 #ifndef DISABLE_SALOMEOBJECT
32 /*!Constructor. Initialize by \a SALOME_InteractiveObject.*/
33 LightApp_DataOwner::LightApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ):
34   myEntry(!theIO.IsNull()? theIO->getEntry(): ""),
35   myIO(theIO)
36 {
37 }
38 #endif
39
40 /*!Destructor. Do nothing.*/
41 LightApp_DataOwner::~LightApp_DataOwner()
42 {
43 }
44
45 /*!Gets key string, used for data owners comparison.*/
46 QString LightApp_DataOwner::keyString() const
47 {
48   return myEntry;
49 }
50
51 /*!Gets entry.*/
52 QString LightApp_DataOwner::entry() const
53 {
54   return myEntry;
55 }
56
57 #ifndef DISABLE_SALOMEOBJECT
58 /*!Gets SALOME_InteractiveObject.*/
59 const Handle(SALOME_InteractiveObject)& LightApp_DataOwner::IO() const
60 {
61   return myIO;
62 }
63 #endif