b311480e |
1 | // Created on: 1992-03-27 |
2 | // Created by: Christophe MARION |
3 | // Copyright (c) 1992-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
733a0e55 |
16 | |
7fd59977 |
17 | #ifndef No_Exception |
18 | #define No_Exception |
19 | #endif |
42cf5bc1 |
20 | |
21 | |
22 | #include <HLRAlgo_EdgesBlock.hxx> |
23 | #include <HLRAlgo_WiresBlock.hxx> |
24 | #include <Standard_Type.hxx> |
7fd59977 |
25 | |
92efcf78 |
26 | IMPLEMENT_STANDARD_RTTIEXT(HLRAlgo_WiresBlock,MMgt_TShared) |
27 | |
7fd59977 |
28 | //======================================================================= |
29 | //function : HLRAlgo_WiresBlock |
30 | //purpose : |
31 | //======================================================================= |
7fd59977 |
32 | HLRAlgo_WiresBlock::HLRAlgo_WiresBlock (const Standard_Integer NbWires) : |
33 | myWires(1,NbWires) |
34 | {} |
35 | |
36 | //======================================================================= |
37 | //function : NbWires |
38 | //purpose : |
39 | //======================================================================= |
40 | |
41 | Standard_Integer HLRAlgo_WiresBlock::NbWires () const |
42 | { return myWires.Upper(); } |
43 | |
44 | //======================================================================= |
45 | //function : Set |
46 | //purpose : |
47 | //======================================================================= |
48 | |
49 | void HLRAlgo_WiresBlock::Set (const Standard_Integer I, |
50 | const Handle(HLRAlgo_EdgesBlock)& W) |
51 | { myWires (I) = W; } |
52 | |
53 | //======================================================================= |
54 | //function : Wire |
55 | //purpose : |
56 | //======================================================================= |
57 | |
58 | Handle(HLRAlgo_EdgesBlock) & |
59 | HLRAlgo_WiresBlock::Wire (const Standard_Integer I) |
60 | { return *((Handle(HLRAlgo_EdgesBlock)*) &myWires(I)); } |
61 | |
62 | //======================================================================= |
63 | //function : UpdateMinMax |
64 | //purpose : |
65 | //======================================================================= |
66 | |
67 | void HLRAlgo_WiresBlock::UpdateMinMax (const Standard_Address TotMinMax) |
68 | { |
69 | for (Standard_Integer i = 0; i <= 15; i++) |
70 | myMinMax[i] = ((Standard_Integer*)TotMinMax)[i]; |
71 | } |