Salome HOME
Update mail address
[modules/geom.git] / src / GEOMFiltersSelection / GEOM_PreviewFilter.cxx
index e9766b88ebdc3964cb5dbc9dfd9132786830b22f..1be775274dde60a966b789d0d777c4f5c36a242a 100644 (file)
@@ -1,42 +1,50 @@
-//  GEOM GEOMFiltersSelection : filter selector for the viewer
-//
-//  Copyright (C) 2003  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. 
+// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 // 
-//  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 
+// 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.
 // 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// 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
 //
-//  File   : GEOM_PreviewFilter.cxx
-//  Author : Sergey ANIKIN
-//  Module : GEOM
-//  $Header$
+#include "GEOM_PreviewFilter.h"
 
-#include "GEOM_PreviewFilter.ixx"
-#include "SALOME_InteractiveObject.hxx"
+#include <LightApp_DataOwner.h>
 
-using namespace std;
+//=======================================================================
+// function : GEOM_SelectionFilter
+// purpose  : 
+//=======================================================================
+GEOM_PreviewFilter::GEOM_PreviewFilter( SalomeApp_Study* study )
+: SalomeApp_Filter( study )
+{
+}
 
-GEOM_PreviewFilter::GEOM_PreviewFilter()
+//=======================================================================
+// function : ~GEOM_SelectionFilter
+// purpose  : 
+//=======================================================================
+GEOM_PreviewFilter::~GEOM_PreviewFilter()
 {
 }
 
-Standard_Boolean GEOM_PreviewFilter::IsOk(const Handle(SALOME_InteractiveObject)& anObj) const 
+//=======================================================================
+// function : isOk
+// purpose  : 
+//=======================================================================
+bool GEOM_PreviewFilter::isOk( const SUIT_DataOwner* sOwner ) const
 {
-  return ( !anObj.IsNull() && anObj->hasEntry() && strstr( anObj->getEntry(), "TEMP" ) );
+  const LightApp_DataOwner* owner = dynamic_cast<const LightApp_DataOwner*> ( sOwner );
+  return ( owner && strstr( owner->entry(), "TEMP" ) );
 }