1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
-- File: Standard.cdl
-- Created: Thu Sep 5 13:40:39 1991
-- Author: J.P. TIRAUlt
-- C. LEYNADIER
package Standard
---Purpose:
-- The package Standard provides the minimum services necessary
-- for other toolkits to handle persistent and transient objects.
-- It is the Standard run-time encapsulation of the CAS.CADE
-- database, that is, it defines a single programming interface
-- for creating and accessing persistent objects manipulated by
-- handles.
is
enumeration InternalType is
Void, -- TYPUND 0x00000000 /* Undefined */
Char, -- TYPIT1 0x00010001 /* Byte */
ExtChar, -- TYPIT2 0x00020001 /* Integer*2 */
LongInt, -- TYPIT4 0x00040001 /* Integer*4 */
Bool, -- TYPLO4 0x00040002 /* Logical*4 */
Float, -- TYPRE4 0x00040004 /* Real*4 */
LongDouble, -- TYPRE8 0x00080004 /* Real*8 */
String, -- TYPCHR 0x00000010 /* Character */
EString, -- TYPCHREXT 0x00000011 /* Character */
EntryAddress, -- TYPENT 0x00040020 /* Function address */
DataAddress, -- TYPDAD 0x00040080 /* Data address */
EngineHandle, -- TYPHDLE 0x00004000 /* Handle */
Long64, -- TYPIT8 0x00080001 /* Integer*8 */
Array; -- TYPARR 0x00008000 /* Tableau */
enumeration WayOfLife is IsNothing, IsAddress, IsTransient, IsPersistent, IsNotLoaded;
enumeration KindOfType is IsUnKnown, IsClass, IsEnumeration, IsPrimitive, IsImported, IsPackage;
enumeration HandlerStatus is HandlerVoid, HandlerJumped, HandlerProcessed;
imported IStream;
imported OStream;
imported SStream;
imported UUID;
imported JmpBuf;
imported ThreadId;
primitive CString;
primitive ExtString;
primitive Address;
primitive Size;
primitive PByte;
primitive PCharacter;
primitive PExtCharacter;
primitive Time;
deferred class ErrorHandlerCallback;
class ErrorHandler;
class AncestorIterator;
deferred class Storable ;
primitive Boolean inherits Storable;
primitive Character inherits Storable;
primitive ExtCharacter inherits Storable;
primitive Integer inherits Storable;
primitive Byte inherits Storable;
primitive Real inherits Storable;
primitive ShortReal inherits Storable;
primitive OId inherits Storable;
deferred class Persistent ; -- inherits Storable
class GUID; -- inherits Storable
deferred class Transient ;
class Type; -- inherits Transient
class Failure; -- inherits Transient
exception AbortiveTransaction inherits Failure;
exception DomainError inherits Failure;
exception ConstructionError inherits DomainError;
exception NullObject inherits DomainError;
exception NoSuchObject inherits DomainError;
exception NoMoreObject inherits DomainError;
exception ImmutableObject inherits DomainError;
exception TypeMismatch inherits DomainError;
exception MultiplyDefined inherits DomainError;
exception DimensionError inherits DomainError;
exception DimensionMismatch inherits DimensionError;
exception RangeError inherits DomainError;
exception OutOfRange inherits RangeError;
exception NullValue inherits RangeError;
exception NegativeValue inherits RangeError;
exception NumericError inherits Failure;
exception Underflow inherits NumericError;
exception Overflow inherits NumericError;
exception DivideByZero inherits NumericError;
exception ProgramError inherits Failure;
exception NotImplemented inherits ProgramError;
exception OutOfMemory inherits ProgramError;
exception LicenseError inherits Failure;
exception LicenseNotFound inherits LicenseError;
exception TooManyUsers inherits LicenseError;
pointer PErrorHandler to ErrorHandler;
--
-- Mutex: a class to synchronize access to shared data
-- from threads within one process
--
imported Mutex;
--
-- Memory manager
--
Allocate (aSize: Size from Standard)
returns Address from Standard;
---Purpose: Allocates memory blocks
-- aSize - bytes to allocate
Free (aStorage:in out Address from Standard);
---Purpose: Deallocates memory blocks
-- aStorage - previously allocated memory block to be freed
Reallocate(aStorage: in out Address from Standard;
aNewSize: Size from Standard)
returns Address from Standard;
---Purpose: Reallocates memory blocks
-- aStorage - previously allocated memory block
-- aNewSize - new size in bytes
Purge returns Integer from Standard;
---Purpose: Deallocates the storage retained on the free list
-- and clears the list.
-- Returns non-zero if some memory has been actually freed.
IsReentrant returns Boolean from Standard;
---Purpose: Returns boolean flag indicating whether OCCT is
-- operating in reentrant mode. This flag affects OCCT
-- memory manager, exception and signal handling,
-- operations with handles etc., making them thread-safe.
--
-- By default, this flag is set to False, in order
-- to avoid performance reduction due to locking.
--
-- In multithreaded applications this flag must be set to
-- True, either by calling method SetReentrant(),
-- or by defining environment variable MMGT_REENTRANT.
SetReentrant (isReentrant: Boolean from Standard);
---Purpose: Sets boolean flag indicating whether OCCT is
-- operating in reentrant mode.
-- See method IsReentrant() for more information.
-- Note: This method may be called only when no any other
-- thread using OCCT exists
end Standard;
|