equal
deleted
inserted
replaced
7 inclusion of the above copyright notice. This software may not |
7 inclusion of the above copyright notice. This software may not |
8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
|
12 |
|
13 "{ Package: 'stx:libbasic' }" |
12 |
14 |
13 Object subclass:#ExternalAddress |
15 Object subclass:#ExternalAddress |
14 instanceVariableNames:'address*' |
16 instanceVariableNames:'address*' |
15 classVariableNames:'' |
17 classVariableNames:'' |
16 poolDictionaries:'' |
18 poolDictionaries:'' |
110 Here, true is returned." |
112 Here, true is returned." |
111 |
113 |
112 ^ self == ExternalAddress |
114 ^ self == ExternalAddress |
113 |
115 |
114 "Modified: / 11.6.1998 / 17:12:40 / cg" |
116 "Modified: / 11.6.1998 / 17:12:40 / cg" |
|
117 ! |
|
118 |
|
119 pointerSize |
|
120 "answer the size in bytes of a pointer" |
|
121 |
|
122 %{ /* NOCONTEXT */ |
|
123 RETURN(__mkSmallInteger(sizeof(void *))); |
|
124 %}. |
|
125 |
|
126 " |
|
127 self pointerSize |
|
128 " |
115 ! ! |
129 ! ! |
116 |
130 |
117 !ExternalAddress methodsFor:'accessing'! |
131 !ExternalAddress methodsFor:'accessing'! |
118 |
132 |
119 address |
133 address |
198 %} |
212 %} |
199 ! ! |
213 ! ! |
200 |
214 |
201 !ExternalAddress methodsFor:'converting'! |
215 !ExternalAddress methodsFor:'converting'! |
202 |
216 |
|
217 asExternalAddress |
|
218 "convert to an ExternalAddress. |
|
219 Useful to convert subclasses" |
|
220 |
|
221 %{ /* NOCONTEXT */ |
|
222 |
|
223 if (__qClass(self) == @global(ExternalAddress)) { |
|
224 RETURN(self) |
|
225 } |
|
226 RETURN(__MKEXTERNALADDRESS(__INST(address_))); |
|
227 %}. |
|
228 |
|
229 " |
|
230 (ExternalAddress newAddress:16r12345678) asExternalAddress |
|
231 " |
|
232 ! |
|
233 |
203 asExternalBytes |
234 asExternalBytes |
204 "return an ExternalBytes object pointing to where the receiver points to. |
235 "return an ExternalBytes object pointing to where the receiver points to. |
205 Use of this is not recommended; primitives which return externalAddresses |
236 Use of this is not recommended; primitives which return externalAddresses |
206 dont think that access to the memory is required/useful, while primitives |
237 dont think that access to the memory is required/useful, while primitives |
207 which do think so should return an externalBytes instance right away." |
238 which do think so should return an externalBytes instance right away." |
208 |
239 |
209 ^ ExternalBytes address:(self address) |
240 %{ /* NOCONTEXT */ |
|
241 |
|
242 RETURN(__MKEXTERNALBYTES(__INST(address_))); |
|
243 %} |
|
244 |
|
245 " |
|
246 (ExternalAddress newAddress:16r12345678) asExternalBytes |
|
247 " |
210 ! ! |
248 ! ! |
211 |
249 |
212 !ExternalAddress methodsFor:'printing & storing'! |
250 !ExternalAddress methodsFor:'printing & storing'! |
213 |
251 |
214 displayString |
252 displayString |
238 ! ! |
276 ! ! |
239 |
277 |
240 !ExternalAddress class methodsFor:'documentation'! |
278 !ExternalAddress class methodsFor:'documentation'! |
241 |
279 |
242 version |
280 version |
243 ^ '$Header: /cvs/stx/stx/libbasic/ExternalAddress.st,v 1.15 1999-09-03 12:33:50 ps Exp $' |
281 ^ '$Header: /cvs/stx/stx/libbasic/ExternalAddress.st,v 1.16 2002-04-09 18:58:14 stefan Exp $' |
244 ! ! |
282 ! ! |