Integration of OCCT 6.5.0 from SVN
[occt.git] / src / AIS / AIS_TypeFilter.cxx
1 // File:        AIS_TypeFilter.cxx
2 // Created:     Thu Mar  6 16:59:32 1997
3 // Author:      Robert COUBLANC
4 //              <rob@robox.paris1.matra-dtv.fr>
5
6
7 #include <AIS_TypeFilter.ixx>
8 #include <AIS_InteractiveObject.hxx>
9
10 AIS_TypeFilter::AIS_TypeFilter(const AIS_KindOfInteractive TheKind):
11 myKind(TheKind){}
12
13 Standard_Boolean AIS_TypeFilter::IsOk(const Handle(SelectMgr_EntityOwner)& anObj) const 
14 {
15   if(Handle(AIS_InteractiveObject)::DownCast(anObj->Selectable()).IsNull()) 
16     return Standard_False;
17   
18 //#ifndef DEB
19   Handle_SelectMgr_SelectableObject aSelectableObject = anObj->Selectable() ;
20   return ((Handle(AIS_InteractiveObject)&) aSelectableObject)->Type()== myKind;
21 //#else
22 //  return ((Handle(AIS_InteractiveObject)&)anObj->Selectable())->Type()== myKind;
23 //#endif
24 }