Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:55

0001 // Created on: 1997-03-04
0002 // Created by: Robert COUBLANC
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _AIS_SignatureFilter_HeaderFile
0018 #define _AIS_SignatureFilter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <AIS_TypeFilter.hxx>
0025 #include <AIS_KindOfInteractive.hxx>
0026 class SelectMgr_EntityOwner;
0027 
0028 
0029 class AIS_SignatureFilter;
0030 DEFINE_STANDARD_HANDLE(AIS_SignatureFilter, AIS_TypeFilter)
0031 
0032 //! Selects Interactive Objects through their signatures
0033 //! and types. The signature provides an
0034 //! additional   characterization of an object's type, and
0035 //! takes the form of an index. The filter questions each
0036 //! Interactive Object in local context to determine
0037 //! whether it has an non-null owner, and if so, whether
0038 //! it has the desired signature. If the object returns true
0039 //! in each case, it is kept. If not, it is rejected.
0040 //! By default, the   interactive object has a None   type
0041 //! and a signature of 0. If you want to give a particular
0042 //! type and signature to your Interactive Object, you
0043 //! must redefine two virtual methods:   Type and Signature.
0044 //! This filter is only used in an open local contexts.
0045 //! In the Collector viewer, you can only locate
0046 //! Interactive Objects which answer positively to the
0047 //! positioned filters when a local context is open.
0048 //! Warning
0049 //! Some signatures have already been used by standard
0050 //! objects delivered in AIS. These include:
0051 //! -   signature 0 - Shape
0052 //! -   signature 1 - Point
0053 //! -   signature 2 - Axis
0054 //! -   signature 3 - Trihedron
0055 //! -   signature 4 - PlaneTrihedron
0056 //! -   signature 5 - Line
0057 //! -   signature 6 - Circle
0058 //! -   signature 7 - Plane
0059 class AIS_SignatureFilter : public AIS_TypeFilter
0060 {
0061 
0062 public:
0063 
0064   
0065   //! Initializes the signature filter, adding the signature
0066   //! specification, aGivenSignature, to that for type,
0067   //! aGivenKind, in AIS_TypeFilter.
0068   Standard_EXPORT AIS_SignatureFilter(const AIS_KindOfInteractive aGivenKind, const Standard_Integer aGivenSignature);
0069   
0070   //! Returns False if the transient is not an AIS_InteractiveObject.
0071   //! Returns False if the signature of InteractiveObject
0072   //! is not the same as the stored one in the filter...
0073   Standard_EXPORT Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anobj) const Standard_OVERRIDE;
0074 
0075 
0076 
0077 
0078   DEFINE_STANDARD_RTTIEXT(AIS_SignatureFilter,AIS_TypeFilter)
0079 
0080 protected:
0081 
0082 
0083 
0084 
0085 private:
0086 
0087 
0088   Standard_Integer mySig;
0089 
0090 
0091 };
0092 
0093 
0094 
0095 
0096 
0097 
0098 
0099 #endif // _AIS_SignatureFilter_HeaderFile