0024814: Avoid using explicit names of Handle classes
[occt.git] / src / BOPDS / BOPDS_Curve.lxx
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 //=======================================================================
16 //function : 
17 //purpose  : 
18 //=======================================================================
19   inline BOPDS_Curve::BOPDS_Curve()
20 :
21   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
22   myPaveBlocks(myAllocator),
23   myTechnoVertices(myAllocator)
24 {
25 }
26 //=======================================================================
27 //function : 
28 //purpose  : 
29 //=======================================================================
30   inline BOPDS_Curve::BOPDS_Curve(const Handle(NCollection_BaseAllocator)& theAllocator)
31 :
32   myAllocator(theAllocator),
33   myPaveBlocks(myAllocator),
34   myTechnoVertices(myAllocator)
35 {
36 }
37 //=======================================================================
38 //function : 
39 //purpose  : 
40 //=======================================================================
41   inline BOPDS_Curve::~BOPDS_Curve()
42 {
43 }
44 //=======================================================================
45 //function : SetCurve
46 //purpose  : 
47 //=======================================================================
48   inline void BOPDS_Curve::SetCurve(const IntTools_Curve& theCurve)
49 {
50   myCurve=theCurve;
51 }
52 //=======================================================================
53 //function : Curve
54 //purpose  : 
55 //=======================================================================
56   inline const IntTools_Curve& BOPDS_Curve::Curve()const
57 {
58   return myCurve;
59 }
60 //=======================================================================
61 //function : SetPaveBlocks
62 //purpose  : 
63 //=======================================================================
64   inline void BOPDS_Curve::SetPaveBlocks(const BOPDS_ListOfPaveBlock& theLPB)
65 {
66   BOPDS_ListIteratorOfListOfPaveBlock aIt;
67   //
68   myPaveBlocks.Clear();
69   aIt.Initialize(theLPB);
70   for (; aIt.More(); aIt.Next()) {
71     myPaveBlocks.Append(aIt.Value());
72   }
73 }
74 //=======================================================================
75 //function : PaveBlocks
76 //purpose  : 
77 //=======================================================================
78   inline const BOPDS_ListOfPaveBlock& BOPDS_Curve::PaveBlocks()const
79 {
80   return myPaveBlocks;
81 }
82 //=======================================================================
83 //function : ChangePaveBlocks
84 //purpose  : 
85 //=======================================================================
86   inline BOPDS_ListOfPaveBlock& BOPDS_Curve::ChangePaveBlocks()
87 {
88   return myPaveBlocks;
89 }
90 //=======================================================================
91 //function : InitPaveBlock1
92 //purpose  : 
93 //=======================================================================
94   inline void BOPDS_Curve::InitPaveBlock1()
95 {
96   if (!myPaveBlocks.Extent()) {
97     Handle(BOPDS_PaveBlock) aPB=new BOPDS_PaveBlock;
98     myPaveBlocks.Append(aPB);
99   }
100 }
101 //=======================================================================
102 //function : ChangePaveBlock1
103 //purpose  : 
104 //=======================================================================
105   inline Handle(BOPDS_PaveBlock)& BOPDS_Curve::ChangePaveBlock1()
106 {
107   Handle(BOPDS_PaveBlock)* pPB=(Handle(BOPDS_PaveBlock)*)&myPaveBlocks.First();
108   return *pPB;
109 }
110 //=======================================================================
111 //function : TechnoVertices
112 //purpose  : 
113 //=======================================================================
114   inline const BOPCol_ListOfInteger& BOPDS_Curve::TechnoVertices()const
115 {
116   return myTechnoVertices;
117 }
118 //=======================================================================
119 //function : ChangeTechnoVertices
120 //purpose  : 
121 //=======================================================================
122   inline BOPCol_ListOfInteger& BOPDS_Curve::ChangeTechnoVertices()
123 {
124   return myTechnoVertices;
125 }
126 //=======================================================================
127 //function : SetBox
128 //purpose  : 
129 //=======================================================================
130   inline void BOPDS_Curve::SetBox(const Bnd_Box& theBox)
131 {
132   myBox=theBox;
133 }
134 //=======================================================================
135 //function : Box
136 //purpose  : 
137 //=======================================================================
138   inline const Bnd_Box& BOPDS_Curve::Box()const
139 {
140   return myBox;
141 }
142 //=======================================================================
143 //function : ChangeBox
144 //purpose  : 
145 //=======================================================================
146   inline Bnd_Box& BOPDS_Curve::ChangeBox()
147 {
148   return myBox;
149 }
150 //=======================================================================
151 //function : HasEdge
152 //purpose  : 
153 //=======================================================================
154   inline Standard_Boolean BOPDS_Curve::HasEdge()const
155 {
156   Standard_Boolean bFlag;
157   BOPDS_ListIteratorOfListOfPaveBlock aItPB;
158   //
159   bFlag=Standard_False;
160   aItPB.Initialize(myPaveBlocks);
161   for (; aItPB.More(); aItPB.Next()) {
162     const Handle(BOPDS_PaveBlock)& aPB=aItPB.Value();
163     bFlag=aPB->HasEdge();
164     if (bFlag) {
165       break;
166     }
167   }
168   return bFlag;
169 }