0022627: Change OCCT memory management defaults
[occt.git] / src / AIS / AIS_SignatureFilter.cxx
CommitLineData
7fd59977 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
11AIS_SignatureFilter::AIS_SignatureFilter(const AIS_KindOfInteractive TheKind,
12 const Standard_Integer TheSignature):
13AIS_TypeFilter(TheKind),
14mySig(TheSignature){}
15
16Standard_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}