X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FLightApp%2FLightApp_DataOwner.cxx;h=dd3c22f1622e6dc55248c3f1a9fa77c1485bfecf;hb=f830c97c748d8f8a6a7eccc8e3a58e19066a1181;hp=dea72f88c94120a8c6813d8c640264d45f8ab860;hpb=da1f47b34cbb3bc5b2cff58f1091e74a696b406c;p=modules%2Fgui.git diff --git a/src/LightApp/LightApp_DataOwner.cxx b/src/LightApp/LightApp_DataOwner.cxx index dea72f88c..dd3c22f16 100644 --- a/src/LightApp/LightApp_DataOwner.cxx +++ b/src/LightApp/LightApp_DataOwner.cxx @@ -16,31 +16,22 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include "LightApp_DataOwner.h" #include "LightApp_DataObject.h" -#ifndef WNT -#include -#define _typeinfo std::type_info -#else -#include -#define _typeinfo type_info -#endif - #include /*!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) { @@ -48,40 +39,25 @@ LightApp_DataOwner #endif /*!Destructor. Do nothing.*/ -LightApp_DataOwner -::~LightApp_DataOwner() -{ -} - -/*!Checks: Is current data owner equal \a obj.*/ -bool -LightApp_DataOwner -::isEqual( const SUIT_DataOwner& obj ) const +LightApp_DataOwner::~LightApp_DataOwner() { - const LightApp_DataOwner* other = dynamic_cast( &obj ); - - return other && entry() == other->entry(); } -bool LightApp_DataOwner::operator<( const SUIT_DataOwner& obj ) const +/*!Gets key string, used for data owners comparison.*/ +QString LightApp_DataOwner::keyString() const { - const LightApp_DataOwner* other = dynamic_cast( &obj ); - return 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; }