Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IntTools / IntTools_MarkedRangeSet.cdl
1 -- File:        IntTools_MarkedRangeSet.cdl
2 -- Created:     Wed Sep 26 16:06:40 2001
3 -- Author:      Michael KLOKOV
4 --              <mkk@kurox>
5 ---Copyright:    Matra Datavision 2001
6
7 class MarkedRangeSet from IntTools
8
9         ---Purpose: class MarkedRangeSet provides continuous set of ranges marked with flags
10
11 uses
12     SequenceOfInteger from TColStd,
13     CArray1OfReal     from IntTools,
14     SequenceOfReal    from TColStd,
15     Range             from IntTools
16
17 is
18     Create returns MarkedRangeSet from IntTools;
19         ---Purpose:
20         --- Empty constructor
21         ---
22
23     Create(theFirstBoundary, theLastBoundary: Real from Standard;
24            theInitFlag: Integer from Standard) returns MarkedRangeSet from IntTools;
25         ---Purpose: 
26         --- build set of ranges which consists of one range with 
27         --- boundary values theFirstBoundary and theLastBoundary
28         ---
29
30     Create(theSortedArray: CArray1OfReal from IntTools;
31            theInitFlag: Integer from Standard) returns MarkedRangeSet from IntTools;
32         ---Purpose: 
33         --- Build set of ranges based on the array of progressive sorted values
34         ---
35         --  Warning: 
36         --- The constructor do not check if the values of array are not sorted
37         --- It should be checked before function invocation
38         ---
39
40     SetBoundaries(me: in out; theFirstBoundary, theLastBoundary: Real from Standard;
41                               theInitFlag: Integer from Standard);
42         ---Purpose: 
43         --- build set of ranges which consists of one range with 
44         --- boundary values theFirstBoundary and theLastBoundary
45         ---
46
47     SetRanges(me: in out; theSortedArray: CArray1OfReal from IntTools;
48                           theInitFlag: Integer from Standard);
49         ---Purpose: 
50         --- Build set of ranges based on the array of progressive sorted values
51         ---
52         --  Warning: 
53         --- The function do not check if the values of array are not sorted
54         --- It should be checked before function invocation
55         ---
56
57     InsertRange(me: in out; theFirstBoundary, theLastBoundary: Real from Standard;
58                             theFlag: Integer from Standard)
59         returns Boolean from Standard;
60         ---Purpose:
61         --- Inserts a new range marked with flag theFlag
62         --- It replace the existing ranges or parts of ranges
63         --- and their flags.
64         --- Returns True if the range is inside the initial boundaries,
65         --- otherwise or in case of some error returns False
66         ---
67
68     InsertRange(me: in out; theRange: Range from IntTools;
69                             theFlag: Integer from Standard)
70         returns Boolean from Standard;
71         ---Purpose:
72         --- Inserts a new range marked with flag theFlag
73         --- It replace the existing ranges or parts of ranges
74         --- and their flags.
75         --- Returns True if the range is inside the initial boundaries,
76         --- otherwise or in case of some error returns False
77         ---
78
79     InsertRange(me: in out; theFirstBoundary, theLastBoundary: Real from Standard;
80                             theFlag: Integer from Standard;
81                             theIndex: Integer from Standard)
82         returns Boolean from Standard;
83         ---Purpose:
84         --- Inserts a new range marked with flag theFlag
85         --- It replace the existing ranges or parts of ranges
86         --- and their flags.
87         --- The index theIndex is a position where the range will be inserted.
88         --- Returns True if the range is inside the initial boundaries,
89         --- otherwise or in case of some error returns False
90         ---
91     
92     InsertRange(me: in out; theRange: Range from IntTools;
93                             theFlag: Integer from Standard;
94                             theIndex: Integer from Standard)
95         returns Boolean from Standard;
96         ---Purpose:
97         --- Inserts a new range marked with flag theFlag
98         --- It replace the existing ranges or parts of ranges
99         --- and their flags.
100         --- The index theIndex is a position where the range will be inserted.
101         --- Returns True if the range is inside the initial boundaries,
102         --- otherwise or in case of some error returns False
103         ---
104
105     SetFlag(me: in out; theIndex: Integer from Standard;
106                         theFlag:  Integer from Standard);
107         ---Purpose:
108         --- Set flag theFlag for range with index theIndex
109         ---
110
111     Flag(me; theIndex: Integer from Standard)
112         returns Integer from Standard;
113         ---Purpose:
114         --- Returns flag of the range with index theIndex
115         ---
116
117     GetIndex(me; theValue: Real from Standard)
118         returns Integer from Standard;
119         ---Purpose: 
120         --- Returns index of range which contains theValue.
121         --- If theValue do not belong any range returns 0.
122         ---
123
124     GetIndices(me: in out; theValue: Real from Standard)
125         returns SequenceOfInteger from TColStd;
126         ---C++: return const &
127
128
129     GetIndex(me; theValue: Real from Standard;
130                  UseLower : Boolean from Standard)
131         returns Integer from Standard;
132         ---Purpose: 
133         --- Returns index of range which contains theValue
134         --- If theValue do not belong any range returns 0.
135         --- If UseLower is Standard_True then lower boundary of the range
136         --- can be equal to theValue, otherwise upper boundary of the range
137         --- can be equal to theValue.
138         ---
139
140     Length(me) 
141         returns Integer from Standard;
142         ---C++: inline
143         ---Purpose:
144         --- Returns number of ranges
145         ---
146         
147     Range(me; theIndex: Integer from Standard)
148         returns Range from IntTools;
149         ---Purpose:
150         --- Returns the range with index theIndex.
151         --- the Index can be from 1 to Length()
152         ---
153
154 fields
155     myRangeSetStorer : SequenceOfReal from TColStd;
156     myRangeNumber    : Integer from Standard;
157     myFlags          : SequenceOfInteger from TColStd;
158     myFoundIndices   : SequenceOfInteger from TColStd;
159
160 end MarkedRangeSet from IntTools;