0024530: TKMesh - remove unused package IntPoly
[occt.git] / src / Aspect / Aspect_GenId.cdl
CommitLineData
b311480e 1-- Created on: 1992-05-13
2-- Created by: NW,JPB,CAL
3-- Copyright (c) 1992-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
7fd59977 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
7fd59977 7--
973c2be1 8-- This library is free software; you can redistribute it and / or modify it
9-- under the terms of the GNU Lesser General Public version 2.1 as published
10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
7fd59977 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class GenId from Aspect
18
19 ---Version:
20
21 ---Level: Internal
22 ---Purpose: This class permits the creation and control of all
23 -- identifiers.
24 -- Warning: An identifier is an integer.
25
26 ---References:
27
28uses
29
30 ListOfInteger from TColStd
31
32raises
33
34 IdentDefinitionError from Aspect
35
36is
37
38 Create
39 returns GenId from Aspect;
40 ---Level: Internal
41 ---Purpose: Creates an available set of identifiers with the lower
42 -- bound 0 and the upper bound INT_MAX/2.
43
44 Create ( Low, Up : Integer from Standard )
45 returns GenId from Aspect
46 ---Level: Internal
47 ---Purpose: Creates an available set of identifiers with the lower
48 -- bound <Low> and the upper bound <Up>.
49 -- Warning: Raises IdentDefinitionError if <Up> is less than <Low>.
50 raises IdentDefinitionError from Aspect;
51
52 ---------------------------------------------------
53 -- Category: Methods to modify the class definition
54 ---------------------------------------------------
55
56 --Assign ( me : in out;
57 --Other : GenId from Aspect );
58 ---Level: Internal
59 ---Purpose: Copies the content of <Other> into <me>.
60 ---Category: Methods to modify the class definition
61 -- C++: alias operator =
62
63 Free ( me : in out );
64 ---Level: Internal
65 ---Purpose: Frees all identifiers of <me>.
66 ---Category: Methods to modify the class definition
67
68 Free ( me : in out;
69 Id : Integer from Standard );
70 ---Level: Internal
71 ---Purpose: Frees the identifier <Id> of <me>.
72 ---Category: Methods to modify the class definition
73
74 ----------------------------
75 -- Category: Inquire methods
76 ----------------------------
77
78 Available ( me )
79 returns Integer from Standard;
80 ---Level: Internal
81 ---Purpose: Returns the number of available identifiers of <me>.
82 ---Category: Inquire methods
83
84 Lower ( me )
85 returns Integer from Standard;
86 ---Level: Internal
87 ---Purpose: Returns the lower bound of <me>.
88 ---Category: Inquire methods
89
90 Next ( me : in out )
91 returns Integer from Standard
92 ---Level: Internal
93 ---Purpose: Returns an available identifier of <me>.
94 -- Warning: Raises IdentDefinitionError if all identifiers are busy.
95 raises IdentDefinitionError from Aspect;
96
97 Upper ( me )
98 returns Integer from Standard;
99 ---Level: Internal
100 ---Purpose: Returns the upper bound of <me>.
101 ---Category: Inquire methods
102
103--\f
104
105fields
106
107--
108-- Class : Aspect_GenId
109--
110-- Purpose : Declaration of variables specific to identifiers
111--
112-- Reminder : An identifier is an integer
113--
114
115 -- the current number of available identifiers
116 MyCount : Integer from Standard;
117
118 -- the number of identifiers
119 MyLength : Integer from Standard;
120
121 -- the limits for identifiers
122 MyLowerBound : Integer from Standard;
123 MyUpperBound : Integer from Standard;
124
125 -- to save free identifiers
126 MyFreeIds : ListOfInteger from TColStd;
127
128end GenId;