b311480e |
1 | -- Created on: 1991-12-13 |
2 | -- Created by: Christophe MARION |
3 | -- Copyright (c) 1991-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 | |
7fd59977 |
21 | |
22 | class Intervals from Intrv |
23 | ---Purpose: The class Intervals is a sorted sequence of non |
24 | -- overlapping Real Intervals. |
25 | |
26 | uses |
27 | Integer from Standard, |
28 | Interval from Intrv, |
29 | SequenceOfInterval from Intrv |
30 | |
31 | raises |
32 | OutOfRange |
33 | |
34 | is |
35 | Create returns Intervals from Intrv; |
36 | ---Purpose: Creates a void sequence of intervals. |
37 | |
38 | Create(Int : Interval from Intrv) returns Intervals from Intrv; |
39 | ---Purpose: Creates a sequence of one interval. |
40 | |
41 | Create(Int : Intervals from Intrv) returns Intervals from Intrv; |
42 | ---Purpose: Creates by copying an existing sequence of |
43 | -- intervals. |
44 | |
45 | Intersect(me : in out; Tool : Interval from Intrv) |
46 | ---Purpose: Intersects the intervals with the interval <Tool>. |
47 | is static; |
48 | |
49 | Intersect(me : in out; Tool : Intervals from Intrv) |
50 | ---Purpose: Intersects the intervals with the intervals in the |
51 | -- sequence <Tool>. |
52 | is static; |
53 | |
54 | Subtract(me : in out; Tool : Interval from Intrv) |
55 | is static; |
56 | |
57 | Subtract(me : in out; Tool : Intervals from Intrv) |
58 | is static; |
59 | |
60 | Unite(me : in out; Tool : Interval from Intrv) |
61 | is static; |
62 | |
63 | Unite(me : in out; Tool : Intervals from Intrv) |
64 | is static; |
65 | |
66 | XUnite(me : in out; Tool : Interval from Intrv) |
67 | is static; |
68 | |
69 | XUnite(me : in out; Tool : Intervals from Intrv) |
70 | is static; |
71 | |
72 | NbIntervals(me) returns Integer from Standard |
73 | ---C++: inline |
74 | is static; |
75 | |
76 | Value(me; Index : Integer from Standard) |
77 | returns Interval from Intrv |
78 | ---C++: inline |
79 | ---C++: return const & |
80 | raises OutOfRange from Standard |
81 | is static; |
82 | |
83 | fields |
84 | myInter : SequenceOfInterval from Intrv; |
85 | |
86 | end Intervals; |