|
Class: SharedPool
Object
|
+--SharedPool
|
+--Nfs4Constants
|
+--SftpConstants
|
+--SunRPC::RPCDefinitions
|
+--UnixOperatingSystem::ELFConstants
|
+--WebSocketConstants
|
+--ZipArchiveConstants
- Package:
- stx:libbasic
- Category:
- Kernel-Classes
- Version:
- rev:
1.29
date: 2021/01/20 13:20:06
- user: cg
- file: SharedPool.st directory: libbasic
- module: stx stc-classLibrary: libbasic
A shared pool represents a set of bindings which are accessible to all classes
which import the pool in its 'pool dictionaries'.
SharedPool is NOT a dictionary but rather a name space.
Bindings are represented by 'class variables' - as long as we have no better way to represent
them at least. This is done to make stc happy (or at least, to not be forced to adapt it
to any new semantics).
copyrightCOPYRIGHT (c) 2004 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
Compatibility-Squeak
-
bindingOf: varName
-
Answer the binding of some variable resolved in the scope of the receiver
-
bindingsDo: aBlock
-
Compatibility-V'Age
-
declareConstant: constantName value: value
-
-
declareVariable: varName
-
code generation
-
initializeFrom: aDictionary
-
given a dictionary, generate my classvars and the init code
Usage example(s):
OLEStatusCodeConstants initializeFrom:aDictionary
|
dictionary protocol
-
associationsDo: aBlock
-
enumerate all keys (= pool var names) with their value
-
do: aBlock
-
enumerate all values
-
includesKey: aSymbol
-
OpenGLConstants includesKey:#GL3Bytes
-
keyAtValue: value ifAbsent: exceptionValue
-
return the key (= pool var name) of a value.
This is a slow access, since the receiver is searched sequentially.
NOTICE:
The value is searched using identity compare;
use #keyAtEqualValue:ifAbsent: to compare for equality.
-
keys
-
retrieve all keys (= pool var names)
Usage example(s):
-
keysAndValuesDo: aBlock
-
enumerate all keys (= pool var names) with their value
-
keysDo: aBlock
-
enumerate all keys (= pool var names)
misc ui support
-
iconInBrowserSymbol
( an extension from the stx:libtool package )
-
the browser will use this as index into the toolbariconlibrary
name lookup
-
at: name
-
retrieve a pool variable by name
-
at: name ifAbsent: aBlock
-
retrieve a pool variable by name
-
at: name put: aValue
-
set a pool variable by name
-
classBindingOf: varName
-
For initialization messages grant the regular scope
printing & storing
-
displayOn: aGCOrStream
-
Compatibility
append a printed description on some stream (Dolphin, Squeak)
OR:
display the receiver in a graphicsContext at 0@0 (ST80).
This method allows for any object to be displayed in some view
(although the fallBack is to display its printString ...)
queries
-
isSharedPool
-
(comment from inherited method)
return true if the receiver is a sharedPool.
False is returned here - the method is only redefined in SharedPool.
|