author | Claus Gittinger <cg@exept.de> |
Sat, 21 Sep 1996 16:13:16 +0200 | |
changeset 343 | 3232712d4a28 |
parent 294 | 6f937c0ba907 |
child 429 | ffc4e2ab5581 |
permissions | -rw-r--r-- |
283 | 1 |
" |
2 |
COPYRIGHT (c) 1996 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
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 |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
282 | 13 |
Object subclass:#Structure |
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
14 |
instanceVariableNames:'superclass flags methodDictionary otherSupers instSize i1 i2 i3 |
343 | 15 |
i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 |
16 |
i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 |
|
17 |
i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50' |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
18 |
classVariableNames:'OneInstance DummyClass ReadAccessMethods WriteAccessMethods |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
19 |
OtherMethods' |
282 | 20 |
poolDictionaries:'' |
283 | 21 |
category:'Programming-Support' |
282 | 22 |
! |
23 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
24 |
!Structure class methodsFor:'documentation'! |
282 | 25 |
|
283 | 26 |
copyright |
27 |
" |
|
28 |
COPYRIGHT (c) 1996 by Claus Gittinger |
|
29 |
All Rights Reserved |
|
30 |
||
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
! |
|
39 |
||
282 | 40 |
documentation |
41 |
" |
|
42 |
are you tired of using arrays or identityDictionaries, when |
|
43 |
multiple values have to be returned from some method, AND |
|
44 |
you dont want to add many stupid dummy data-holder classes to |
|
45 |
avoid the above ? |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
46 |
(for example, the value as returned by Method>>who) |
282 | 47 |
|
48 |
Here is a goody to return an object which is class-less, |
|
49 |
only holding some values, and provides a protocol to access |
|
50 |
those fields. In addition, it supports the array-protocol, |
|
51 |
so it can be used as a backward compatible replacement in |
|
52 |
places where arrays were returned. |
|
53 |
||
54 |
For example, in Method>>who, instead of returning: |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
55 |
^ Array with:cls with:selector |
282 | 56 |
you can also return: |
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
57 |
^ Structure with:#containingClass->cls with:#selector->selector |
282 | 58 |
|
59 |
and access these values either as: |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
60 |
retVal at:1 -> returns the cls |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
61 |
retVal at:2 -> returns the selector |
282 | 62 |
or (much more convenient and readable) as: |
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
63 |
retVal containingClass |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
64 |
retVal selector |
282 | 65 |
|
66 |
implementation note: |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
67 |
this is a very tricky (but fully legal) implementation, |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
68 |
creating an objects which is its own class. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
69 |
Therefore, no additional overhead by extra objects is involved. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
70 |
|
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
71 |
Another prove that smalltalk is a powerful & flexible programming language. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
72 |
However, some smalltalk systems crash if your try this ;-) |
282 | 73 |
|
343 | 74 |
CAVEAT: |
75 |
a maximum of 50 instance variables is allowed. |
|
76 |
||
282 | 77 |
[author:] |
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
78 |
Claus Gittinger |
282 | 79 |
|
80 |
[see also:] |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
81 |
Array |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
82 |
Behavior |
282 | 83 |
" |
84 |
! |
|
85 |
||
86 |
examples |
|
87 |
" |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
88 |
access is possibly by name: |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
89 |
[exBegin] |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
90 |
Transcript showCR: |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
91 |
(Structure with:#foo->'foo value') foo |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
92 |
[exEnd] |
282 | 93 |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
94 |
AND also by index (for backward compatibility): |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
95 |
[exBegin] |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
96 |
Transcript showCR: |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
97 |
((Structure with:#foo->'foo value') at:1) |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
98 |
[exEnd] |
282 | 99 |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
100 |
it can be inspected: |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
101 |
[exBegin] |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
102 |
(Structure with:#foo->'foo value') inspect |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
103 |
[exEnd] |
282 | 104 |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
105 |
and presents its contents nicely: |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
106 |
[exBegin] |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
107 |
(Structure with:#foo->'foo value' with:#bar->'bar value') inspect |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
108 |
[exEnd] |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
109 |
|
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
110 |
[exBegin] |
282 | 111 |
(Structure with:#foo->'hello' with:#bar->true with:#baz->'world') inspect |
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
112 |
[exEnd] |
282 | 113 |
|
114 |
" |
|
115 |
! ! |
|
116 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
117 |
!Structure class methodsFor:'initialization'! |
282 | 118 |
|
119 |
initialize |
|
120 |
OneInstance isNil ifTrue:[ |
|
121 |
OneInstance := self basicNew. |
|
122 |
||
123 |
DummyClass := Behavior shallowCopy. |
|
124 |
DummyClass flags:(Behavior flagBehavior bitOr:Behavior flagPointers). |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
125 |
|
343 | 126 |
ReadAccessMethods := (1 to:50) |
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
127 |
collect:[:i | |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
128 |
(self compiledMethodAt:('i', i printString) asSymbol) |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
129 |
]. |
343 | 130 |
WriteAccessMethods := (1 to:50) |
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
131 |
collect:[:i | |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
132 |
(self compiledMethodAt:('i', i printString,':') asSymbol) |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
133 |
]. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
134 |
|
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
135 |
OtherMethods := Array new:6. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
136 |
OtherMethods at:1 put:(self compiledMethodAt:#doesNotUnderstand:). |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
137 |
OtherMethods at:2 put:(Object compiledMethodAt:#class). |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
138 |
OtherMethods at:3 put:(Object compiledMethodAt:#at:). |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
139 |
OtherMethods at:4 put:(Object compiledMethodAt:#at:put:). |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
140 |
OtherMethods at:5 put:(Object compiledMethodAt:#basicAt:). |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
141 |
OtherMethods at:6 put:(Object compiledMethodAt:#basicAt:put:). |
282 | 142 |
]. |
143 |
||
144 |
" |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
145 |
OneInstance := nil. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
146 |
self initialize. |
282 | 147 |
" |
148 |
||
343 | 149 |
"Modified: 21.9.1996 / 16:01:48 / cg" |
282 | 150 |
! ! |
151 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
152 |
!Structure class methodsFor:'instance creation'! |
282 | 153 |
|
154 |
newWith:names |
|
155 |
"return a new structure containing fields as passed in the names collection. |
|
156 |
The argument must be a sequenceable collection of symbols. |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
157 |
The new structures values are all initialized to nil." |
282 | 158 |
|
159 |
^ self newWith:names values:nil |
|
160 |
||
161 |
" |
|
162 |
Structure newWith:#(foo bar) |
|
163 |
" |
|
164 |
||
165 |
"Created: 13.5.1996 / 20:03:42 / cg" |
|
166 |
! |
|
167 |
||
168 |
newWith:names values:values |
|
169 |
"return a new structure containing fields as passed in the names collection. |
|
170 |
The argument must be a sequenceable collection of symbols. |
|
171 |
The new structures values are set to corresponding values from the second argument, values." |
|
172 |
||
173 |
|cls arr sels mthds dummyClass| |
|
174 |
||
175 |
sels := names collect:[:nm | nm asSymbol]. |
|
176 |
sels := sels , (names collect:[:nm | (nm , ':') asSymbol]). |
|
177 |
sels := sels , #(#doesNotUnderstand: #class #at: #at:put: #basicAt: #basicAt:put:). |
|
178 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
179 |
mthds := ReadAccessMethods copyTo:names size. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
180 |
mthds := mthds , (WriteAccessMethods copyTo:names size). |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
181 |
mthds := mthds , OtherMethods. |
282 | 182 |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
183 |
"/ create a prototype object as an array ... |
282 | 184 |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
185 |
arr := Array new:(names size + 5). |
282 | 186 |
arr at:1 put:nil. "/ superclass |
187 |
arr at:2 put:(Behavior flagBehavior bitOr:Behavior flagPointers). "/ flags |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
188 |
arr at:3 put:(MethodDictionary withKeys:sels andValues:mthds). "/ selectors & methods |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
189 |
arr at:4 put:nil. "/ other supers |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
190 |
arr at:5 put:5. "/ instSize |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
191 |
|
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
192 |
"/ now, the big trick ... |
282 | 193 |
|
194 |
arr changeClassTo:DummyClass. |
|
195 |
arr changeClassTo:arr. |
|
196 |
||
197 |
values notNil ifTrue:[ |
|
198 |
values keysAndValuesDo:[:i :val | |
|
199 |
arr at:i put:val |
|
200 |
] |
|
201 |
]. |
|
202 |
||
203 |
^ arr. |
|
204 |
||
205 |
" |
|
206 |
Structure newWith:#(foo bar) values:#('foo' 'bar') |
|
207 |
" |
|
208 |
||
209 |
"Created: 13.5.1996 / 20:03:42 / cg" |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
210 |
"Modified: 3.7.1996 / 10:24:43 / cg" |
282 | 211 |
! |
212 |
||
213 |
with:assoc |
|
214 |
"return a new structure with a single field, named to the assocs key, |
|
215 |
and initialized with assocs value." |
|
216 |
||
217 |
^ self newWith:(Array with:assoc key) values:(Array with:assoc value) |
|
218 |
||
219 |
" |
|
220 |
Structure with:#foo->'foo' |
|
221 |
" |
|
222 |
! |
|
223 |
||
224 |
with:assoc1 with:assoc2 |
|
225 |
"return a new structure with two fields, named as defined by the arguments' |
|
226 |
keys, and and initialized with the assocs' values." |
|
227 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
228 |
^ self newWith:(Array with:assoc1 key with:assoc2 key) |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
229 |
values:(Array with:assoc1 value with:assoc2 value) |
282 | 230 |
|
231 |
" |
|
232 |
Structure with:#foo->'foo' with:#bar->'bar' |
|
233 |
" |
|
234 |
! |
|
235 |
||
236 |
with:assoc1 with:assoc2 with:assoc3 |
|
237 |
"return a new structure with three fields, named as defined by the arguments' |
|
238 |
keys, and and initialized with the assocs' values." |
|
239 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
240 |
^ self newWith:(Array with:assoc1 key with:assoc2 key with:assoc3 key) |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
241 |
values:(Array with:assoc1 value with:assoc2 value with:assoc3 value) |
282 | 242 |
|
243 |
" |
|
244 |
Structure with:#foo->'foo' with:#bar->'bar' with:#baz->'baz' |
|
245 |
" |
|
246 |
! |
|
247 |
||
248 |
with:assoc1 with:assoc2 with:assoc3 with:assoc4 |
|
249 |
"return a new structure with four fields, named as defined by the arguments' |
|
250 |
keys, and and initialized with the assocs' values." |
|
251 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
252 |
^ self newWith:(Array with:assoc1 key with:assoc2 key |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
253 |
with:assoc3 key with:assoc4 key) |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
254 |
values:(Array with:assoc1 value with:assoc2 value |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
255 |
with:assoc3 value with:assoc4 value) |
282 | 256 |
|
257 |
" |
|
258 |
Structure with:#foo->'foo' with:#bar->'bar' with:#baz->'baz' with:#hello->'hello' |
|
259 |
" |
|
260 |
! |
|
261 |
||
262 |
with:assoc1 with:assoc2 with:assoc3 with:assoc4 with:assoc5 |
|
263 |
"return a new structure with five fields, named as defined by the arguments' |
|
264 |
keys, and and initialized with the assocs' values." |
|
265 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
266 |
^ self newWith:(Array with:assoc1 key with:assoc2 key |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
267 |
with:assoc3 key with:assoc4 key |
282 | 268 |
with:assoc5 key) |
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
269 |
values:(Array with:assoc1 value with:assoc2 value |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
270 |
with:assoc3 value with:assoc4 value |
282 | 271 |
with:assoc5 value) |
272 |
||
273 |
" |
|
274 |
Structure with:#foo->'foo' with:#bar->'bar' with:#baz->'baz' with:#hello->'hello' with:#world->'world' |
|
275 |
" |
|
276 |
! ! |
|
277 |
||
278 |
!Structure methodsFor:'accessing'! |
|
279 |
||
280 |
flags |
|
281 |
"return the flags - required class protocol" |
|
282 |
||
283 |
^ flags |
|
284 |
||
285 |
"Created: 13.5.1996 / 21:19:23 / cg" |
|
286 |
! |
|
287 |
||
288 |
flags:something |
|
289 |
"set the flags - required class protocol" |
|
290 |
||
291 |
flags := something. |
|
292 |
||
293 |
"Created: 13.5.1996 / 21:19:23 / cg" |
|
294 |
! |
|
295 |
||
296 |
i1 |
|
297 |
"return the first instance variable" |
|
298 |
||
299 |
^ i1 |
|
300 |
||
301 |
"Created: 13.5.1996 / 21:19:25 / cg" |
|
302 |
! |
|
303 |
||
304 |
i10 |
|
305 |
"return i10" |
|
306 |
||
307 |
^ i10 |
|
308 |
||
309 |
"Created: 13.5.1996 / 21:19:27 / cg" |
|
310 |
! |
|
311 |
||
312 |
i10:something |
|
313 |
"set i10" |
|
314 |
||
315 |
i10 := something. |
|
316 |
||
317 |
"Created: 13.5.1996 / 21:19:27 / cg" |
|
318 |
! |
|
319 |
||
320 |
i11 |
|
321 |
"return i11" |
|
322 |
||
323 |
^ i11 |
|
324 |
||
325 |
"Created: 13.5.1996 / 21:19:27 / cg" |
|
326 |
! |
|
327 |
||
328 |
i11:something |
|
329 |
"set i11" |
|
330 |
||
331 |
i11 := something. |
|
332 |
||
333 |
"Created: 13.5.1996 / 21:19:27 / cg" |
|
334 |
! |
|
335 |
||
336 |
i12 |
|
337 |
"return i12" |
|
338 |
||
339 |
^ i12 |
|
340 |
||
341 |
"Created: 13.5.1996 / 21:19:27 / cg" |
|
342 |
! |
|
343 |
||
344 |
i12:something |
|
345 |
"set i12" |
|
346 |
||
347 |
i12 := something. |
|
348 |
||
349 |
"Created: 13.5.1996 / 21:19:27 / cg" |
|
350 |
! |
|
351 |
||
352 |
i13 |
|
353 |
"return i13" |
|
354 |
||
355 |
^ i13 |
|
356 |
||
357 |
"Created: 13.5.1996 / 21:19:28 / cg" |
|
358 |
! |
|
359 |
||
360 |
i13:something |
|
361 |
"set i13" |
|
362 |
||
363 |
i13 := something. |
|
364 |
||
365 |
"Created: 13.5.1996 / 21:19:28 / cg" |
|
366 |
! |
|
367 |
||
368 |
i14 |
|
369 |
"return i14" |
|
370 |
||
371 |
^ i14 |
|
372 |
||
373 |
"Created: 13.5.1996 / 21:19:28 / cg" |
|
374 |
! |
|
375 |
||
376 |
i14:something |
|
377 |
"set i14" |
|
378 |
||
379 |
i14 := something. |
|
380 |
||
381 |
"Created: 13.5.1996 / 21:19:28 / cg" |
|
382 |
! |
|
383 |
||
384 |
i15 |
|
385 |
"return i15" |
|
386 |
||
387 |
^ i15 |
|
388 |
||
389 |
"Created: 13.5.1996 / 21:19:28 / cg" |
|
390 |
! |
|
391 |
||
392 |
i15:something |
|
393 |
"set i15" |
|
394 |
||
395 |
i15 := something. |
|
396 |
||
397 |
"Created: 13.5.1996 / 21:19:28 / cg" |
|
398 |
! |
|
399 |
||
400 |
i16 |
|
401 |
"return i16" |
|
402 |
||
403 |
^ i16 |
|
404 |
||
405 |
"Created: 13.5.1996 / 21:19:28 / cg" |
|
406 |
! |
|
407 |
||
408 |
i16:something |
|
409 |
"set i16" |
|
410 |
||
411 |
i16 := something. |
|
412 |
||
413 |
"Created: 13.5.1996 / 21:19:28 / cg" |
|
414 |
! |
|
415 |
||
416 |
i17 |
|
417 |
"return i17" |
|
418 |
||
419 |
^ i17 |
|
420 |
||
421 |
"Created: 13.5.1996 / 21:19:28 / cg" |
|
422 |
! |
|
423 |
||
424 |
i17:something |
|
425 |
"set i17" |
|
426 |
||
427 |
i17 := something. |
|
428 |
||
429 |
"Created: 13.5.1996 / 21:19:29 / cg" |
|
430 |
! |
|
431 |
||
432 |
i18 |
|
433 |
"return i18" |
|
434 |
||
435 |
^ i18 |
|
436 |
||
437 |
"Created: 13.5.1996 / 21:19:29 / cg" |
|
438 |
! |
|
439 |
||
440 |
i18:something |
|
441 |
"set i18" |
|
442 |
||
443 |
i18 := something. |
|
444 |
||
445 |
"Created: 13.5.1996 / 21:19:29 / cg" |
|
446 |
! |
|
447 |
||
448 |
i19 |
|
449 |
"return i19" |
|
450 |
||
451 |
^ i19 |
|
452 |
||
453 |
"Created: 13.5.1996 / 21:19:29 / cg" |
|
454 |
! |
|
455 |
||
456 |
i19:something |
|
457 |
"set i19" |
|
458 |
||
459 |
i19 := something. |
|
460 |
||
461 |
"Created: 13.5.1996 / 21:19:29 / cg" |
|
462 |
! |
|
463 |
||
464 |
i1:something |
|
465 |
"set i1" |
|
466 |
||
467 |
i1 := something. |
|
468 |
||
469 |
"Created: 13.5.1996 / 21:19:25 / cg" |
|
470 |
! |
|
471 |
||
472 |
i2 |
|
473 |
"return i2" |
|
474 |
||
475 |
^ i2 |
|
476 |
||
477 |
"Created: 13.5.1996 / 21:19:25 / cg" |
|
478 |
! |
|
479 |
||
480 |
i20 |
|
481 |
"return i20" |
|
482 |
||
483 |
^ i20 |
|
484 |
||
485 |
"Created: 13.5.1996 / 21:19:29 / cg" |
|
486 |
! |
|
487 |
||
488 |
i20:something |
|
489 |
"set i20" |
|
490 |
||
491 |
i20 := something. |
|
492 |
||
493 |
"Created: 13.5.1996 / 21:19:29 / cg" |
|
494 |
! |
|
495 |
||
343 | 496 |
i21 |
497 |
"return i21" |
|
498 |
||
499 |
^ i21 |
|
500 |
||
501 |
"Created: 21.9.1996 / 16:06:21 / cg" |
|
502 |
! |
|
503 |
||
504 |
i21:something |
|
505 |
"set i21" |
|
506 |
||
507 |
i21 := something. |
|
508 |
||
509 |
"Created: 21.9.1996 / 16:06:21 / cg" |
|
510 |
! |
|
511 |
||
512 |
i22 |
|
513 |
"return i22" |
|
514 |
||
515 |
^ i22 |
|
516 |
||
517 |
"Created: 21.9.1996 / 16:06:21 / cg" |
|
518 |
! |
|
519 |
||
520 |
i22:something |
|
521 |
"set i22" |
|
522 |
||
523 |
i22 := something. |
|
524 |
||
525 |
"Created: 21.9.1996 / 16:06:21 / cg" |
|
526 |
! |
|
527 |
||
528 |
i23 |
|
529 |
"return i23" |
|
530 |
||
531 |
^ i23 |
|
532 |
||
533 |
"Created: 21.9.1996 / 16:06:21 / cg" |
|
534 |
! |
|
535 |
||
536 |
i23:something |
|
537 |
"set i23" |
|
538 |
||
539 |
i23 := something. |
|
540 |
||
541 |
"Created: 21.9.1996 / 16:06:21 / cg" |
|
542 |
! |
|
543 |
||
544 |
i24 |
|
545 |
"return i24" |
|
546 |
||
547 |
^ i24 |
|
548 |
||
549 |
"Created: 21.9.1996 / 16:06:21 / cg" |
|
550 |
! |
|
551 |
||
552 |
i24:something |
|
553 |
"set i24" |
|
554 |
||
555 |
i24 := something. |
|
556 |
||
557 |
"Created: 21.9.1996 / 16:06:21 / cg" |
|
558 |
! |
|
559 |
||
560 |
i25 |
|
561 |
"return i25" |
|
562 |
||
563 |
^ i25 |
|
564 |
||
565 |
"Created: 21.9.1996 / 16:06:21 / cg" |
|
566 |
! |
|
567 |
||
568 |
i25:something |
|
569 |
"set i25" |
|
570 |
||
571 |
i25 := something. |
|
572 |
||
573 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
574 |
! |
|
575 |
||
576 |
i26 |
|
577 |
"return i26" |
|
578 |
||
579 |
^ i26 |
|
580 |
||
581 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
582 |
! |
|
583 |
||
584 |
i26:something |
|
585 |
"set i26" |
|
586 |
||
587 |
i26 := something. |
|
588 |
||
589 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
590 |
! |
|
591 |
||
592 |
i27 |
|
593 |
"return i27" |
|
594 |
||
595 |
^ i27 |
|
596 |
||
597 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
598 |
! |
|
599 |
||
600 |
i27:something |
|
601 |
"set i27" |
|
602 |
||
603 |
i27 := something. |
|
604 |
||
605 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
606 |
! |
|
607 |
||
608 |
i28 |
|
609 |
"return i28" |
|
610 |
||
611 |
^ i28 |
|
612 |
||
613 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
614 |
! |
|
615 |
||
616 |
i28:something |
|
617 |
"set i28" |
|
618 |
||
619 |
i28 := something. |
|
620 |
||
621 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
622 |
! |
|
623 |
||
624 |
i29 |
|
625 |
"return i29" |
|
626 |
||
627 |
^ i29 |
|
628 |
||
629 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
630 |
! |
|
631 |
||
632 |
i29:something |
|
633 |
"set i29" |
|
634 |
||
635 |
i29 := something. |
|
636 |
||
637 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
638 |
! |
|
639 |
||
282 | 640 |
i2:something |
641 |
"set i2" |
|
642 |
||
643 |
i2 := something. |
|
644 |
||
645 |
"Created: 13.5.1996 / 21:19:25 / cg" |
|
646 |
! |
|
647 |
||
648 |
i3 |
|
649 |
"return i3" |
|
650 |
||
651 |
^ i3 |
|
652 |
||
653 |
"Created: 13.5.1996 / 21:19:25 / cg" |
|
654 |
! |
|
655 |
||
343 | 656 |
i30:something |
657 |
"set i30" |
|
658 |
||
659 |
i30 := something. |
|
660 |
||
661 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
662 |
! |
|
663 |
||
664 |
i31 |
|
665 |
"return i31" |
|
666 |
||
667 |
^ i31 |
|
668 |
||
669 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
670 |
! |
|
671 |
||
672 |
i31:something |
|
673 |
"set i31" |
|
674 |
||
675 |
i31 := something. |
|
676 |
||
677 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
678 |
! |
|
679 |
||
680 |
i32 |
|
681 |
"return i32" |
|
682 |
||
683 |
^ i32 |
|
684 |
||
685 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
686 |
! |
|
687 |
||
688 |
i32:something |
|
689 |
"set i32" |
|
690 |
||
691 |
i32 := something. |
|
692 |
||
693 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
694 |
! |
|
695 |
||
696 |
i33 |
|
697 |
"return i33" |
|
698 |
||
699 |
^ i33 |
|
700 |
||
701 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
702 |
! |
|
703 |
||
704 |
i33:something |
|
705 |
"set i33" |
|
706 |
||
707 |
i33 := something. |
|
708 |
||
709 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
710 |
! |
|
711 |
||
712 |
i34 |
|
713 |
"return i34" |
|
714 |
||
715 |
^ i34 |
|
716 |
||
717 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
718 |
! |
|
719 |
||
720 |
i34:something |
|
721 |
"set i34" |
|
722 |
||
723 |
i34 := something. |
|
724 |
||
725 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
726 |
! |
|
727 |
||
728 |
i35 |
|
729 |
"return i35" |
|
730 |
||
731 |
^ i35 |
|
732 |
||
733 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
734 |
! |
|
735 |
||
736 |
i35:something |
|
737 |
"set i35" |
|
738 |
||
739 |
i35 := something. |
|
740 |
||
741 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
742 |
! |
|
743 |
||
744 |
i36 |
|
745 |
"return i36" |
|
746 |
||
747 |
^ i36 |
|
748 |
||
749 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
750 |
! |
|
751 |
||
752 |
i36:something |
|
753 |
"set i36" |
|
754 |
||
755 |
i36 := something. |
|
756 |
||
757 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
758 |
! |
|
759 |
||
760 |
i37 |
|
761 |
"return i37" |
|
762 |
||
763 |
^ i37 |
|
764 |
||
765 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
766 |
! |
|
767 |
||
768 |
i37:something |
|
769 |
"set i37" |
|
770 |
||
771 |
i37 := something. |
|
772 |
||
773 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
774 |
! |
|
775 |
||
776 |
i38 |
|
777 |
"return i38" |
|
778 |
||
779 |
^ i38 |
|
780 |
||
781 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
782 |
! |
|
783 |
||
784 |
i38:something |
|
785 |
"set i38" |
|
786 |
||
787 |
i38 := something. |
|
788 |
||
789 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
790 |
! |
|
791 |
||
792 |
i39 |
|
793 |
"return i39" |
|
794 |
||
795 |
^ i39 |
|
796 |
||
797 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
798 |
! |
|
799 |
||
800 |
i39:something |
|
801 |
"set i39" |
|
802 |
||
803 |
i39 := something. |
|
804 |
||
805 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
806 |
! |
|
807 |
||
282 | 808 |
i3:something |
809 |
"set i3" |
|
810 |
||
811 |
i3 := something. |
|
812 |
||
813 |
"Created: 13.5.1996 / 21:19:25 / cg" |
|
814 |
! |
|
815 |
||
816 |
i4 |
|
817 |
"return i4" |
|
818 |
||
819 |
^ i4 |
|
820 |
||
821 |
"Created: 13.5.1996 / 21:19:25 / cg" |
|
822 |
! |
|
823 |
||
343 | 824 |
i40:something |
825 |
"set i40" |
|
826 |
||
827 |
i40 := something. |
|
828 |
||
829 |
"Created: 21.9.1996 / 16:06:22 / cg" |
|
830 |
! |
|
831 |
||
832 |
i41 |
|
833 |
"return i41" |
|
834 |
||
835 |
^ i41 |
|
836 |
||
837 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
838 |
! |
|
839 |
||
840 |
i41:something |
|
841 |
"set i41" |
|
842 |
||
843 |
i41 := something. |
|
844 |
||
845 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
846 |
! |
|
847 |
||
848 |
i42 |
|
849 |
"return i42" |
|
850 |
||
851 |
^ i42 |
|
852 |
||
853 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
854 |
! |
|
855 |
||
856 |
i42:something |
|
857 |
"set i42" |
|
858 |
||
859 |
i42 := something. |
|
860 |
||
861 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
862 |
! |
|
863 |
||
864 |
i43 |
|
865 |
"return i43" |
|
866 |
||
867 |
^ i43 |
|
868 |
||
869 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
870 |
! |
|
871 |
||
872 |
i43:something |
|
873 |
"set i43" |
|
874 |
||
875 |
i43 := something. |
|
876 |
||
877 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
878 |
! |
|
879 |
||
880 |
i44 |
|
881 |
"return i44" |
|
882 |
||
883 |
^ i44 |
|
884 |
||
885 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
886 |
! |
|
887 |
||
888 |
i44:something |
|
889 |
"set i44" |
|
890 |
||
891 |
i44 := something. |
|
892 |
||
893 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
894 |
! |
|
895 |
||
896 |
i45 |
|
897 |
"return i45" |
|
898 |
||
899 |
^ i45 |
|
900 |
||
901 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
902 |
! |
|
903 |
||
904 |
i45:something |
|
905 |
"set i45" |
|
906 |
||
907 |
i45 := something. |
|
908 |
||
909 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
910 |
! |
|
911 |
||
912 |
i46 |
|
913 |
"return i46" |
|
914 |
||
915 |
^ i46 |
|
916 |
||
917 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
918 |
! |
|
919 |
||
920 |
i46:something |
|
921 |
"set i46" |
|
922 |
||
923 |
i46 := something. |
|
924 |
||
925 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
926 |
! |
|
927 |
||
928 |
i47 |
|
929 |
"return i47" |
|
930 |
||
931 |
^ i47 |
|
932 |
||
933 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
934 |
! |
|
935 |
||
936 |
i47:something |
|
937 |
"set i47" |
|
938 |
||
939 |
i47 := something. |
|
940 |
||
941 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
942 |
! |
|
943 |
||
944 |
i48 |
|
945 |
"return i48" |
|
946 |
||
947 |
^ i48 |
|
948 |
||
949 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
950 |
! |
|
951 |
||
952 |
i48:something |
|
953 |
"set i48" |
|
954 |
||
955 |
i48 := something. |
|
956 |
||
957 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
958 |
! |
|
959 |
||
960 |
i49 |
|
961 |
"return i49" |
|
962 |
||
963 |
^ i49 |
|
964 |
||
965 |
"Created: 21.9.1996 / 16:06:23 / cg" |
|
966 |
! |
|
967 |
||
968 |
i49:something |
|
969 |
"set i49" |
|
970 |
||
971 |
i49 := something. |
|
972 |
||
973 |
"Created: 21.9.1996 / 16:06:24 / cg" |
|
974 |
! |
|
975 |
||
282 | 976 |
i4:something |
977 |
"set i4" |
|
978 |
||
979 |
i4 := something. |
|
980 |
||
981 |
"Created: 13.5.1996 / 21:19:25 / cg" |
|
982 |
! |
|
983 |
||
984 |
i5 |
|
985 |
"return i5" |
|
986 |
||
987 |
^ i5 |
|
988 |
||
989 |
"Created: 13.5.1996 / 21:19:26 / cg" |
|
990 |
! |
|
991 |
||
343 | 992 |
i50 |
993 |
"return i50" |
|
994 |
||
995 |
^ i50 |
|
996 |
||
997 |
"Created: 21.9.1996 / 16:06:24 / cg" |
|
998 |
! |
|
999 |
||
1000 |
i50:something |
|
1001 |
"set i50" |
|
1002 |
||
1003 |
i50 := something. |
|
1004 |
||
1005 |
"Created: 21.9.1996 / 16:06:24 / cg" |
|
1006 |
! |
|
1007 |
||
282 | 1008 |
i5:something |
1009 |
"set i5" |
|
1010 |
||
1011 |
i5 := something. |
|
1012 |
||
1013 |
"Created: 13.5.1996 / 21:19:26 / cg" |
|
1014 |
! |
|
1015 |
||
1016 |
i6 |
|
1017 |
"return i6" |
|
1018 |
||
1019 |
^ i6 |
|
1020 |
||
1021 |
"Created: 13.5.1996 / 21:19:26 / cg" |
|
1022 |
! |
|
1023 |
||
1024 |
i6:something |
|
1025 |
"set i6" |
|
1026 |
||
1027 |
i6 := something. |
|
1028 |
||
1029 |
"Created: 13.5.1996 / 21:19:26 / cg" |
|
1030 |
! |
|
1031 |
||
1032 |
i7 |
|
1033 |
"return i7" |
|
1034 |
||
1035 |
^ i7 |
|
1036 |
||
1037 |
"Created: 13.5.1996 / 21:19:26 / cg" |
|
1038 |
! |
|
1039 |
||
1040 |
i7:something |
|
1041 |
"set i7" |
|
1042 |
||
1043 |
i7 := something. |
|
1044 |
||
1045 |
"Created: 13.5.1996 / 21:19:26 / cg" |
|
1046 |
! |
|
1047 |
||
1048 |
i8 |
|
1049 |
"return i8" |
|
1050 |
||
1051 |
^ i8 |
|
1052 |
||
1053 |
"Created: 13.5.1996 / 21:19:26 / cg" |
|
1054 |
! |
|
1055 |
||
1056 |
i8:something |
|
1057 |
"set i8" |
|
1058 |
||
1059 |
i8 := something. |
|
1060 |
||
1061 |
"Created: 13.5.1996 / 21:19:26 / cg" |
|
1062 |
! |
|
1063 |
||
1064 |
i9 |
|
1065 |
"return i9" |
|
1066 |
||
1067 |
^ i9 |
|
1068 |
||
1069 |
"Created: 13.5.1996 / 21:19:26 / cg" |
|
1070 |
! |
|
1071 |
||
1072 |
i9:something |
|
1073 |
"set i9" |
|
1074 |
||
1075 |
i9 := something. |
|
1076 |
||
1077 |
"Created: 13.5.1996 / 21:19:27 / cg" |
|
1078 |
! |
|
1079 |
||
1080 |
instSize |
|
1081 |
"return instSize - required class protocol" |
|
1082 |
||
1083 |
^ instSize |
|
1084 |
||
1085 |
"Created: 13.5.1996 / 21:19:24 / cg" |
|
1086 |
! |
|
1087 |
||
1088 |
instSize:something |
|
1089 |
"set instSize - required class protocol" |
|
1090 |
||
1091 |
instSize := something. |
|
1092 |
||
1093 |
"Created: 13.5.1996 / 21:19:25 / cg" |
|
1094 |
! |
|
1095 |
||
1096 |
methodArray |
|
1097 |
"return methodArray - required class protocol" |
|
1098 |
||
1099 |
^ methodArray |
|
1100 |
||
1101 |
"Created: 13.5.1996 / 21:19:24 / cg" |
|
1102 |
! |
|
1103 |
||
1104 |
methodArray:something |
|
1105 |
"set methodArray - required class protocol" |
|
1106 |
||
1107 |
methodArray := something. |
|
1108 |
||
1109 |
"Created: 13.5.1996 / 21:19:24 / cg" |
|
1110 |
! |
|
1111 |
||
1112 |
otherSupers |
|
1113 |
"return otherSupers" |
|
1114 |
||
1115 |
^ otherSupers |
|
1116 |
||
1117 |
"Created: 13.5.1996 / 21:19:24 / cg" |
|
1118 |
! |
|
1119 |
||
1120 |
otherSupers:something |
|
1121 |
"set otherSupers" |
|
1122 |
||
1123 |
otherSupers := something. |
|
1124 |
||
1125 |
"Created: 13.5.1996 / 21:19:24 / cg" |
|
1126 |
! |
|
1127 |
||
1128 |
selectorArray |
|
1129 |
"return selectorArray - required class protocol" |
|
1130 |
||
1131 |
^ selectorArray |
|
1132 |
||
1133 |
"Created: 13.5.1996 / 21:19:24 / cg" |
|
1134 |
! |
|
1135 |
||
1136 |
selectorArray:something |
|
1137 |
"set selectorArray - required class protocol" |
|
1138 |
||
1139 |
selectorArray := something. |
|
1140 |
||
1141 |
"Created: 13.5.1996 / 21:19:24 / cg" |
|
1142 |
! |
|
1143 |
||
1144 |
superclass |
|
1145 |
"return superclass - required class protocol" |
|
1146 |
||
1147 |
^ superclass |
|
1148 |
||
1149 |
"Created: 13.5.1996 / 21:19:23 / cg" |
|
1150 |
! |
|
1151 |
||
1152 |
superclass:something |
|
1153 |
"set superclass - required class protocol" |
|
1154 |
||
1155 |
superclass := something. |
|
1156 |
||
1157 |
"Created: 13.5.1996 / 21:19:23 / cg" |
|
1158 |
! ! |
|
1159 |
||
1160 |
!Structure methodsFor:'stubs'! |
|
1161 |
||
1162 |
doesNotUnderstand:aMessage |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1163 |
"catch unimplemented messages - pass some to the superclass. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1164 |
Notice that although this method calls super messages, |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1165 |
actual instances will have no valid superClass." |
282 | 1166 |
|
1167 |
|sel args names sz s| |
|
1168 |
||
1169 |
"/ instance protocol |
|
1170 |
||
1171 |
sel := aMessage selector. |
|
1172 |
args := aMessage arguments. |
|
1173 |
||
1174 |
sel == #displayString ifTrue:[ |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1175 |
s := WriteStream on:''. |
282 | 1176 |
s nextPutAll:'Structure('. |
1177 |
names := self allInstVarNames. |
|
1178 |
names keysAndValuesDo:[:idx :nm | |
|
1179 |
s nextPutAll:nm; nextPutAll:'->'. |
|
1180 |
s nextPutAll:(self at:idx) displayString. |
|
1181 |
s space |
|
1182 |
]. |
|
1183 |
s nextPutAll:')'. |
|
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1184 |
^ s contents |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1185 |
]. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1186 |
|
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1187 |
sel == #printString ifTrue:[ |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1188 |
^ super printString |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1189 |
]. |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1190 |
|
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1191 |
sel == #printOn: ifTrue:[ |
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1192 |
^ super printOn:(args at:1) |
282 | 1193 |
]. |
1194 |
||
1195 |
sel == #basicInspect ifTrue:[ |
|
1196 |
^ InspectorView openOn:self |
|
1197 |
]. |
|
1198 |
||
1199 |
sel == #inspect ifTrue:[ |
|
1200 |
^ InspectorView openOn:self |
|
1201 |
]. |
|
1202 |
||
1203 |
sel == #instVarAt: ifTrue:[ |
|
1204 |
|nr| |
|
1205 |
||
1206 |
nr := args at:1. |
|
1207 |
nr == 1 ifTrue:[^ i1]. |
|
1208 |
nr == 2 ifTrue:[^ i2]. |
|
1209 |
nr == 3 ifTrue:[^ i3]. |
|
1210 |
nr == 4 ifTrue:[^ i4]. |
|
1211 |
nr == 5 ifTrue:[^ i5]. |
|
1212 |
nr == 6 ifTrue:[^ i6]. |
|
1213 |
^ nil |
|
1214 |
]. |
|
1215 |
||
1216 |
(sel == #size |
|
1217 |
or:[sel == #basicSize]) ifTrue:[ |
|
1218 |
^ super basicSize |
|
1219 |
]. |
|
1220 |
||
1221 |
(sel == #at: |
|
1222 |
or:[sel == #basicAt:]) ifTrue:[ |
|
1223 |
^ super basicAt:(args at:1) |
|
1224 |
]. |
|
1225 |
||
1226 |
(sel == #at:put: |
|
1227 |
or:[sel == #basicAt:put:]) ifTrue:[ |
|
1228 |
^ super basicAt:(args at:1) put:(args at:2) |
|
1229 |
]. |
|
1230 |
||
1231 |
sel == #== ifTrue:[ |
|
1232 |
^ self == (args at:1) |
|
1233 |
]. |
|
1234 |
||
1235 |
"/ class protocol |
|
1236 |
||
1237 |
(sel := aMessage selector) == #name ifTrue:[ |
|
1238 |
^ 'Structure' |
|
1239 |
]. |
|
1240 |
||
1241 |
sel == #instSize ifTrue:[ |
|
1242 |
^ instSize |
|
1243 |
]. |
|
1244 |
||
1245 |
sel == #isVariable ifTrue:[ |
|
1246 |
^ false |
|
1247 |
]. |
|
1248 |
||
1249 |
sel == #isClass ifTrue:[ |
|
1250 |
^ false |
|
1251 |
]. |
|
1252 |
||
1253 |
sel == #isMeta ifTrue:[ |
|
1254 |
^ false |
|
1255 |
]. |
|
1256 |
||
1257 |
sel == #isBehavior ifTrue:[ |
|
1258 |
^ false |
|
1259 |
]. |
|
1260 |
||
1261 |
sel == #respondsTo: ifTrue:[ |
|
1262 |
(args at:1) printNL. |
|
1263 |
^ false |
|
1264 |
]. |
|
1265 |
||
1266 |
sel == #evaluatorClass ifTrue:[ |
|
1267 |
^ Compiler |
|
1268 |
]. |
|
1269 |
||
1270 |
sel == #classNameWithArticle ifTrue:[ |
|
1271 |
^ self displayString |
|
1272 |
]. |
|
1273 |
||
1274 |
sel == #allSubclasses ifTrue:[ |
|
1275 |
^ #() |
|
1276 |
]. |
|
1277 |
||
1278 |
sel == #allClassVarNames ifTrue:[ |
|
1279 |
^ #() |
|
1280 |
]. |
|
1281 |
||
1282 |
sel == #allInstVarNames ifTrue:[ |
|
1283 |
sz := super basicSize. |
|
1284 |
names := Array new:sz. |
|
1285 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1286 |
methodDictionary copy keysAndValuesDo:[:sel :mthd| |
282 | 1287 |
|index| |
1288 |
(sel endsWith:$:) ifFalse:[ |
|
1289 |
(sel ~~ #class) ifTrue:[ |
|
1290 |
"/ |
|
1291 |
"/ which method is it ? |
|
1292 |
"/ |
|
1293 |
(1 to:20) do:[:i | |
|
1294 |
|mysel| |
|
1295 |
||
1296 |
mysel := ('i' , i printString) asSymbol. |
|
1297 |
mthd == (Structure compiledMethodAt:mysel) ifTrue:[ |
|
1298 |
index := i |
|
1299 |
] |
|
1300 |
]. |
|
1301 |
||
1302 |
index isNil ifTrue:[ |
|
1303 |
'oops' printNL. |
|
1304 |
^ nil |
|
1305 |
]. |
|
1306 |
||
1307 |
names at:index put:sel. |
|
1308 |
] |
|
1309 |
] |
|
1310 |
]. |
|
1311 |
"/ must now sort by index ... |
|
1312 |
||
1313 |
^ names |
|
1314 |
]. |
|
1315 |
||
1316 |
aMessage printNL. |
|
1317 |
'args ' print. args printNL. |
|
1318 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1319 |
^ nil. |
282 | 1320 |
|
1321 |
"Created: 13.5.1996 / 20:22:22 / cg" |
|
1322 |
"Modified: 13.5.1996 / 21:12:54 / cg" |
|
1323 |
! ! |
|
1324 |
||
294
6f937c0ba907
fixes for new MethodDictionary
Claus Gittinger <cg@exept.de>
parents:
283
diff
changeset
|
1325 |
!Structure class methodsFor:'documentation'! |
282 | 1326 |
|
1327 |
version |
|
343 | 1328 |
^ '$Header: /cvs/stx/stx/libcomp/Structure.st,v 1.4 1996-09-21 14:13:16 cg Exp $' |
282 | 1329 |
! ! |
1330 |
Structure initialize! |