1 // Created on: 1994-06-06
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TopOpeBRepDS_InterferenceIterator_HeaderFile
18 #define _TopOpeBRepDS_InterferenceIterator_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopOpeBRepDS_ListIteratorOfListOfInterference.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <TopOpeBRepDS_Kind.hxx>
27 #include <Standard_Integer.hxx>
28 #include <TopOpeBRepDS_ListOfInterference.hxx>
29 class TopOpeBRepDS_Interference;
32 //! Iterate on interferences of a list, matching
33 //! conditions on interferences.
35 //! inheritance of ListIteratorOfListOfInterference from
36 //! TopOpeBRepDS has not been done because of the
37 //! impossibility of naming the classical More, Next
38 //! methods which are declared as static in
39 //! TCollection_ListIteratorOfList ... . ListIteratorOfList
40 //! has benn placed as a field of InterferenceIterator.
41 class TopOpeBRepDS_InterferenceIterator
48 Standard_EXPORT TopOpeBRepDS_InterferenceIterator();
50 //! Creates an iterator on the Interference of list <L>.
51 Standard_EXPORT TopOpeBRepDS_InterferenceIterator(const TopOpeBRepDS_ListOfInterference& L);
53 //! re-initialize interference iteration process on
54 //! the list of interference <L>.
55 //! Conditions are not modified.
56 Standard_EXPORT void Init (const TopOpeBRepDS_ListOfInterference& L);
58 //! define a condition on interference iteration process.
59 //! Interference must match the Geometry Kind <ST>
60 Standard_EXPORT void GeometryKind (const TopOpeBRepDS_Kind GK);
62 //! define a condition on interference iteration process.
63 //! Interference must match the Geometry <G>
64 Standard_EXPORT void Geometry (const Standard_Integer G);
66 //! define a condition on interference iteration process.
67 //! Interference must match the Support Kind <ST>
68 Standard_EXPORT void SupportKind (const TopOpeBRepDS_Kind ST);
70 //! define a condition on interference iteration process.
71 //! Interference must match the Support <S>
72 Standard_EXPORT void Support (const Standard_Integer S);
74 //! reach for an interference matching the conditions
76 Standard_EXPORT void Match();
78 //! Returns True if the Interference <I> matches the
79 //! conditions (if defined).
80 //! If no conditions defined, returns True.
81 Standard_EXPORT virtual Standard_Boolean MatchInterference (const Handle(TopOpeBRepDS_Interference)& I) const;
83 //! Returns True if there is a current Interference in
85 Standard_EXPORT Standard_Boolean More() const;
87 //! Move to the next Interference.
88 Standard_EXPORT void Next();
90 //! Returns the current Interference, matching the
91 //! conditions (if defined).
92 Standard_EXPORT const Handle(TopOpeBRepDS_Interference)& Value() const;
94 Standard_EXPORT TopOpeBRepDS_ListIteratorOfListOfInterference& ChangeIterator();
109 TopOpeBRepDS_ListIteratorOfListOfInterference myIterator;
110 Standard_Boolean myGKDef;
111 TopOpeBRepDS_Kind myGK;
112 Standard_Boolean myGDef;
113 Standard_Integer myG;
114 Standard_Boolean mySKDef;
115 TopOpeBRepDS_Kind mySK;
116 Standard_Boolean mySDef;
117 Standard_Integer myS;
128 #endif // _TopOpeBRepDS_InterferenceIterator_HeaderFile