/[eiffelstudio]/FreeELKS/trunk/library/kernel/platform.e
ViewVC logotype

Contents of /FreeELKS/trunk/library/kernel/platform.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91424 - (show annotations)
Tue Oct 26 18:39:32 2004 UTC (15 years, 2 months ago) by manus_eiffel
File size: 5227 byte(s)
Initial revision

1 indexing
2
3 description: "[
4 Platform-dependent properties.
5 ]"
6
7 status: "See notice at end of class"
8 date: "$Date$"
9 revision: "$Revision$"
10
11 class PLATFORM
12
13 feature -- Platform
14
15 is_dotnet: BOOLEAN is False
16 -- Are we targetting .NET?
17
18 is_windows: BOOLEAN is
19 -- Are we running on Windows platform?
20 external
21 "C macro use %"eif_eiffel.h%""
22 alias
23 "EIF_IS_WINDOWS"
24 end
25
26 is_unix: BOOLEAN is
27 -- Are we running on a Unix like platform?
28 once
29 Result := not (is_vms or is_windows)
30 end
31
32 is_vms: BOOLEAN is
33 -- Are we running on VMS?
34 external
35 "C macro use %"eif_eiffel.h%""
36 alias
37 "EIF_IS_VMS"
38 end
39
40 feature -- Access bytes size
41
42 Boolean_bytes: INTEGER is
43 -- Number of bytes in a value of type `BOOLEAN'
44 external
45 "C macro use %"eif_misc.h%""
46 alias
47 "sizeof(EIF_BOOLEAN)"
48 end
49
50 Character_bytes: INTEGER is
51 -- Number of bytes in a value of type `CHARACTER'
52 external
53 "C macro use %"eif_misc.h%""
54 alias
55 "sizeof(EIF_CHARACTER)"
56 end
57
58 Wide_character_bytes: INTEGER is
59 -- Number of bytes in a value of type `WIDE_CHARACTER'
60 external
61 "C macro use %"eif_misc.h%""
62 alias
63 "sizeof(EIF_WIDE_CHAR)"
64 end
65
66 Integer_8_bytes: INTEGER is
67 -- Number of bytes in a value of type `INTEGER_8'
68 external
69 "C macro use %"eif_misc.h%""
70 alias
71 "sizeof(EIF_INTEGER_8)"
72 end
73
74 Integer_16_bytes: INTEGER is
75 -- Number of bytes in a value of type `INTEGER_16'
76 external
77 "C macro use %"eif_misc.h%""
78 alias
79 "sizeof(EIF_INTEGER_16)"
80 end
81
82 Integer_32_bytes, Integer_bytes: INTEGER is
83 -- Number of bytes in a value of type `INTEGER'
84 external
85 "C macro use %"eif_misc.h%""
86 alias
87 "sizeof(EIF_INTEGER)"
88 end
89
90 Integer_64_bytes: INTEGER is
91 -- Number of bytes in a value of type `INTEGER_64'
92 external
93 "C macro use %"eif_misc.h%""
94 alias
95 "sizeof(EIF_INTEGER_64)"
96 end
97
98 Real_bytes: INTEGER is
99 -- Number of bytes in a value of type `REAL'
100 external
101 "C macro use %"eif_misc.h%""
102 alias
103 "sizeof(EIF_REAL)"
104 end
105
106 Double_bytes: INTEGER is
107 -- Number of bytes in a value of type `DOUBLE'
108 external
109 "C macro use %"eif_misc.h%""
110 alias
111 "sizeof(EIF_DOUBLE)"
112 end
113
114 Pointer_bytes: INTEGER is
115 -- Number of bytes in a value of type `POINTER'
116 external
117 "C macro use %"eif_misc.h%""
118 alias
119 "sizeof(EIF_POINTER)"
120 end
121
122 feature -- Access bits size
123
124 Boolean_bits: INTEGER is
125 -- Number of bits in a value of type `BOOLEAN'
126 external
127 "C macro use %"eif_misc.h%""
128 alias
129 "esbool_size"
130 end
131
132 Character_bits: INTEGER is
133 -- Number of bits in a value of type `CHARACTER'
134 external
135 "C macro use %"eif_misc.h%""
136 alias
137 "eschar_size"
138 end
139
140 Integer_8_bits: INTEGER is
141 external
142 "C macro use %"eif_misc.h%""
143 alias
144 "esint8_size"
145 end
146
147 Integer_16_bits: INTEGER is
148 external
149 "C macro use %"eif_misc.h%""
150 alias
151 "esint16_size"
152 end
153
154 Integer_32_bits, Integer_bits: INTEGER is
155 -- Number of bits in a value of type `INTEGER'
156 external
157 "C macro use %"eif_misc.h%""
158 alias
159 "esint_size"
160 end
161
162 Integer_64_bits: INTEGER is
163 external
164 "C macro use %"eif_misc.h%""
165 alias
166 "esint64_size"
167 end
168
169 Real_bits: INTEGER is
170 -- Number of bits in a value of type `REAL'
171 external
172 "C macro use %"eif_misc.h%""
173 alias
174 "esreal_size"
175 end
176
177 Double_bits: INTEGER is
178 -- Number of bits in a value of type `DOUBLE'
179 external
180 "C macro use %"eif_misc.h%""
181 alias
182 "esdouble_size"
183 end
184
185 Pointer_bits: INTEGER is
186 -- Number of bits in a value of type `POINTER'
187 external
188 "C macro use %"eif_misc.h%""
189 alias
190 "esptr_size"
191 end
192
193 feature -- Access min max values
194
195 Maximum_character_code: INTEGER is
196 -- Largest supported code for CHARACTER values
197 do
198 Result := feature {CHARACTER}.Max_value
199 ensure
200 meaningful: Result >= 127
201 end
202
203 Maximum_integer: INTEGER is
204 -- Largest supported value of type INTEGER.
205 do
206 Result := feature {INTEGER}.Max_value
207 ensure
208 meaningful: Result >= 0
209 end
210
211 Minimum_character_code: INTEGER is
212 -- Smallest supported code for CHARACTER values
213 do
214 Result := feature {CHARACTER}.Min_value
215 ensure
216 meaningful: Result <= 0
217 end
218
219 Minimum_integer: INTEGER is
220 -- Smallest supported value of type INTEGER
221 do
222 Result := feature {INTEGER}.Min_value
223 ensure
224 meaningful: Result <= 0
225 end
226
227 indexing
228
229 library: "[
230 EiffelBase: Library of reusable components for Eiffel.
231 ]"
232
233 status: "[
234 Copyright 1986-2001 Interactive Software Engineering (ISE).
235 For ISE customers the original versions are an ISE product
236 covered by the ISE Eiffel license and support agreements.
237 ]"
238
239 license: "[
240 EiffelBase may now be used by anyone as FREE SOFTWARE to
241 develop any product, public-domain or commercial, without
242 payment to ISE, under the terms of the ISE Free Eiffel Library
243 License (IFELL) at http://eiffel.com/products/base/license.html.
244 ]"
245
246 source: "[
247 Interactive Software Engineering Inc.
248 ISE Building
249 360 Storke Road, Goleta, CA 93117 USA
250 Telephone 805-685-1006, Fax 805-685-6869
251 Electronic mail <info@eiffel.com>
252 Customer support http://support.eiffel.com
253 ]"
254
255 info: "[
256 For latest info see award-winning pages: http://eiffel.com
257 ]"
258
259 end -- class PLATFORM
260
261

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23