SharedPool.st
author Claus Gittinger <cg@exept.de>
Wed, 14 Sep 2011 15:48:16 +0200
changeset 13695 278e1b963c87
parent 13682 b8ba89085dc0
child 13997 7aad3af21b76
permissions -rw-r--r--
oops
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8728
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
     1
"
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
     2
 COPYRIGHT (c) 2004 by eXept Software AG
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
     3
              All Rights Reserved
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
     4
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
     5
 This software is furnished under a license and may be used
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
     6
 only in accordance with the terms of that license and with the
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
     8
 be provided or otherwise made available to, or used by, any
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
     9
 other person.  No title to or ownership of the software is
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    10
 hereby transferred.
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    11
"
8538
68e006f46d87 initial checkin
ca
parents:
diff changeset
    12
"{ Package: 'stx:libbasic' }"
68e006f46d87 initial checkin
ca
parents:
diff changeset
    13
68e006f46d87 initial checkin
ca
parents:
diff changeset
    14
Object subclass:#SharedPool
68e006f46d87 initial checkin
ca
parents:
diff changeset
    15
	instanceVariableNames:''
68e006f46d87 initial checkin
ca
parents:
diff changeset
    16
	classVariableNames:''
68e006f46d87 initial checkin
ca
parents:
diff changeset
    17
	poolDictionaries:''
68e006f46d87 initial checkin
ca
parents:
diff changeset
    18
	category:'Kernel-Classes'
68e006f46d87 initial checkin
ca
parents:
diff changeset
    19
!
68e006f46d87 initial checkin
ca
parents:
diff changeset
    20
68e006f46d87 initial checkin
ca
parents:
diff changeset
    21
!SharedPool class methodsFor:'documentation'!
68e006f46d87 initial checkin
ca
parents:
diff changeset
    22
8728
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    23
copyright
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    24
"
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    25
 COPYRIGHT (c) 2004 by eXept Software AG
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    26
              All Rights Reserved
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    27
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    28
 This software is furnished under a license and may be used
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    29
 only in accordance with the terms of that license and with the
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    31
 be provided or otherwise made available to, or used by, any
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    32
 other person.  No title to or ownership of the software is
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    33
 hereby transferred.
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    34
"
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    35
!
d70396dc4e96 copyright
Claus Gittinger <cg@exept.de>
parents: 8551
diff changeset
    36
8538
68e006f46d87 initial checkin
ca
parents:
diff changeset
    37
documentation
68e006f46d87 initial checkin
ca
parents:
diff changeset
    38
"
68e006f46d87 initial checkin
ca
parents:
diff changeset
    39
    A shared pool represents a set of bindings which are accessible to all classes
68e006f46d87 initial checkin
ca
parents:
diff changeset
    40
    which import the pool in its 'pool dictionaries'.
68e006f46d87 initial checkin
ca
parents:
diff changeset
    41
    SharedPool is NOT a dictionary but rather a name space.
68e006f46d87 initial checkin
ca
parents:
diff changeset
    42
    Bindings are represented by 'class variables' - as long as we have no better way to represent
12220
c26b8b402a71 changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 12169
diff changeset
    43
    them at least. This is done to make stc happy (or at least, to not be forced to adapt it
c26b8b402a71 changed: #documentation
Claus Gittinger <cg@exept.de>
parents: 12169
diff changeset
    44
    to any new semantics).
8538
68e006f46d87 initial checkin
ca
parents:
diff changeset
    45
"
68e006f46d87 initial checkin
ca
parents:
diff changeset
    46
! !
68e006f46d87 initial checkin
ca
parents:
diff changeset
    47
13682
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    48
!SharedPool class methodsFor:'Compatibility-Squeak'!
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    49
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    50
bindingOf: varName
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    51
    "Answer the binding of some variable resolved in the scope of the receiver"
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    52
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    53
    | aSymbol binding |
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    54
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    55
    "/ self shouldImplement.       "not yet finished"
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    56
    aSymbol := varName asSymbol.
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    57
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    58
    "First look in classVar dictionary."
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    59
    binding := self classPool bindingOf: aSymbol.
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    60
    binding notNil ifTrue:[^binding].
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    61
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    62
    "Next look in shared pools."
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    63
    self sharedPools do:[:pool |
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    64
        binding := pool bindingOf: aSymbol.
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    65
        binding notNil ifTrue:[^binding].
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    66
    ].
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    67
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    68
    "subclassing and environment are not preserved"
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    69
    ^nil
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    70
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    71
    "Modified: / 12-09-2011 / 09:40:36 / cg"
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    72
!
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    73
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    74
bindingsDo: aBlock
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    75
    self classVarNames do:[:eachKey |
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    76
        aBlock value:(eachKey -> (self classVarAt:eachKey))
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    77
    ].
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    78
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    79
    "Modified: / 12-09-2011 / 09:42:00 / cg"
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    80
! !
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
    81
