0021762: Integration of new Boolean Operation algorithm to OCCT.
[occt.git] / src / BOPDS / BOPDS_SubIterator.cdl
1 -- Created by: Peter KURNEV
2 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
3 --
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
8 --
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 --
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
18
19 class SubIterator from BOPDS 
20      
21         ---Purpose: 
22         -- The class BOPDS_SubIterator is  
23         --  1.to compute intersections between two sub-sets of 
24         --    BRep sub-shapes  
25         --    of arguments of an operation (see the class BOPDS_DS)
26         --    in terms of theirs bounding boxes           
27         --  2.provides interface to iterare the pairs of  
28         --    intersected sub-shapes of given type     
29         
30 uses  
31     ShapeEnum from TopAbs, 
32     BaseAllocator from BOPCol, 
33     ListOfInteger from BOPCol, 
34     PListOfInteger from BOPCol,  
35     DS  from BOPDS,
36     PDS from BOPDS, 
37     PassKeyBoolean from BOPDS, 
38     ListOfPassKeyBoolean from BOPDS,
39     ListIteratorOfListOfPassKeyBoolean from BOPDS, 
40     VectorOfListOfPassKeyBoolean from BOPDS 
41     
42     
43 --raises
44
45 is 
46     Create   
47         returns SubIterator from BOPDS;
48     ---C++: alias "Standard_EXPORT virtual ~BOPDS_SubIterator();" 
49         ---Purpose:  
50         --- Empty contructor  
51         ---   
52          
53     Create (theAllocator: BaseAllocator from BOPCol)  
54         returns SubIterator from BOPDS;
55         ---Purpose:  
56         ---  Contructor    
57         ---  theAllocator - the allocator to manage the memory     
58         ---  
59          
60     SetDS(me:out; 
61             pDS:PDS from BOPDS); 
62         ---Purpose: 
63         --- Modifier 
64         --- Sets the data structure <pDS> to process 
65          
66     DS(me) 
67       returns DS from BOPDS; 
68     ---C++:return const & 
69         ---Purpose: 
70         --- Selector 
71         --- Returns the data structure  
72         
73     SetSubSet1(me:out; 
74             theLI:ListOfInteger from BOPCol); 
75         ---Purpose: 
76         --- Modifier 
77         --- Sets the first set of indices  <theLI> to process 
78          
79     SubSet1(me)
80         returns ListOfInteger from BOPCol; 
81     ---C++:return const &   
82         ---Purpose: 
83         --- Selector
84         --- Returns the first set of indices to process 
85    
86     SetSubSet2(me:out; 
87             theLI:ListOfInteger from BOPCol); 
88         ---Purpose: 
89         --- Modifier 
90         --- Sets the second set of indices  <theLI> to process 
91     SubSet2(me)
92         returns ListOfInteger from BOPCol; 
93     ---C++:return const & 
94         ---Purpose: 
95         --- Selector
96         --- Returns the second set of indices to process   
97          
98     Initialize(me:out); 
99         ---Purpose:  
100         --- Initializes the  iterator 
101      
102     More(me)  
103         returns Boolean from Standard; 
104         ---Purpose: 
105         --- Returns  true if still there are pairs 
106         --  of intersected shapes  
107          
108     Next(me:out); 
109         ---Purpose: 
110         --- Moves iterations ahead  
111         
112     Value(me;  
113             theIndex1:out Integer from Standard;
114             theIndex2:out Integer from Standard); 
115         ---Purpose: 
116         --- Returns indices (DS) of intersected shapes 
117         --- theIndex1 - the index of the first shape  
118         --- theIndex2 - the index of the second shape 
119         
120     Prepare(me:out) 
121         is virtual; 
122         ---Purpose: 
123         --- Perform the intersection algorithm and prepare  
124         --- the results to be used  
125          
126     Intersect(me:out) 
127         is virtual protected; 
128                      
129
130 fields 
131     myAllocator:  BaseAllocator from BOPCol is protected; 
132     myDS       :  PDS from BOPDS is protected;  
133     myList     :  ListOfPassKeyBoolean from BOPDS is protected;  
134     myIterator :  ListIteratorOfListOfPassKeyBoolean from BOPDS is protected; 
135     mySubSet1  :  PListOfInteger from BOPCol is protected; 
136     mySubSet2  :  PListOfInteger from BOPCol is protected;  
137     
138 end SubIterator;