1 " |
1 " |
2 COPYRIGHT (c) 1993 by Claus Gittinger |
2 COPYRIGHT (c) 1993 by Claus Gittinger |
3 All Rights Reserved |
3 All Rights Reserved |
4 |
4 |
5 This software is furnished under a license and may be used |
5 This software is furnished under a license and may be used |
6 only in accordance with the terms of that license and with the |
6 only in accordance with the terms of that license and with the |
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 |
17 category:'Kernel-Classes' |
17 category:'Kernel-Classes' |
18 ! |
18 ! |
19 |
19 |
20 ClassDescription comment:' |
20 ClassDescription comment:' |
21 COPYRIGHT (c) 1993 by Claus Gittinger |
21 COPYRIGHT (c) 1993 by Claus Gittinger |
22 All Rights Reserved |
22 All Rights Reserved |
23 |
23 |
24 $Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.8 1994-08-05 00:54:15 claus Exp $ |
24 $Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.9 1994-10-10 00:22:34 claus Exp $ |
25 '! |
25 '! |
26 |
26 |
27 !ClassDescription class methodsFor:'documentation'! |
27 !ClassDescription class methodsFor:'documentation'! |
28 |
28 |
29 copyright |
29 copyright |
30 " |
30 " |
31 COPYRIGHT (c) 1993 by Claus Gittinger |
31 COPYRIGHT (c) 1993 by Claus Gittinger |
32 All Rights Reserved |
32 All Rights Reserved |
33 |
33 |
34 This software is furnished under a license and may be used |
34 This software is furnished under a license and may be used |
35 only in accordance with the terms of that license and with the |
35 only in accordance with the terms of that license and with the |
36 inclusion of the above copyright notice. This software may not |
36 inclusion of the above copyright notice. This software may not |
37 be provided or otherwise made available to, or used by, any |
37 be provided or otherwise made available to, or used by, any |
174 value := (value bitShift:3) + ((self class instSize - Class instSize) bitAnd:7). |
174 value := (value bitShift:3) + ((self class instSize - Class instSize) bitAnd:7). |
175 value := (value bitShift:7) + (self instSize bitAnd:16r7F). |
175 value := (value bitShift:7) + (self instSize bitAnd:16r7F). |
176 |
176 |
177 nameKey := 0. |
177 nameKey := 0. |
178 self allInstVarNames do:[:name | |
178 self allInstVarNames do:[:name | |
179 nameKey := nameKey bitShift:1. |
179 nameKey := nameKey bitShift:1. |
180 (nameKey bitAnd:16r10000) ~~ 0 ifTrue:[ |
180 (nameKey bitAnd:16r10000) ~~ 0 ifTrue:[ |
181 nameKey := nameKey bitXor:1. |
181 nameKey := nameKey bitXor:1. |
182 nameKey := nameKey bitAnd:16rFFFF. |
182 nameKey := nameKey bitAnd:16rFFFF. |
183 ]. |
183 ]. |
184 nameKey := (nameKey + (name at:1) asciiValue) bitAnd:16rFFFF. |
184 nameKey := (nameKey + (name at:1) asciiValue) bitAnd:16rFFFF. |
185 ]. |
185 ]. |
186 value := value + (nameKey bitShift:14). |
186 value := value + (nameKey bitShift:14). |
187 signature := value. |
187 signature := value. |
188 ^ value |
188 ^ value |
189 |
189 |
260 |
260 |
261 displayString |
261 displayString |
262 "return a string for display in inspoectors" |
262 "return a string for display in inspoectors" |
263 |
263 |
264 category == #obsolete ifTrue:[ |
264 category == #obsolete ifTrue:[ |
265 "add obsolete - to make life easier ..." |
265 "add obsolete - to make life easier ..." |
266 ^ super displayString , ' (obsolete)' |
266 ^ self name "super displayString" , ' (obsolete)' |
267 ]. |
267 ]. |
268 ^ super displayString |
268 category == #removed ifTrue:[ |
|
269 "add removed - to make life easier ..." |
|
270 ^ self name "super displayString" , ' (removed)' |
|
271 ]. |
|
272 ^ self name "super displayString" |
269 ! ! |
273 ! ! |
270 |
274 |
271 !ClassDescription methodsFor:'private'! |
275 !ClassDescription methodsFor:'private'! |
272 |
276 |
273 addAllInstVarNamesTo:aCollection |
277 addAllInstVarNamesTo:aCollection |
274 "helper - add the name-strings of the instance variables and of the inst-vars |
278 "helper - add the name-strings of the instance variables and of the inst-vars |
275 of all superclasses to the argument, aCollection. Return aCollection" |
279 of all superclasses to the argument, aCollection. Return aCollection" |
276 |
280 |
277 (superclass notNil) ifTrue:[ |
281 (superclass notNil) ifTrue:[ |
278 superclass addAllInstVarNamesTo:aCollection |
282 superclass addAllInstVarNamesTo:aCollection |
279 ]. |
283 ]. |
280 instvars notNil ifTrue:[ |
284 instvars notNil ifTrue:[ |
281 aCollection addAll:(instvars asCollectionOfWords). |
285 aCollection addAll:(instvars asCollectionOfWords). |
282 ]. |
286 ]. |
283 ^ aCollection |
287 ^ aCollection |
284 ! ! |
288 ! ! |