9091
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    82
!SharedPool class methodsFor:'Compatibility-V''Age'!
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    83
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    84
declareConstant:constantName value:value
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    85
    self == SharedPool ifTrue:[ self error ].
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    86
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    87
    (self classVarNames includes:constantName) ifFalse:[
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    88
        self addClassVarName:constantName
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    89
    ].
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    90
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    91
    self classVarAt:constantName put:value.
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    92
! !
35b746ada800 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8728
diff changeset
    93
13181
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
    94
!SharedPool class methodsFor:'code generation'!
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
    95
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
    96
initializeFrom:aDictionary
13207
5f62183ab0e9 comment/format in: #initializeFrom:
Claus Gittinger <cg@exept.de>
parents: 13181
diff changeset
    97
    "given a dictionary, generate my classvars and the init code"
13181
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
    98
13211
c64d16143d54 changed: #initializeFrom:
Claus Gittinger <cg@exept.de>
parents: 13210
diff changeset
    99
    |sortedNames code|
13181
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   100
13211
c64d16143d54 changed: #initializeFrom:
Claus Gittinger <cg@exept.de>
parents: 13210
diff changeset
   101
    sortedNames := aDictionary keys asSortedCollection.
c64d16143d54 changed: #initializeFrom:
Claus Gittinger <cg@exept.de>
parents: 13210
diff changeset
   102
    self addClassVarNames:sortedNames.
13181
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   103
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   104
    code := String streamContents:[:s |
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   105
        s nextPutLine:'initialize'.
13211
c64d16143d54 changed: #initializeFrom:
Claus Gittinger <cg@exept.de>
parents: 13210
diff changeset
   106
        sortedNames do:[:k |
13181
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   107
            |v|
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   108
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   109
            v := aDictionary at:k.
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   110
            s nextPutLine:('    %1 := %2.' bindWith:k with:v storeString).
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   111
        ].
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   112
    ].
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   113
    self class compile:code classified:'initialization'
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   114
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   115
    "
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   116
     OLEStatusCodeConstants initializeFrom:aDictionary
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   117
    "
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   118
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   119
    "Created: / 21-12-2010 / 17:58:25 / cg"
13211
c64d16143d54 changed: #initializeFrom:
Claus Gittinger <cg@exept.de>
parents: 13210
diff changeset
   120
    "Modified: / 15-01-2011 / 14:20:58 / cg"
13181
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   121
! !
Claus Gittinger <cg@exept.de>
parents: 13097
diff changeset
   122
13097
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   123
!SharedPool class methodsFor:'misc ui support'!
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   124
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   125
iconInBrowserSymbol
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   126
    <resource: #programImage>
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   127
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   128
    self == SharedPool ifTrue:[^ super iconInBrowserSymbol].
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   129
    ^ #sharedPoolBrowserIcon
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   130
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   131
    "Created: / 14-10-2010 / 12:04:32 / cg"
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   132
! !
d07ec91b3105 added: #iconInBrowserSymbol
Claus Gittinger <cg@exept.de>
parents: 13005
diff changeset
   133
8538
68e006f46d87 initial checkin
ca
parents:
diff changeset
   134
!SharedPool class methodsFor:'name lookup'!
68e006f46d87 initial checkin
ca
parents:
diff changeset
   135
12169
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   136
at:name
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   137
    "retrieve a pool variable by name"
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   138
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   139
    ^ self at:name ifAbsent:[self errorKeyNotFound:name]
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   140
!
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   141
10853
72acafda369f dictionary compatible protocol added
Claus Gittinger <cg@exept.de>
parents: 9091
diff changeset
   142
at:name ifAbsent:aBlock
12169
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   143
    "retrieve a pool variable by name"
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   144
10853
72acafda369f dictionary compatible protocol added
Claus Gittinger <cg@exept.de>
parents: 9091
diff changeset
   145
    (self includesKey:name) ifFalse:[^ aBlock value].
72acafda369f dictionary compatible protocol added
Claus Gittinger <cg@exept.de>
parents: 9091
diff changeset
   146
    ^ self classVarAt:name
72acafda369f dictionary compatible protocol added
Claus Gittinger <cg@exept.de>
parents: 9091
diff changeset
   147
!
72acafda369f dictionary compatible protocol added
Claus Gittinger <cg@exept.de>
parents: 9091
diff changeset
   148
