author | Claus Gittinger <cg@exept.de> |
Thu, 07 Jun 2018 16:23:29 +0200 | |
changeset 23054 | 2f647561edc5 |
parent 22812 | b0111d3bb94e |
child 24239 | 41cb789c936e |
permissions | -rw-r--r-- |
22812 | 1 |
"{ Encoding: utf8 }" |
2 |
||
11910 | 3 |
" |
4 |
COPYRIGHT (c) 2009 by eXept Software AG |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
14 |
"{ Package: 'stx:libbasic' }" |
|
15 |
||
18460
8c545d355fd2
class: InlineObjectClassDescription
Claus Gittinger <cg@exept.de>
parents:
16435
diff
changeset
|
16 |
"{ NameSpace: Smalltalk }" |
8c545d355fd2
class: InlineObjectClassDescription
Claus Gittinger <cg@exept.de>
parents:
16435
diff
changeset
|
17 |
|
11910 | 18 |
ClassDescription subclass:#InlineObjectClassDescription |
19 |
instanceVariableNames:'' |
|
20 |
classVariableNames:'' |
|
21 |
poolDictionaries:'' |
|
22812 | 22 |
category:'Kernel-Classes' |
11910 | 23 |
! |
24 |
||
25 |
!InlineObjectClassDescription class methodsFor:'documentation'! |
|
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 2009 by eXept Software AG |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
22812 | 39 |
! |
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
inline objects are an experimental feature in ST/X |
|
44 |
(and currently not used by the system). |
|
45 |
The are created by the parsers/compilers with the following |
|
46 |
syntax: |
|
47 |
#{ |
|
48 |
<slotName>: value . |
|
49 |
... |
|
50 |
} |
|
51 |
i.e. similar to the brace-array construct { expr1 . ... } |
|
52 |
For every inline object, an anonymous class is created, |
|
53 |
providing getters and setters for the slots. |
|
54 |
(if literal objects are immutable (which is the default), |
|
55 |
no setters are generated) |
|
56 |
||
57 |
You cannot add any semantic (i.e. methods) to inline objects - |
|
58 |
they are only useful as containers with a nicer protocol |
|
59 |
as compared to dictionaries or arrays. |
|
60 |
||
61 |
All such created classes will be subclasses of me. |
|
62 |
||
63 |
[example:] |
|
64 |
|foo| |
|
65 |
||
66 |
foo := #{ foo: 'foo value' . |
|
67 |
bar: 'bar value' . |
|
68 |
baz: 'and obviously: a baz value' }. |
|
69 |
foo bar. |
|
70 |
foo baz. |
|
71 |
foo inspect. |
|
72 |
" |
|
11910 | 73 |
! ! |
74 |
||
75 |
!InlineObjectClassDescription methodsFor:'queries'! |
|
76 |
||
77 |
name |
|
78 |
"although inline objects have no name, we return something |
|
79 |
useful here - there are many places (inspectors) where |
|
80 |
a classes name is asked for." |
|
81 |
||
16435
0ee7eff89dd7
class: InlineObjectClassDescription
Claus Gittinger <cg@exept.de>
parents:
13019
diff
changeset
|
82 |
^ #'someInlineObject' |
13019 | 83 |
! |
84 |
||
85 |
nameSpace |
|
86 |
^ nil |
|
87 |
||
88 |
"Created: / 13-08-2010 / 18:23:33 / cg" |
|
22812 | 89 |
! |
90 |
||
91 |
package |
|
92 |
"return libbasic, so the methods of my subclass-instances (i.e. the inline objects) |
|
93 |
are not seen as extensions in the browser)" |
|
94 |
||
95 |
^ InlineObjectClassDescription package |
|
11910 | 96 |
! ! |
97 |
||
98 |
!InlineObjectClassDescription class methodsFor:'documentation'! |
|
99 |
||
100 |
version |
|
18484
e4b3ae6b91fd
class: InlineObjectClassDescription
Claus Gittinger <cg@exept.de>
parents:
18460
diff
changeset
|
101 |
^ '$Header$' |
13019 | 102 |
! |
103 |
||
104 |
version_CVS |
|
18484
e4b3ae6b91fd
class: InlineObjectClassDescription
Claus Gittinger <cg@exept.de>
parents:
18460
diff
changeset
|
105 |
^ '$Header$' |
11910 | 106 |
! ! |
16435
0ee7eff89dd7
class: InlineObjectClassDescription
Claus Gittinger <cg@exept.de>
parents:
13019
diff
changeset
|
107 |