b311480e |
1 | // Created by: Peter KURNEV |
4e57c75e |
2 | // Copyright (c) 2010-2012 OPEN CASCADE SAS |
3 | // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE |
4 | // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, |
5 | // EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS |
b311480e |
6 | // |
7 | // The content of this file is subject to the Open CASCADE Technology Public |
8 | // License Version 6.5 (the "License"). You may not use the content of this file |
9 | // except in compliance with the License. Please obtain a copy of the License |
10 | // at http://www.opencascade.org and read it completely before using this file. |
11 | // |
12 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
13 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
14 | // |
15 | // The Original Code and all software distributed under the License is |
16 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
17 | // Initial Developer hereby disclaims all such warranties, including without |
18 | // limitation, any warranties of merchantability, fitness for a particular |
19 | // purpose or non-infringement. Please see the License for the specific terms |
20 | // and conditions governing the rights and limitations under the License. |
4e57c75e |
21 | // |
22 | #include <BOPAlgo_CheckerSI.ixx> |
b311480e |
23 | |
4e57c75e |
24 | #include <BOPDS_DS.hxx> |
25 | #include <BOPDS_IteratorSI.hxx> |
c1fe53c6 |
26 | #include <BOPDS_PIteratorSI.hxx> |
4e57c75e |
27 | #include <BOPInt_Context.hxx> |
7fd59977 |
28 | |
29 | //======================================================================= |
4e57c75e |
30 | //function : |
7fd59977 |
31 | //purpose : |
32 | //======================================================================= |
4e57c75e |
33 | BOPAlgo_CheckerSI::BOPAlgo_CheckerSI() |
7fd59977 |
34 | : |
c1fe53c6 |
35 | BOPAlgo_PaveFiller(), |
36 | myLevelOfCheck(5) |
4e57c75e |
37 | { |
38 | } |
7fd59977 |
39 | //======================================================================= |
4e57c75e |
40 | //function : ~ |
7fd59977 |
41 | //purpose : |
42 | //======================================================================= |
4e57c75e |
43 | BOPAlgo_CheckerSI::~BOPAlgo_CheckerSI() |
7fd59977 |
44 | { |
7fd59977 |
45 | } |
46 | //======================================================================= |
c1fe53c6 |
47 | //function : SetLevelOfCheck |
48 | //purpose : |
49 | //======================================================================= |
50 | void BOPAlgo_CheckerSI::SetLevelOfCheck(const Standard_Integer theLevel) |
51 | { |
52 | if (theLevel >= 0 && theLevel <= 5) { |
53 | myLevelOfCheck = theLevel; |
54 | } |
55 | } |
56 | //======================================================================= |
4e57c75e |
57 | //function : Init |
7fd59977 |
58 | //purpose : |
59 | //======================================================================= |
4e57c75e |
60 | void BOPAlgo_CheckerSI::Init() |
7fd59977 |
61 | { |
4e57c75e |
62 | myErrorStatus = 0; |
63 | // |
64 | if (!myArguments.Extent()) { |
65 | myErrorStatus=10; |
66 | return; |
67 | } |
68 | // |
69 | Clear(); |
70 | // |
71 | // 1. myDS |
72 | myDS=new BOPDS_DS(myAllocator); |
73 | myDS->SetArguments(myArguments); |
74 | myDS->Init(); |
75 | // |
76 | // 2.myIterator |
c1fe53c6 |
77 | BOPDS_PIteratorSI theIterSI=new BOPDS_IteratorSI(myAllocator); |
78 | theIterSI->SetDS(myDS); |
79 | theIterSI->Prepare(); |
80 | theIterSI->UpdateByLevelOfCheck(myLevelOfCheck); |
81 | // |
82 | myIterator=theIterSI; |
4e57c75e |
83 | // |
84 | // 3 myContext |
85 | myContext=new BOPInt_Context; |
86 | // |
87 | myErrorStatus=0; |
7fd59977 |
88 | } |