13661
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   149
at:name put:aValue
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   150
    "set a pool variable by name"
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   151
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   152
    ^ self classVarAt:name put:aValue
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   153
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   154
    "Created: / 08-09-2011 / 05:48:16 / cg"
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   155
!
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   156
8538
68e006f46d87 initial checkin
ca
parents:
diff changeset
   157
classBindingOf: varName
68e006f46d87 initial checkin
ca
parents:
diff changeset
   158
    "For initialization messages grant the regular scope"
68e006f46d87 initial checkin
ca
parents:
diff changeset
   159
11305
83f14d00b6a7 Change #halt: to #shouldImplement or #assert:
Stefan Vogel <sv@exept.de>
parents: 10853
diff changeset
   160
    self shouldImplement.       "not yet finished"
83f14d00b6a7 Change #halt: to #shouldImplement or #assert:
Stefan Vogel <sv@exept.de>
parents: 10853
diff changeset
   161
    ^ super bindingOf: varName
8551
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   162
!
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   163
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   164
includesKey:aSymbol
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   165
    ^ self keys includes:aSymbol
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   166
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   167
    "
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   168
     OpenGLConstants includesKey:#GL3Bytes
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   169
    "
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   170
!
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   171
13661
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   172
keyAtValue:value ifAbsent:exceptionValue
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   173
    self keysDo:[:k |
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   174
        (self at:k) == value ifTrue:[ ^ k ].
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   175
    ].
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   176
    ^ exceptionValue value
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   177
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   178
    "Created: / 08-09-2011 / 05:51:10 / cg"
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   179
!
Claus Gittinger <cg@exept.de>
parents: 13211
diff changeset
   180
8551
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   181
keys
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   182
    ^ self classVarNames
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   183
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   184
    "
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   185
     OpenGLConstants keys
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   186
    "
10853
72acafda369f dictionary compatible protocol added
Claus Gittinger <cg@exept.de>
parents: 9091
diff changeset
   187
!
72acafda369f dictionary compatible protocol added
Claus Gittinger <cg@exept.de>
parents: 9091
diff changeset
   188
72acafda369f dictionary compatible protocol added
Claus Gittinger <cg@exept.de>
parents: 9091
diff changeset
   189
keysDo:aBlock
72acafda369f dictionary compatible protocol added
Claus Gittinger <cg@exept.de>
parents: 9091
diff changeset
   190
    ^ self keys do:aBlock
8551
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   191
! !
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   192
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   193
!SharedPool class methodsFor:'printing & storing'!
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   194
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   195
displayString
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   196
    "return a printed represenation - here, a reminder is appended,
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   197
     that this is not a regular class"
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   198
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   199
    self == SharedPool ifTrue:[
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   200
        ^ super displayString
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   201
    ].
de314b9f8fa3 sharedPools
ca
parents: 8538
diff changeset
   202
    ^ self name , ' (* SharedPool *)'
8538
68e006f46d87 initial checkin
ca
parents:
diff changeset
   203
! !
68e006f46d87 initial checkin
ca
parents:
diff changeset
   204
68e006f46d87 initial checkin
ca
parents:
diff changeset
   205
!SharedPool class methodsFor:'queries'!
68e006f46d87 initial checkin
ca
parents:
diff changeset
   206
68e006f46d87 initial checkin
ca
parents:
diff changeset
   207
isSharedPool
68e006f46d87 initial checkin
ca
parents:
diff changeset
   208
    ^ self ~~ SharedPool
68e006f46d87 initial checkin
ca
parents:
diff changeset
   209
! !
68e006f46d87 initial checkin
ca
parents:
diff changeset
   210
68e006f46d87 initial checkin
ca
parents:
diff changeset
   211
!SharedPool class methodsFor:'documentation'!
68e006f46d87 initial checkin
ca
parents:
diff changeset
   212
68e006f46d87 initial checkin
ca
parents:
diff changeset
   213
version
13682
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
   214
    ^ '$Header: /cvs/stx/stx/libbasic/SharedPool.st,v 1.18 2011-09-12 08:22:19 cg Exp $'
12169
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   215
!
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   216
8fcbd9a9237e added: #at:
Claus Gittinger <cg@exept.de>
parents: 11305
diff changeset
   217
version_CVS
13682
b8ba89085dc0 category of:
Claus Gittinger <cg@exept.de>
parents: 13681
diff changeset
   218
    ^ '$Header: /cvs/stx/stx/libbasic/SharedPool.st,v 1.18 2011-09-12 08:22:19 cg Exp $'
8538
68e006f46d87 initial checkin
ca
parents:
diff changeset
   219
! !