X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FAIS%2FAIS_TypeFilter.cxx;h=4d8221d18b394b3019efc73f438bb287de3f76e3;hp=8b33c0aa1a0f65c44873c8a892225cc22d79e5be;hb=780ee4e25cc8de44daa10216e7e0d3bf963f3f29;hpb=7fd59977dfb3a75f75670474b59dfc0f3f5f90ba diff --git a/src/AIS/AIS_TypeFilter.cxx b/src/AIS/AIS_TypeFilter.cxx old mode 100755 new mode 100644 index 8b33c0aa1a..4d8221d18b --- a/src/AIS/AIS_TypeFilter.cxx +++ b/src/AIS/AIS_TypeFilter.cxx @@ -1,24 +1,33 @@ -// File: AIS_TypeFilter.cxx -// Created: Thu Mar 6 16:59:32 1997 -// Author: Robert COUBLANC -// +// Created on: 1997-03-06 +// Created by: Robert COUBLANC +// Copyright (c) 1997-1999 Matra Datavision +// Copyright (c) 1999-2014 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. -#include #include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(AIS_TypeFilter,SelectMgr_Filter) AIS_TypeFilter::AIS_TypeFilter(const AIS_KindOfInteractive TheKind): myKind(TheKind){} Standard_Boolean AIS_TypeFilter::IsOk(const Handle(SelectMgr_EntityOwner)& anObj) const { - if(Handle(AIS_InteractiveObject)::DownCast(anObj->Selectable()).IsNull()) - return Standard_False; - -//#ifndef DEB - Handle_SelectMgr_SelectableObject aSelectableObject = anObj->Selectable() ; - return ((Handle(AIS_InteractiveObject)&) aSelectableObject)->Type()== myKind; -//#else -// return ((Handle(AIS_InteractiveObject)&)anObj->Selectable())->Type()== myKind; -//#endif + Handle(AIS_InteractiveObject) anObject = + Handle(AIS_InteractiveObject)::DownCast (anObj->Selectable()); + return ! anObject.IsNull() && anObject->Type()== myKind; }