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