Adding of testing cases from subgroups 937 940 and 941 of CHL group
[occt.git] / src / BOP / BOP_BlockBuilder.cdl
1 -- Created on: 1993-02-25
2 -- Created by: Jean Yves LEBEY
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22 class BlockBuilder from BOP
23          
24     ---Purpose: 
25     ---  auxiliary class to storage and operate with data of  
26     ---  connexity blocks inside the given ShapeSet 
27     --- 
28      
29 uses
30     
31     Shape     from TopoDS,  
32      
33     ShapeSet  from BOP,
34     BlockIterator from BOP,
35
36     SequenceOfInteger         from TColStd,
37     DataMapOfIntegerInteger   from TColStd,
38     IndexedMapOfOrientedShape from TopTools
39
40 is
41
42     Create  
43         returns BlockBuilder;
44         ---Purpose:  
45         --- Empty  Constructor 
46         ---
47     Create(SS : in out ShapeSet)  
48         returns BlockBuilder;
49         ---Purpose:  
50         --- Create an  object for given ShapeSet  
51         ---
52     MakeBlock(me : in out;  
53               SS : in out ShapeSet)  
54         is static;
55         ---Purpose:   
56         --- Compute the set of connexity blocks of elements  
57         --- for of the ShapeSet SS
58     -- 
59     --  
60     --   I t e r a t i o n   o n   b l o c k s made by MakeBlock
61     -- 
62     InitBlock(me : in out)  
63         is static; 
64
65     MoreBlock(me)  
66         returns Boolean from Standard  
67         is static; 
68         
69     NextBlock(me : in out)  
70         is static;
71     --
72     -- I t e r a t i o n   o n  on shapes inside the current block 
73     --
74     BlockIterator(me)  
75         returns BlockIterator from  BOP   
76         is static;
77         --- Purpose:  
78         --- Returns the BlockIterator for the current block  .
79         ---
80     Element(me; BI : BlockIterator from  BOP)  
81         returns Shape from TopoDS  
82         is static; 
83         ---C++: return const &
84         ---Purpose:  
85         --- Returns the current element of <BI>.
86         ---
87     Element(me; I : Integer from Standard)  
88         returns Shape from TopoDS  
89         is static;
90         ---C++: return const & 
91         ---Purpose:  
92         --- Returns the current element with index  <I> .
93         ---
94     Element(me; S : Shape from TopoDS)  
95         returns Integer from Standard;
96         ---Purpose:   
97         --- Returns the index of the current element .
98         ---
99     ElementIsValid(me; BI : BlockIterator)  
100         returns Boolean from Standard; 
101         ---Purpose:   
102         --- Internal
103         ---
104     ElementIsValid(me; I : Integer from Standard)  
105         returns Boolean from Standard; 
106         ---Purpose:   
107         --- Internal
108         ---
109     AddElement(me : in out; S : Shape from TopoDS)  
110         returns Integer from Standard;
111         ---Purpose:   
112         --- Internal 
113         ---
114     SetValid(me : in out;  
115              BI : BlockIterator from  BOP ;  
116              IsValid : Boolean from Standard); 
117         ---Purpose:   
118         --- Internal
119         ---
120     SetValid(me : in out;  
121              I : Integer from Standard;  
122              IsValid : Boolean from Standard);
123         ---Purpose:   
124         --- Internal
125         ---
126     CurrentBlockIsRegular(me : in out)  
127         returns Boolean from Standard;
128         ---Purpose:   
129         --- Returns TRUE if all elements inside the current block 
130         --- are biconnexial          
131         ---
132     
133 fields
134
135     myOrientedShapeMapIsValid : DataMapOfIntegerInteger from TColStd;
136     myOrientedShapeMap        : IndexedMapOfOrientedShape from TopTools;
137     myBlocks                  : SequenceOfInteger from TColStd;
138     myBlockIndex              : Integer from Standard;
139     myIsDone                  : Boolean from Standard;
140     myBlocksIsRegular         : SequenceOfInteger from TColStd;
141
142 end BlockBuilder;