X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FLightApp%2FLightApp_DataOwner.cxx;h=30fa2a26b7c6f481c304525b6ce7fb9dcd1244b3;hb=50bdc819dd64504173ee708bc4bbcbbf4d45f300;hp=6d01eb5fef8b85098756172a58d050748d136130;hpb=2252efe032e7c4f7923984fe1d3421ebeeb20ffc;p=modules%2Fgui.git diff --git a/src/LightApp/LightApp_DataOwner.cxx b/src/LightApp/LightApp_DataOwner.cxx index 6d01eb5fe..30fa2a26b 100644 --- a/src/LightApp/LightApp_DataOwner.cxx +++ b/src/LightApp/LightApp_DataOwner.cxx @@ -1,66 +1,63 @@ -#include "LightApp_DataOwner.h" - -#include "LightApp_DataObject.h" - -#ifndef WNT -#include -#define _typeinfo std::type_info -#else -#include -#define _typeinfo type_info -#endif +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// -#include +#include "LightApp_DataOwner.h" /*!Constructor. Initialize by \a theEntry.*/ -LightApp_DataOwner -::LightApp_DataOwner( const QString& theEntry ): - myEntry( theEntry ) +LightApp_DataOwner::LightApp_DataOwner( const QString& theEntry ) +: myEntry( theEntry ) { } +#ifndef DISABLE_SALOMEOBJECT /*!Constructor. Initialize by \a SALOME_InteractiveObject.*/ -LightApp_DataOwner -::LightApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ): +LightApp_DataOwner::LightApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ): myEntry(!theIO.IsNull()? theIO->getEntry(): ""), myIO(theIO) { } +#endif /*!Destructor. Do nothing.*/ -LightApp_DataOwner -::~LightApp_DataOwner() +LightApp_DataOwner::~LightApp_DataOwner() { } -/*!Checks: Is current data owner equal \a obj.*/ -bool -LightApp_DataOwner -::isEqual( const SUIT_DataOwner& obj ) const +/*!Gets key string, used for data owners comparison.*/ +QString LightApp_DataOwner::keyString() const { - const _typeinfo& ti1 = typeid( obj ); - const _typeinfo& ti2 = typeid( *(this) ); - - if (ti1 != ti2) - return false; - - const LightApp_DataOwner* other = dynamic_cast( &obj ); - - return other && entry() == other->entry(); + return myEntry; } /*!Gets entry.*/ -QString -LightApp_DataOwner -::entry() const +QString LightApp_DataOwner::entry() const { return myEntry; } +#ifndef DISABLE_SALOMEOBJECT /*!Gets SALOME_InteractiveObject.*/ -const Handle(SALOME_InteractiveObject)& -LightApp_DataOwner -::IO() const +const Handle(SALOME_InteractiveObject)& LightApp_DataOwner::IO() const { return myIO; } +#endif