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
      |
      +--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

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

copyright

COPYRIGHT (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.

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
(comment from inherited method)
return true if the receiver is a sharedPool.
False is returned here - the method is only redefined in SharedPool.



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:34:38 GMT