42cf5bc1 |
1 | // Created on: 1997-09-17 |
2 | // Created by: Jean Yves LEBEY |
3 | // Copyright (c) 1997-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
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. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _TopOpeBRepDS_TKI_HeaderFile |
18 | #define _TopOpeBRepDS_TKI_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Integer.hxx> |
25 | #include <TopOpeBRepDS_HArray1OfDataMapOfIntegerListOfInterference.hxx> |
26 | #include <TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference.hxx> |
27 | #include <TopOpeBRepDS_Kind.hxx> |
28 | #include <TopOpeBRepDS_ListOfInterference.hxx> |
29 | #include <TCollection_AsciiString.hxx> |
30 | #include <Standard_Boolean.hxx> |
31 | class TopOpeBRepDS_Interference; |
32 | |
33 | |
34 | |
35 | class TopOpeBRepDS_TKI |
36 | { |
37 | public: |
38 | |
39 | DEFINE_STANDARD_ALLOC |
40 | |
41 | |
42 | Standard_EXPORT TopOpeBRepDS_TKI(); |
43 | |
44 | Standard_EXPORT void Clear(); |
45 | |
46 | Standard_EXPORT void FillOnGeometry (const TopOpeBRepDS_ListOfInterference& L); |
47 | |
48 | Standard_EXPORT void FillOnSupport (const TopOpeBRepDS_ListOfInterference& L); |
49 | |
50 | Standard_EXPORT Standard_Boolean IsBound (const TopOpeBRepDS_Kind K, const Standard_Integer G) const; |
51 | |
52 | Standard_EXPORT const TopOpeBRepDS_ListOfInterference& Interferences (const TopOpeBRepDS_Kind K, const Standard_Integer G) const; |
53 | |
54 | Standard_EXPORT TopOpeBRepDS_ListOfInterference& ChangeInterferences (const TopOpeBRepDS_Kind K, const Standard_Integer G); |
55 | |
56 | Standard_EXPORT Standard_Boolean HasInterferences (const TopOpeBRepDS_Kind K, const Standard_Integer G) const; |
57 | |
58 | Standard_EXPORT void Add (const TopOpeBRepDS_Kind K, const Standard_Integer G); |
59 | |
60 | Standard_EXPORT void Add (const TopOpeBRepDS_Kind K, const Standard_Integer G, const Handle(TopOpeBRepDS_Interference)& HI); |
61 | |
42cf5bc1 |
62 | Standard_EXPORT void DumpTKIIterator (const TCollection_AsciiString& s1 = "", const TCollection_AsciiString& s2 = ""); |
63 | |
64 | Standard_EXPORT void Init(); |
65 | |
66 | Standard_EXPORT Standard_Boolean More() const; |
67 | |
68 | Standard_EXPORT void Next(); |
69 | |
70 | Standard_EXPORT const TopOpeBRepDS_ListOfInterference& Value (TopOpeBRepDS_Kind& K, Standard_Integer& G) const; |
71 | |
72 | Standard_EXPORT TopOpeBRepDS_ListOfInterference& ChangeValue (TopOpeBRepDS_Kind& K, Standard_Integer& G); |
73 | |
74 | |
75 | |
76 | |
77 | protected: |
78 | |
79 | |
80 | |
81 | |
82 | |
83 | private: |
84 | |
85 | |
86 | Standard_EXPORT void Reset(); |
87 | |
88 | Standard_EXPORT Standard_Boolean MoreTI() const; |
89 | |
90 | Standard_EXPORT void NextTI(); |
91 | |
92 | Standard_EXPORT Standard_Boolean MoreITM() const; |
93 | |
94 | Standard_EXPORT void FindITM(); |
95 | |
96 | Standard_EXPORT void NextITM(); |
97 | |
98 | Standard_EXPORT void Find(); |
99 | |
100 | Standard_EXPORT Standard_Integer KindToTableIndex (const TopOpeBRepDS_Kind K) const; |
101 | |
102 | Standard_EXPORT TopOpeBRepDS_Kind TableIndexToKind (const Standard_Integer TI) const; |
103 | |
104 | Standard_EXPORT Standard_Boolean IsValidTI (const Standard_Integer TI) const; |
105 | |
106 | Standard_EXPORT Standard_Boolean IsValidK (const TopOpeBRepDS_Kind K) const; |
107 | |
108 | Standard_EXPORT Standard_Boolean IsValidG (const Standard_Integer G) const; |
109 | |
110 | Standard_EXPORT Standard_Boolean IsValidKG (const TopOpeBRepDS_Kind K, const Standard_Integer G) const; |
111 | |
112 | |
113 | Standard_Integer mydelta; |
114 | Handle(TopOpeBRepDS_HArray1OfDataMapOfIntegerListOfInterference) myT; |
115 | Standard_Integer myTI; |
116 | Standard_Integer myG; |
117 | TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference myITM; |
118 | TopOpeBRepDS_Kind myK; |
119 | TopOpeBRepDS_ListOfInterference myEmptyLOI; |
120 | TCollection_AsciiString myDummyAsciiString; |
121 | |
122 | |
123 | }; |
124 | |
125 | |
126 | |
127 | |
128 | |
129 | |
130 | |
131 | #endif // _TopOpeBRepDS_TKI_HeaderFile |