Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Aspect / Aspect_GenId.cdl
CommitLineData
7fd59977 1--
2-- File: Aspect_GenId.cdl
3-- Created: Mercredi 13 Mai 1992
4-- Author: NW,JPB,CAL
5--
6---Copyright: MatraDatavision 1991,1992,1993
7--
8
9class GenId from Aspect
10
11 ---Version:
12
13 ---Level: Internal
14 ---Purpose: This class permits the creation and control of all
15 -- identifiers.
16 -- Warning: An identifier is an integer.
17
18 ---References:
19
20uses
21
22 ListOfInteger from TColStd
23
24raises
25
26 IdentDefinitionError from Aspect
27
28is
29
30 Create
31 returns GenId from Aspect;
32 ---Level: Internal
33 ---Purpose: Creates an available set of identifiers with the lower
34 -- bound 0 and the upper bound INT_MAX/2.
35
36 Create ( Low, Up : Integer from Standard )
37 returns GenId from Aspect
38 ---Level: Internal
39 ---Purpose: Creates an available set of identifiers with the lower
40 -- bound <Low> and the upper bound <Up>.
41 -- Warning: Raises IdentDefinitionError if <Up> is less than <Low>.
42 raises IdentDefinitionError from Aspect;
43
44 ---------------------------------------------------
45 -- Category: Methods to modify the class definition
46 ---------------------------------------------------
47
48 --Assign ( me : in out;
49 --Other : GenId from Aspect );
50 ---Level: Internal
51 ---Purpose: Copies the content of <Other> into <me>.
52 ---Category: Methods to modify the class definition
53 -- C++: alias operator =
54
55 Free ( me : in out );
56 ---Level: Internal
57 ---Purpose: Frees all identifiers of <me>.
58 ---Category: Methods to modify the class definition
59
60 Free ( me : in out;
61 Id : Integer from Standard );
62 ---Level: Internal
63 ---Purpose: Frees the identifier <Id> of <me>.
64 ---Category: Methods to modify the class definition
65
66 ----------------------------
67 -- Category: Inquire methods
68 ----------------------------
69
70 Available ( me )
71 returns Integer from Standard;
72 ---Level: Internal
73 ---Purpose: Returns the number of available identifiers of <me>.
74 ---Category: Inquire methods
75
76 Lower ( me )
77 returns Integer from Standard;
78 ---Level: Internal
79 ---Purpose: Returns the lower bound of <me>.
80 ---Category: Inquire methods
81
82 Next ( me : in out )
83 returns Integer from Standard
84 ---Level: Internal
85 ---Purpose: Returns an available identifier of <me>.
86 -- Warning: Raises IdentDefinitionError if all identifiers are busy.
87 raises IdentDefinitionError from Aspect;
88
89 Upper ( me )
90 returns Integer from Standard;
91 ---Level: Internal
92 ---Purpose: Returns the upper bound of <me>.
93 ---Category: Inquire methods
94
95--\f
96
97fields
98
99--
100-- Class : Aspect_GenId
101--
102-- Purpose : Declaration of variables specific to identifiers
103--
104-- Reminder : An identifier is an integer
105--
106
107 -- the current number of available identifiers
108 MyCount : Integer from Standard;
109
110 -- the number of identifiers
111 MyLength : Integer from Standard;
112
113 -- the limits for identifiers
114 MyLowerBound : Integer from Standard;
115 MyUpperBound : Integer from Standard;
116
117 -- to save free identifiers
118 MyFreeIds : ListOfInteger from TColStd;
119
120end GenId;