eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SharedPool':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: SharedPool


Inheritance:

   Object
   |
   +--SharedPool
      |
      +--Nfs4Constants
      |
      +--SftpConstants
      |
      +--UnixOperatingSystem::ELFConstants
      |
      +--ZipArchiveConstants

Package:
stx:libbasic
Category:
Kernel-Classes
Version:
rev: 1.26 date: 2017/05/17 14:50:29
user: mawalch
file: SharedPool.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


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).


Class protocol:

Compatibility-Squeak
o  bindingOf: varName
Answer the binding of some variable resolved in the scope of the receiver

o  bindingsDo: aBlock

Compatibility-V'Age
o  declareConstant: constantName value: value

o  declareVariable: varName

code generation
o  initializeFrom: aDictionary
given a dictionary, generate my classvars and the init code

usage example(s):

     OLEStatusCodeConstants initializeFrom:aDictionary

dictionary protocol
o  associationsDo: aBlock
enumerate all keys (= pool var names) with their value

o  do: aBlock
enumerate all values

o  includesKey: aSymbol
OpenGLConstants includesKey:#GL3Bytes

o  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.

o  keys
retrieve all keys (= pool var names)

usage example(s):

     OpenGLConstants keys

o  keysAndValuesDo: aBlock
enumerate all keys (= pool var names) with their value

o  keysDo: aBlock
enumerate all keys (= pool var names)

misc ui support
o  iconInBrowserSymbol
( an extension from the stx:libtool package )
the browser will use this as index into the toolbariconlibrary

name lookup
o  at: name
retrieve a pool variable by name

o  at: name ifAbsent: aBlock
retrieve a pool variable by name

o  at: name put: aValue
set a pool variable by name

o  classBindingOf: varName
For initialization messages grant the regular scope

printing & storing
o  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
o  isSharedPool



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 28 May 2022 19:16:06 GMT