42cf5bc1 |
1 | // Created on: 1992-04-06 |
2 | // Created by: Christophe MARION |
3 | // Copyright (c) 1992-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 _HLRAlgo_WiresBlock_HeaderFile |
18 | #define _HLRAlgo_WiresBlock_HeaderFile |
19 | |
681f3919 |
20 | #include <HLRAlgo_EdgesBlock.hxx> |
21 | |
42cf5bc1 |
22 | #include <Standard.hxx> |
23 | #include <Standard_Type.hxx> |
24 | |
25 | #include <TColStd_Array1OfTransient.hxx> |
26 | #include <Standard_Integer.hxx> |
25e59720 |
27 | #include <Standard_Transient.hxx> |
42cf5bc1 |
28 | |
29 | |
30 | class HLRAlgo_WiresBlock; |
25e59720 |
31 | DEFINE_STANDARD_HANDLE(HLRAlgo_WiresBlock, Standard_Transient) |
42cf5bc1 |
32 | |
33 | //! A WiresBlock is a set of Blocks. It is used by the |
34 | //! DataStructure to structure the Edges. |
35 | //! |
36 | //! A WiresBlock contains : |
37 | //! |
38 | //! * An Array of Blocks. |
25e59720 |
39 | class HLRAlgo_WiresBlock : public Standard_Transient |
42cf5bc1 |
40 | { |
42cf5bc1 |
41 | public: |
42cf5bc1 |
42 | //! Create a Block of Blocks. |
681f3919 |
43 | HLRAlgo_WiresBlock(const Standard_Integer NbWires) : |
44 | myWires(1,NbWires) |
45 | { |
46 | } |
42cf5bc1 |
47 | |
681f3919 |
48 | Standard_Integer NbWires() const |
49 | { |
50 | return myWires.Upper(); |
51 | } |
42cf5bc1 |
52 | |
681f3919 |
53 | void Set (const Standard_Integer I, const Handle(HLRAlgo_EdgesBlock)& W) |
54 | { |
55 | myWires (I) = W; |
56 | } |
42cf5bc1 |
57 | |
681f3919 |
58 | Handle(HLRAlgo_EdgesBlock)& Wire (const Standard_Integer I) |
59 | { |
60 | return *((Handle(HLRAlgo_EdgesBlock)*) &myWires(I)); |
61 | } |
42cf5bc1 |
62 | |
681f3919 |
63 | void UpdateMinMax (const HLRAlgo_EdgesBlock::MinMaxIndices& theMinMaxes) |
64 | {myMinMax = theMinMaxes;} |
42cf5bc1 |
65 | |
681f3919 |
66 | HLRAlgo_EdgesBlock::MinMaxIndices& MinMax() |
67 | { |
68 | return myMinMax; |
69 | } |
42cf5bc1 |
70 | |
25e59720 |
71 | DEFINE_STANDARD_RTTIEXT(HLRAlgo_WiresBlock,Standard_Transient) |
42cf5bc1 |
72 | |
42cf5bc1 |
73 | private: |
42cf5bc1 |
74 | TColStd_Array1OfTransient myWires; |
681f3919 |
75 | HLRAlgo_EdgesBlock::MinMaxIndices myMinMax; |
42cf5bc1 |
76 | }; |
77 | |
42cf5bc1 |
78 | #endif // _HLRAlgo_WiresBlock_HeaderFile |