0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / BOPDS / BOPDS_PaveBlock.hxx
CommitLineData
42cf5bc1 1// Created by: Peter KURNEV
2// Copyright (c) 1999-2014 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef _BOPDS_PaveBlock_HeaderFile
16#define _BOPDS_PaveBlock_HeaderFile
17
18#include <Standard.hxx>
19#include <Standard_Type.hxx>
20
21#include <BOPCol_BaseAllocator.hxx>
22#include <Standard_Integer.hxx>
23#include <BOPDS_Pave.hxx>
24#include <BOPDS_ListOfPave.hxx>
25#include <Standard_Real.hxx>
26#include <Bnd_Box.hxx>
27#include <BOPCol_MapOfInteger.hxx>
28#include <MMgt_TShared.hxx>
29#include <Standard_Boolean.hxx>
30#include <BOPDS_ListOfPaveBlock.hxx>
31class BOPDS_Pave;
32class Bnd_Box;
33
34
35class BOPDS_PaveBlock;
36DEFINE_STANDARD_HANDLE(BOPDS_PaveBlock, MMgt_TShared)
37
38
39//! The class BOPDS_PaveBlock is to store
40//! the information about pave block on an edge.
41//! Two adjacent paves on edge make up pave block.
42class BOPDS_PaveBlock : public MMgt_TShared
43{
44
45public:
46
47
48
49 //! Empty contructor
50 Standard_EXPORT BOPDS_PaveBlock();
51
52
53 //! Contructor
54 //! <theAllocator> - the allocator to manage the memory
55 Standard_EXPORT BOPDS_PaveBlock(const BOPCol_BaseAllocator& theAllocator);
56
57
58 //! Modifier
59 //! Sets the first pave <thePave>
60 Standard_EXPORT void SetPave1 (const BOPDS_Pave& thePave);
61
62
63 //! Selector
64 //! Returns the first pave
65 Standard_EXPORT const BOPDS_Pave& Pave1() const;
66
67
68 //! Modifier
69 //! Sets the second pave <thePave>
70 Standard_EXPORT void SetPave2 (const BOPDS_Pave& thePave);
71
72
73 //! Selector
74 //! Returns the second pave
75 Standard_EXPORT const BOPDS_Pave& Pave2() const;
76
77
78 //! Modifier
79 //! Sets the index of edge of pave block <theEdge>
80 Standard_EXPORT void SetEdge (const Standard_Integer theEdge);
81
82
83 //! Selector
84 //! Returns the index of edge of pave block
85 Standard_EXPORT Standard_Integer Edge() const;
86
87
88 //! Query
89 //! Returns true if the pave block has edge
90 Standard_EXPORT Standard_Boolean HasEdge() const;
91
92
93 //! Query
94 //! Returns true if the pave block has edge
95 //! Returns the index of edge <theEdge>
96 Standard_EXPORT Standard_Boolean HasEdge (Standard_Integer& theEdge) const;
97
98
99 //! Modifier
100 //! Sets the index of original edge
101 //! of the pave block <theEdge>
102 Standard_EXPORT void SetOriginalEdge (const Standard_Integer theEdge);
103
104
105 //! Selector
106 //! Returns the index of original edge of pave block
107 Standard_EXPORT Standard_Integer OriginalEdge() const;
108
109
110 //! Query
111 //! Returns true if the edge is equal to the original edge
112 //! of the pave block
113 Standard_EXPORT Standard_Boolean IsSplitEdge() const;
114
115
116 //! Selector
117 //! Returns the parametric range <theT1,theT2>
118 //! of the pave block
119 Standard_EXPORT void Range (Standard_Real& theT1, Standard_Real& theT2) const;
120
121
122 //! Query
123 //! Returns true if the pave block has pave indices
124 //! that equal to the pave indices of the pave block
125 //! <theOther>
126 Standard_EXPORT Standard_Boolean HasSameBounds (const Handle(BOPDS_PaveBlock)& theOther) const;
127
128
129 //! Selector
130 //! Returns the pave indices <theIndex1,theIndex2>
131 //! of the pave block
787c4320 132 Standard_EXPORT void Indices (Standard_Integer& theIndex1,
133 Standard_Integer& theIndex2) const;
42cf5bc1 134
135
136 //! Query
137 //! Returns true if the pave block contains extra paves
138 Standard_EXPORT Standard_Boolean IsToUpdate() const;
139
140
141 //! Modifier
142 //! Appends extra paves <theLP>
143 Standard_EXPORT void AppendExtPave (const BOPDS_Pave& theLP);
144
145
146 //! Modifier
147 //! Appends extra pave <thePave>
148 Standard_EXPORT void AppendExtPave1 (const BOPDS_Pave& thePave);
149
150
151 //! Selector
152 //! Returns the extra paves
153 Standard_EXPORT const BOPDS_ListOfPave& ExtPaves() const;
154
155
156 //! Selector / Modifier
157 //! Returns the extra paves
158 Standard_EXPORT BOPDS_ListOfPave& ChangeExtPaves();
159
160
161 //! Modifier
162 //! Updates the pave block. The extra paves are used
163 //! to create new pave blocks <theLPB>.
164 //! <theFlag> - if true, the first pave and the second
165 //! pave are used to produce new pave blocks.
787c4320 166 Standard_EXPORT void Update (BOPDS_ListOfPaveBlock& theLPB,
167 const Standard_Boolean theFlag = Standard_True);
42cf5bc1 168
169
170 //! Query
171 //! Returns true if the extra paves contain the pave
172 //! with given value of the parameter <thePrm>
173 //! <theTol> - the value of the tolerance to compare
787c4320 174 //! <theInd> - index of the found pave
175 Standard_EXPORT Standard_Boolean ContainsParameter (const Standard_Real thePrm,
176 const Standard_Real theTol,
177 Standard_Integer& theInd) const;
42cf5bc1 178
179
180 //! Modifier
181 //! Sets the shrunk data for the pave block
182 //! <theTS1>, <theTS2> - shrunk range
183 //! <theBox> - the bounding box
787c4320 184 Standard_EXPORT void SetShrunkData (const Standard_Real theTS1,
185 const Standard_Real theTS2,
186 const Bnd_Box& theBox);
42cf5bc1 187
188
189 //! Selector
190 //! Returns the shrunk data for the pave block
191 //! <theTS1>, <theTS2> - shrunk range
192 //! <theBox> - the bounding box
787c4320 193 Standard_EXPORT void ShrunkData (Standard_Real& theTS1,
194 Standard_Real& theTS2,
195 Bnd_Box& theBox) const;
42cf5bc1 196
197
198 //! Query
199 //! Returns true if the pave block contains
200 //! the shrunk data
201 Standard_EXPORT Standard_Boolean HasShrunkData() const;
202
203 Standard_EXPORT void Dump() const;
204
205
206
207
92efcf78 208 DEFINE_STANDARD_RTTIEXT(BOPDS_PaveBlock,MMgt_TShared)
42cf5bc1 209
210protected:
211
212
213 BOPCol_BaseAllocator myAllocator;
214 Standard_Integer myEdge;
215 Standard_Integer myOriginalEdge;
216 BOPDS_Pave myPave1;
217 BOPDS_Pave myPave2;
218 BOPDS_ListOfPave myExtPaves;
219 Standard_Real myTS1;
220 Standard_Real myTS2;
221 Bnd_Box myShrunkBox;
222 BOPCol_MapOfInteger myMFence;
223
224
225private:
226
227
228
229
230};
231
232
233
234
235
236
237
238#endif // _BOPDS_PaveBlock_HeaderFile