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