This is gst-base.info, produced by makeinfo version 4.8 from
/home/bonzinip/smalltalk--stable--2.2--patch-3/+build/doc/../../doc/gst-base-fixed.texi.

INFO-DIR-SECTION GNU Smalltalk
START-INFO-DIR-ENTRY
* Base classes: (gst-base).             The GNU Smalltalk base classes.
END-INFO-DIR-ENTRY

   This file documents GNU Smalltalk Version 2.2.  It was last updated
on 21 November 2005.

   Copyright (C) 1988-92, 1994-95, 1999-2001 Free Software Foundation,
Inc.

   This document is released under the terms of the GNU Free
Documentation License as published by the Free Software Foundation;
either version 1.1, or (at your option) any later version.

   You should have received a copy of the GNU Free Documentation
License along with GNU Smalltalk; see the file `COPYING.DOC'.  If not,
write to the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.

   There are no Cover Texts and no Invariant Sections; this text, along
with its equivalent in the printed manual, constitutes the Title Page.


File: gst-base.info,  Node: Top,  Up: (DIR)

GNU Smalltalk Library Reference
*******************************

GNU Smalltalk Library Reference

   This document describes the class libraries that are distributed
together with the GNU Smalltalk programming language.

   This file documents GNU Smalltalk Version 2.2.  It was last updated
on 21 November 2005.

   Copyright (C) 1988-92, 1994-95, 1999-2001 Free Software Foundation,
Inc.

   This document is released under the terms of the GNU Free
Documentation License as published by the Free Software Foundation;
either version 1.1, or (at your option) any later version.

   You should have received a copy of the GNU Free Documentation
License along with GNU Smalltalk; see the file `COPYING.DOC'.  If not,
write to the Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.

   There are no Cover Texts and no Invariant Sections; this text, along
with its equivalent in the printed manual, constitutes the Title Page.

* Menu:

* Base classes::        The class reference

* Class index::         Index to the classes in the class reference
* Method index::        Index to the method selectors in the class reference
* Cross-reference::     Cross-reference between selectors


File: gst-base.info,  Node: Base classes,  Next: Class index,  Prev: Top,  Up: Top

1 Base classes
**************

* Menu:


Alphabetic list:
* AbstractNamespace::
* AlternativeObjectProxy::
* ArithmeticError::
* Array::
* ArrayedCollection::
* Association::
* Autoload::
* AutoloadClass::
* Bag::
* Behavior::
* BindingDictionary::
* BlockClosure::
* BlockContext::
* Boolean::
* ByteArray::
* ByteStream::
* CAggregate::
* CallinProcess::
* CArray::
* CArrayCType::
* CBoolean::
* CByte::
* CChar::
* CCompound::
* CDouble::
* CFloat::
* CFunctionDescriptor::
* Character::
* CharacterArray::
* CInt::
* Class::
* ClassDescription::
* CLong::
* CLongDouble::
* CObject::
* Collection::
* CompiledBlock::
* CompiledCode::
* CompiledMethod::
* ContextPart::
* CoreException::
* CPtr::
* CPtrCType::
* CScalar::
* CScalarCType::
* CShort::
* CSmalltalk::
* CString::
* CStringCType::
* CStruct::
* CType::
* CUChar::
* CUInt::
* CULong::
* CUnion::
* CUShort::
* Date::
* DateTime::
* Delay::
* DelayedAdaptor::
* Dictionary::
* DirectedMessage::
* Directory::
* DLD::
* DumperProxy::
* Duration::
* Error::
* Exception::
* ExceptionSet::
* False::
* File::
* FileDescriptor::
* FileSegment::
* FileStream::
* Float::
* FloatD::
* FloatE::
* FloatQ::
* Fraction::
* Halt::
* HashedCollection::
* HomedAssociation::
* IdentityDictionary::
* IdentitySet::
* Integer::
* Interval::
* LargeArray::
* LargeArrayedCollection::
* LargeArraySubpart::
* LargeByteArray::
* LargeInteger::
* LargeNegativeInteger::
* LargePositiveInteger::
* LargeWordArray::
* LargeZeroInteger::
* Link::
* LinkedList::
* LookupKey::
* LookupTable::
* Magnitude::
* MappedCollection::
* Memory::
* Message::
* MessageNotUnderstood::
* Metaclass::
* MethodContext::
* MethodDictionary::
* MethodInfo::
* Namespace::
* NetClients.URIResolver::
* NetClients.URL::
* Notification::
* NullProxy::
* NullValueHolder::
* Number::
* Object::
* ObjectDumper::
* ObjectMemory::
* OrderedCollection::
* Package::
* PackageLoader::
* Permission::
* PluggableAdaptor::
* PluggableProxy::
* Point::
* PositionableStream::
* Process::
* ProcessorScheduler::
* Promise::
* Random::
* ReadStream::
* ReadWriteStream::
* Rectangle::
* RecursionLock::
* RootNamespace::
* RoundRobinStream::
* RunArray::
* ScaledDecimal::
* SecurityPolicy::
* Semaphore::
* SequenceableCollection::
* Set::
* SharedQueue::
* Signal::
* SingletonProxy::
* SmallInteger::
* SortedCollection::
* Stream::
* String::
* Symbol::
* SymLink::
* SystemDictionary::
* SystemExceptions.AlreadyDefined::
* SystemExceptions.ArgumentOutOfRange::
* SystemExceptions.BadReturn::
* SystemExceptions.CInterfaceError::
* SystemExceptions.EmptyCollection::
* SystemExceptions.EndOfStream::
* SystemExceptions.FileError::
* SystemExceptions.IndexOutOfRange::
* SystemExceptions.InvalidArgument::
* SystemExceptions.InvalidProcessState::
* SystemExceptions.InvalidSize::
* SystemExceptions.InvalidValue::
* SystemExceptions.MustBeBoolean::
* SystemExceptions.MutationError::
* SystemExceptions.NoRunnableProcess::
* SystemExceptions.NotEnoughElements::
* SystemExceptions.NotFound::
* SystemExceptions.NotImplemented::
* SystemExceptions.NotIndexable::
* SystemExceptions.NotYetImplemented::
* SystemExceptions.PrimitiveFailed::
* SystemExceptions.ProcessBeingTerminated::
* SystemExceptions.ProcessTerminated::
* SystemExceptions.ReadOnlyObject::
* SystemExceptions.SecurityError::
* SystemExceptions.ShouldNotImplement::
* SystemExceptions.SubclassResponsibility::
* SystemExceptions.UserInterrupt::
* SystemExceptions.VerificationError::
* SystemExceptions.VMError::
* SystemExceptions.WrongArgumentCount::
* SystemExceptions.WrongClass::
* SystemExceptions.WrongMessageSent::
* TextCollector::
* Time::
* TokenStream::
* TrappableEvent::
* True::
* UndefinedObject::
* ValueAdaptor::
* ValueHolder::
* VariableBinding::
* VersionableObjectProxy::
* VFS.ArchiveFileHandler::
* VFS.ArchiveMemberHandler::
* VFS.DecodedFileHandler::
* VFS.ExternalArchiveFileHandler::
* VFS.RealFileHandler::
* VFS.VFSHandler::
* Warning::
* WeakArray::
* WeakIdentitySet::
* WeakKeyDictionary::
* WeakKeyIdentityDictionary::
* WeakSet::
* WeakValueIdentityDictionary::
* WeakValueLookupTable::
* WordArray::
* WriteStream::
* ZeroDivide::


Class tree:
* Autoload::
* AutoloadClass::
* Object::
*   Behavior::
*     ClassDescription::
*       Class::
*       Metaclass::
*   BlockClosure::
*   Boolean::
*     False::
*     True::
*   CFunctionDescriptor::
*   CObject::
*     CAggregate::
*       CArray::
*       CPtr::
*         CString::
*     CCompound::
*       CStruct::
*       CUnion::
*     CScalar::
*       CChar::
*       CDouble::
*       CFloat::
*       CInt::
*       CLong::
*       CLongDouble::
*       CShort::
*       CSmalltalk::
*       CUChar::
*         CByte::
*           CBoolean::
*       CUInt::
*       CULong::
*       CUShort::
*   Collection::
*     Bag::
*     HashedCollection::
*       Dictionary::
*         BindingDictionary::
*           AbstractNamespace::
*             Namespace::
*             RootNamespace::
*               SystemDictionary::
*         LookupTable::
*           IdentityDictionary::
*           MethodDictionary::
*           WeakValueLookupTable::
*             WeakValueIdentityDictionary::
*         WeakKeyDictionary::
*           WeakKeyIdentityDictionary::
*       Set::
*         IdentitySet::
*         WeakSet::
*           WeakIdentitySet::
*     MappedCollection::
*     SequenceableCollection::
*       ArrayedCollection::
*         Array::
*           WeakArray::
*         ByteArray::
*         CharacterArray::
*           String::
*             Symbol::
*         CompiledCode::
*           CompiledBlock::
*           CompiledMethod::
*         Interval::
*         LargeArrayedCollection::
*           LargeArray::
*           LargeByteArray::
*           LargeWordArray::
*         WordArray::
*       LinkedList::
*         Semaphore::
*       OrderedCollection::
*         RunArray::
*         SortedCollection::
*   ContextPart::
*     BlockContext::
*     MethodContext::
*   CType::
*     CPtrCType::
*       CArrayCType::
*     CScalarCType::
*       CStringCType::
*   Delay::
*   DLD::
*   DumperProxy::
*     AlternativeObjectProxy::
*       NullProxy::
*         VersionableObjectProxy::
*       PluggableProxy::
*       SingletonProxy::
*   File::
*     Directory::
*   FileSegment::
*   Link::
*     Process::
*       CallinProcess::
*     SymLink::
*   Magnitude::
*     Character::
*     Date::
*       DateTime::
*     LargeArraySubpart::
*     LookupKey::
*       Association::
*         HomedAssociation::
*           VariableBinding::
*     Number::
*       Float::
*         FloatD::
*         FloatE::
*         FloatQ::
*       Fraction::
*       Integer::
*         LargeInteger::
*           LargeNegativeInteger::
*           LargePositiveInteger::
*             LargeZeroInteger::
*         SmallInteger::
*       ScaledDecimal::
*     Time::
*       Duration::
*   Memory::
*   Message::
*     DirectedMessage::
*   MethodInfo::
*   NetClients.URIResolver::
*   NetClients.URL::
*   ObjectMemory::
*   Package::
*   PackageLoader::
*   Permission::
*   Point::
*   ProcessorScheduler::
*   Rectangle::
*   RecursionLock::
*   SecurityPolicy::
*   SharedQueue::
*   Signal::
*     Exception::
*       Error::
*         Halt::
*           ArithmeticError::
*             ZeroDivide::
*           MessageNotUnderstood::
*         SystemExceptions.InvalidValue::
*           SystemExceptions.EmptyCollection::
*           SystemExceptions.InvalidArgument::
*             SystemExceptions.AlreadyDefined::
*             SystemExceptions.ArgumentOutOfRange::
*               SystemExceptions.IndexOutOfRange::
*             SystemExceptions.InvalidSize::
*             SystemExceptions.NotFound::
*           SystemExceptions.InvalidProcessState::
*           SystemExceptions.NotIndexable::
*           SystemExceptions.ProcessTerminated::
*           SystemExceptions.ReadOnlyObject::
*           SystemExceptions.WrongClass::
*             SystemExceptions.MustBeBoolean::
*         SystemExceptions.MutationError::
*         SystemExceptions.NotEnoughElements::
*         SystemExceptions.NotImplemented::
*           SystemExceptions.NotYetImplemented::
*           SystemExceptions.ShouldNotImplement::
*             SystemExceptions.SubclassResponsibility::
*             SystemExceptions.WrongMessageSent::
*         SystemExceptions.VMError::
*           SystemExceptions.BadReturn::
*           SystemExceptions.NoRunnableProcess::
*           SystemExceptions.PrimitiveFailed::
*             SystemExceptions.CInterfaceError::
*             SystemExceptions.FileError::
*             SystemExceptions.WrongArgumentCount::
*           SystemExceptions.SecurityError::
*           SystemExceptions.UserInterrupt::
*           SystemExceptions.VerificationError::
*       Notification::
*         SystemExceptions.EndOfStream::
*         SystemExceptions.ProcessBeingTerminated::
*         Warning::
*   Stream::
*     ObjectDumper::
*     PositionableStream::
*       ReadStream::
*       WriteStream::
*         ReadWriteStream::
*           ByteStream::
*             FileDescriptor::
*               FileStream::
*     Random::
*     RoundRobinStream::
*     TextCollector::
*     TokenStream::
*   TrappableEvent::
*     CoreException::
*     ExceptionSet::
*   UndefinedObject::
*   ValueAdaptor::
*     NullValueHolder::
*     PluggableAdaptor::
*       DelayedAdaptor::
*     ValueHolder::
*       Promise::
*   VFS.VFSHandler::
*     VFS.ArchiveMemberHandler::
*     VFS.RealFileHandler::
*       VFS.ArchiveFileHandler::
*         VFS.ExternalArchiveFileHandler::
*       VFS.DecodedFileHandler::


File: gst-base.info,  Node: AbstractNamespace,  Next: AlternativeObjectProxy,  Up: Base classes

1.1 AbstractNamespace
=====================

Defined in namespace Smalltalk
Superclass: BindingDictionary
Category: Language-Implementation
     I am a special form of dictionary.  Classes hold on an instance of
     me; it is called their `environment'.

* Menu:

* AbstractNamespace class-instance creation::  (class)
* AbstractNamespace-accessing::  (instance)
* AbstractNamespace-basic & copying::  (instance)
* AbstractNamespace-copying::  (instance)
* AbstractNamespace-namespace hierarchy::  (instance)
* AbstractNamespace-overrides for superspaces::  (instance)
* AbstractNamespace-printing::  (instance)
* AbstractNamespace-testing::  (instance)


File: gst-base.info,  Node: AbstractNamespace class-instance creation,  Next: AbstractNamespace-accessing,  Up: AbstractNamespace

1.1.1 AbstractNamespace class: instance creation
------------------------------------------------

new
     Disabled - use #new to create instances

primNew: parent name: spaceName
     Private - Create a new namespace with the given name and parent,
     and add to the parent a key that references it.



File: gst-base.info,  Node: AbstractNamespace-accessing,  Next: AbstractNamespace-basic & copying,  Prev: AbstractNamespace class-instance creation,  Up: AbstractNamespace

1.1.2 AbstractNamespace: accessing
----------------------------------

allAssociations
     Answer a Dictionary with all of the associations in the receiver
     and each of its superspaces (duplicate keys are associated to the
     associations that are deeper in the namespace hierarchy)

allBehaviorsDo: aBlock
     Evaluate aBlock once for each class and metaclass in the namespace.

allClassesDo: aBlock
     Evaluate aBlock once for each class in the namespace.

allClassObjectsDo: aBlock
     Evaluate aBlock once for each class and metaclass in the namespace.

allMetaclassesDo: aBlock
     Evaluate aBlock once for each metaclass in the namespace.

classAt: aKey
     Answer the value corrisponding to aKey if it is a class. Fail if
     either aKey is not found or it is associated to something different
     from a class.

classAt: aKey ifAbsent: aBlock
     Answer the value corrisponding to aKey if it is a class. Evaluate
     aBlock and answer its result if either aKey is not found or it is
     associated to something different from a class.



File: gst-base.info,  Node: AbstractNamespace-basic & copying,  Next: AbstractNamespace-copying,  Prev: AbstractNamespace-accessing,  Up: AbstractNamespace

1.1.3 AbstractNamespace: basic & copying
----------------------------------------

= arg
     Answer whether the receiver is equal to arg. The equality test is
     by default the same as that for equal objects. = must not fail;
     answer false if the receiver cannot be compared to arg

hash
     Answer an hash value for the receiver.  This is the same as the
     object's #identityHash.



File: gst-base.info,  Node: AbstractNamespace-copying,  Next: AbstractNamespace-namespace hierarchy,  Prev: AbstractNamespace-basic & copying,  Up: AbstractNamespace

1.1.4 AbstractNamespace: copying
--------------------------------

copyEmpty: newSize
     Answer an empty copy of the receiver whose size is newSize

whileCurrentDo: aBlock
     Evaluate aBlock with the current namespace set to the receiver.
     Answer the result of the evaluation.



File: gst-base.info,  Node: AbstractNamespace-namespace hierarchy,  Next: AbstractNamespace-overrides for superspaces,  Prev: AbstractNamespace-copying,  Up: AbstractNamespace

1.1.5 AbstractNamespace: namespace hierarchy
--------------------------------------------

addSubspace: aSymbol
     Add aNamespace to the set of the receiver's subspaces

allSubassociationsDo: aBlock
     Invokes aBlock once for every association in each of the receiver's
     subspaces.

allSubspaces
     Answer the direct and indirect subspaces of the receiver in a Set

allSubspacesDo: aBlock
     Invokes aBlock for all subspaces, both direct and indirect.

allSuperspaces
     Answer all the receiver's superspaces in a collection

allSuperspacesDo: aBlock
     Evaluate aBlock once for each of the receiver's superspaces

includesClassNamed: aString
     Answer whether the receiver or any of its superspaces include the
     given class - note that this method (unlike #includesKey:) does not
     require aString to be interned and (unlike #includesGlobalNamed:)
     only returns true if the global is a class object.

includesGlobalNamed: aString
     Answer whether the receiver or any of its superspaces include the
     given key - note that this method (unlike #includesKey:) does not
     require aString to be interned but (unlike #includesClassNamed:)
     returns true even if the global is not a class object.

inheritsFrom: aNamespace
     Answer whether aNamespace is one of the receiver's direct and
     indirect superspaces

selectSubspaces: aBlock
     Return a Set of subspaces of the receiver satisfying aBlock.

selectSuperspaces: aBlock
     Return a Set of superspaces of the receiver satisfying aBlock.

siblings
     Answer all the other children of the same namespace as the
     receiver.

siblingsDo: aBlock
     Evaluate aBlock once for each of the other root namespaces,
     passing the namespace as a parameter.

subspaces
     Answer the receiver's direct subspaces

subspacesDo: aBlock
     Invokes aBlock for all direct subspaces.

superspace
     Answer the receiver's superspace.

superspace: aNamespace
     Set the superspace of the receiver to be 'aNamespace'.  Also adds
     the receiver as a subspace of it.

withAllSubspaces
     Answer a Set containing the receiver together with its direct and
     indirect subspaces

withAllSubspacesDo: aBlock
     Invokes aBlock for the receiver and all subclasses, both direct
     and indirect.

withAllSuperspaces
     Answer the receiver and all of its superspaces in a collection

withAllSuperspacesDo: aBlock
     Invokes aBlock for the receiver and all superspaces, both direct
     and indirect.



File: gst-base.info,  Node: AbstractNamespace-overrides for superspaces,  Next: AbstractNamespace-printing,  Prev: AbstractNamespace-namespace hierarchy,  Up: AbstractNamespace

1.1.6 AbstractNamespace: overrides for superspaces
--------------------------------------------------

definedKeys
     Answer a kind of Set containing the keys of the receiver

definesKey: key
     Answer whether the receiver defines the given key. `Defines' means
     that the receiver's superspaces, if any, are not considered.

hereAt: key
     Return the value associated to the variable named as specified by
     `key' *in this namespace*. If the key is not found search will
     *not* be carried on in superspaces and the method will fail.

hereAt: key ifAbsent: aBlock
     Return the value associated to the variable named as specified by
     `key' *in this namespace*. If the key is not found search will
     *not* be carried on in superspaces and aBlock will be immediately
     evaluated.

inheritedKeys
     Answer a Set of all the keys in the receiver and its superspaces

set: key to: newValue
     Assign newValue to the variable named as specified by `key'.  This
     method won't define a new variable; instead if the key is not
     found it will search in superspaces and raising an error if the
     variable cannot be found in any of the superspaces.  Answer
     newValue.

set: key to: newValue ifAbsent: aBlock
     Assign newValue to the variable named as specified by `key'.  This
     method won't define a new variable; instead if the key is not
     found it will search in superspaces and evaluate aBlock if it is
     not found. Answer newValue.

values
     Answer a Bag containing the values of the receiver



File: gst-base.info,  Node: AbstractNamespace-printing,  Next: AbstractNamespace-testing,  Prev: AbstractNamespace-overrides for superspaces,  Up: AbstractNamespace

1.1.7 AbstractNamespace: printing
---------------------------------

name
     Answer the receiver's name

name: aSymbol
     Change the receiver's name to aSymbol

nameIn: aNamespace
     Answer Smalltalk code compiling to the receiver when the current
     namespace is aNamespace

printOn: aStream
     Print a representation of the receiver

storeOn: aStream
     Store Smalltalk code compiling to the receiver



File: gst-base.info,  Node: AbstractNamespace-testing,  Prev: AbstractNamespace-printing,  Up: AbstractNamespace

1.1.8 AbstractNamespace: testing
--------------------------------

isNamespace
     Answer `true'.

isSmalltalk
     Answer `false'.



File: gst-base.info,  Node: AlternativeObjectProxy,  Next: ArithmeticError,  Prev: AbstractNamespace,  Up: Base classes

1.2 AlternativeObjectProxy
==========================

Defined in namespace Smalltalk
Superclass: DumperProxy
Category: Streams-Files
     I am a proxy that uses the same ObjectDumper to store an object
     which is not the object to be dumped, but from which the dumped
     object can be reconstructed.  I am an abstract class, using me
     would result in infinite loops because by default I try to store
     the same object again and again.  See the method comments for more
     information

* Menu:

* AlternativeObjectProxy class-instance creation::  (class)
* AlternativeObjectProxy-accessing::  (instance)


File: gst-base.info,  Node: AlternativeObjectProxy class-instance creation,  Next: AlternativeObjectProxy-accessing,  Up: AlternativeObjectProxy

1.2.1 AlternativeObjectProxy class: instance creation
-----------------------------------------------------

acceptUsageForClass: aClass
     The receiver was asked to be used as a proxy for the class aClass.
     Answer whether the registration is fine.  By default, answer true
     except if AlternativeObjectProxy itself is being used.

on: anObject
     Answer a proxy to be used to save anObject. IMPORTANT: this method
     MUST be overridden so that the overridden version sends #on: to
     super passing an object that is NOT the same as anObject
     (alternatively, you can override #dumpTo:, which is what NullProxy
     does), because that would result in an infinite loop!  This also
     means that AlternativeObjectProxy must never be used directly -
     only as a superclass.



File: gst-base.info,  Node: AlternativeObjectProxy-accessing,  Prev: AlternativeObjectProxy class-instance creation,  Up: AlternativeObjectProxy

1.2.2 AlternativeObjectProxy: accessing
---------------------------------------

object
     Reconstruct the object stored in the proxy and answer it.  A
     subclass will usually override this

object: theObject
     Set the object to be dumped to theObject.  This should not be
     overridden.

primObject
     Reconstruct the object stored in the proxy and answer it.  This
     method must not be overridden



File: gst-base.info,  Node: ArithmeticError,  Next: Array,  Prev: AlternativeObjectProxy,  Up: Base classes

1.3 ArithmeticError
===================

Defined in namespace Smalltalk
Superclass: Halt
Category: Language-Exceptions
     An ArithmeticError exception is raised by numeric classes when a
     program tries to do something wrong, such as extracting the square
     root of a negative number.

* Menu:

* ArithmeticError-description::  (instance)


File: gst-base.info,  Node: ArithmeticError-description,  Up: ArithmeticError

1.3.1 ArithmeticError: description
----------------------------------

description
     Answer a textual description of the exception.



File: gst-base.info,  Node: Array,  Next: ArrayedCollection,  Prev: ArithmeticError,  Up: Base classes

1.4 Array
=========

Defined in namespace Smalltalk
Superclass: ArrayedCollection
Category: Collections-Sequenceable
     My instances are objects that have array-like properties: they are
     directly indexable by integers starting at 1, and they are fixed
     in size.  I inherit object creation behavior messages such as
     #with:, as well as iteration and general access behavior from
     SequenceableCollection.

* Menu:

* Array-mutating objects::  (instance)
* Array-printing::  (instance)
* Array-testing::  (instance)


File: gst-base.info,  Node: Array-mutating objects,  Next: Array-printing,  Up: Array

1.4.1 Array: mutating objects
-----------------------------

multiBecome: anArray
     Transform every object in the receiver in each corresponding
     object in anArray. anArray and the receiver must have the same size



File: gst-base.info,  Node: Array-printing,  Next: Array-testing,  Prev: Array-mutating objects,  Up: Array

1.4.2 Array: printing
---------------------

printOn: aStream
     Print a representation for the receiver on aStream



File: gst-base.info,  Node: Array-testing,  Prev: Array-printing,  Up: Array

1.4.3 Array: testing
--------------------

isArray
     Answer `true'.



File: gst-base.info,  Node: ArrayedCollection,  Next: Association,  Prev: Array,  Up: Base classes

1.5 ArrayedCollection
=====================

Defined in namespace Smalltalk
Superclass: SequenceableCollection
Category: Collections-Sequenceable
     My instances are objects that are generally fixed size, and are
     accessed by an integer index.  The ordering of my instance's
     elements is determined externally; I will not rearrange the order
     of the elements.

* Menu:

* ArrayedCollection class-instance creation::  (class)
* ArrayedCollection-basic::  (instance)
* ArrayedCollection-built ins::  (instance)
* ArrayedCollection-copying Collections::  (instance)
* ArrayedCollection-enumerating the elements of a collection::  (instance)
* ArrayedCollection-storing::  (instance)


File: gst-base.info,  Node: ArrayedCollection class-instance creation,  Next: ArrayedCollection-basic,  Up: ArrayedCollection

1.5.1 ArrayedCollection class: instance creation
------------------------------------------------

new: size withAll: anObject
     Answer a collection with the given size, whose elements are all
     set to anObject

with: element1
     Answer a collection whose only element is element1

with: element1 with: element2
     Answer a collection whose only elements are the parameters in the
     order they were passed

with: element1 with: element2 with: element3
     Answer a collection whose only elements are the parameters in the
     order they were passed

with: element1 with: element2 with: element3 with: element4
     Answer a collection whose only elements are the parameters in the
     order they were passed

with: element1 with: element2 with: element3 with: element4 with: element5
     Answer a collection whose only elements are the parameters in the
     order they were passed

withAll: aCollection
     Answer a collection whose elements are the same as those in
     aCollection



File: gst-base.info,  Node: ArrayedCollection-basic,  Next: ArrayedCollection-built ins,  Prev: ArrayedCollection class-instance creation,  Up: ArrayedCollection

1.5.2 ArrayedCollection: basic
------------------------------

, aSequenceableCollection
     Answer a new instance of an ArrayedCollection containing all the
     elements in the receiver, followed by all the elements in
     aSequenceableCollection

add: value
     This method should not be called for instances of this class.

copyFrom: start to: stop
     Answer a new collection containing all the items in the receiver
     from the start-th and to the stop-th

copyWith: anElement
     Answer a new instance of an ArrayedCollection containing all the
     elements in the receiver, followed by the single item anElement

copyWithout: oldElement
     Answer a copy of the receiver to which all occurrences of
     oldElement are removed



File: gst-base.info,  Node: ArrayedCollection-built ins,  Next: ArrayedCollection-copying Collections,  Prev: ArrayedCollection-basic,  Up: ArrayedCollection

1.5.3 ArrayedCollection: built ins
----------------------------------

size
     Answer the size of the receiver



File: gst-base.info,  Node: ArrayedCollection-copying Collections,  Next: ArrayedCollection-enumerating the elements of a collection,  Prev: ArrayedCollection-built ins,  Up: ArrayedCollection

1.5.4 ArrayedCollection: copying Collections
--------------------------------------------

copyReplaceAll: oldSubCollection with: newSubCollection
     Answer a new collection in which all the sequences matching
     oldSubCollection are replaced with newSubCollection

copyReplaceFrom: start to: stop with: replacementCollection
     Answer a new collection of the same class as the receiver that
     contains the same elements as the receiver, in the same order,
     except for elements from index `start' to index `stop'.  If start
     < stop, these are replaced by the contents of the
     replacementCollection.  Instead, If start = (stop + 1), like in
     `copyReplaceFrom: 4 to: 3 with: anArray', then every element of
     the receiver will be present in the answered copy; the operation
     will be an append if stop is equal to the size of the receiver or,
     if it is not, an insert before index `start'.

copyReplaceFrom: start to: stop withObject: anObject
     Answer a new collection of the same class as the receiver that
     contains the same elements as the receiver, in the same order,
     except for elements from index `start' to index `stop'.  If start
     < stop, these are replaced by stop-start+1 copies of anObject.
     Instead, If start = (stop + 1), then every element of the receiver
     will be present in the answered copy; the operation will be an
     append if stop is equal to the size of the receiver or, if it is
     not, an insert before index `start'.

reverse
     Answer the receivers' contents in reverse order



File: gst-base.info,  Node: ArrayedCollection-enumerating the elements of a collection,  Next: ArrayedCollection-storing,  Prev: ArrayedCollection-copying Collections,  Up: ArrayedCollection

1.5.5 ArrayedCollection: enumerating the elements of a collection
-----------------------------------------------------------------

collect: aBlock
     Answer a new instance of an ArrayedCollection containing all the
     results of evaluating aBlock passing each of the receiver's
     elements

reject: aBlock
     Answer a new instance of an ArrayedCollection containing all the
     elements in the receiver which, when passed to aBlock, answer false

select: aBlock
     Answer a new instance of an ArrayedCollection containing all the
     elements in the receiver which, when passed to aBlock, answer true

with: aSequenceableCollection collect: aBlock
     Evaluate aBlock for each pair of elements took respectively from
     the re- ceiver and from aSequenceableCollection; answer a
     collection of the same kind of the receiver, made with the block's
     return values. Fail if the receiver has not the same size as
     aSequenceableCollection.



File: gst-base.info,  Node: ArrayedCollection-storing,  Prev: ArrayedCollection-enumerating the elements of a collection,  Up: ArrayedCollection

1.5.6 ArrayedCollection: storing
--------------------------------

storeOn: aStream
     Store Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Association,  Next: Autoload,  Prev: ArrayedCollection,  Up: Base classes

1.6 Association
===============

Defined in namespace Smalltalk
Superclass: LookupKey
Category: Language-Data types
     My instances represent a mapping between two objects.  Typically,
     my "key" object is a symbol, but I don't require this.  My "value"
     object has no conventions associated with it; it can be any object
     at all.

* Menu:

* Association class-basic::  (class)
* Association-accessing::  (instance)
* Association-finalization::  (instance)
* Association-printing::  (instance)
* Association-storing::  (instance)
* Association-testing::  (instance)


File: gst-base.info,  Node: Association class-basic,  Next: Association-accessing,  Up: Association

1.6.1 Association class: basic
------------------------------

key: aKey value: aValue
     Answer a new association with the given key and value



File: gst-base.info,  Node: Association-accessing,  Next: Association-finalization,  Prev: Association class-basic,  Up: Association

1.6.2 Association: accessing
----------------------------

environment
     Answer nil.  This is present to achieve polymorphism with
     instances of VariableBinding.

environment: aNamespace
     Do nothing.  This is present to achieve polymorphism with
     instances of VariableBinding.

key: aKey value: aValue
     Set the association's key to aKey, and its value to aValue

value
     Answer the association's value

value: aValue
     Set the association's value to aValue



File: gst-base.info,  Node: Association-finalization,  Next: Association-printing,  Prev: Association-accessing,  Up: Association

1.6.3 Association: finalization
-------------------------------

mourn
     Finalize the receiver



File: gst-base.info,  Node: Association-printing,  Next: Association-storing,  Prev: Association-finalization,  Up: Association

1.6.4 Association: printing
---------------------------

printOn: aStream
     Put on aStream a representation of the receiver



File: gst-base.info,  Node: Association-storing,  Next: Association-testing,  Prev: Association-printing,  Up: Association

1.6.5 Association: storing
--------------------------

storeOn: aStream
     Put on aStream some Smalltalk code compiling to the receiver



File: gst-base.info,  Node: Association-testing,  Prev: Association-storing,  Up: Association

1.6.6 Association: testing
--------------------------

= anAssociation
     Answer whether the association's key and value are the same as
     anAssociation's, or false if anAssociation is not an Association

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: Autoload,  Next: AutoloadClass,  Prev: Association,  Up: Base classes

1.7 Autoload
============

Defined in namespace Smalltalk
Superclass: none
Category: Examples-Useful tools
     I am not a part of the normal Smalltalk kernel class system.  I
     provide the ability to do late ("on-demand") loading of class
     definitions.  Through me, you can define any class to be loaded
     when any message is sent to the class itself (such as to create an
     instance) or to its metaclass (such as #methodsFor: to extend it
     with class-side methods).

* Menu:

* Autoload class-instance creation::  (class)
* Autoload-accessing::  (instance)


File: gst-base.info,  Node: Autoload class-instance creation,  Next: Autoload-accessing,  Up: Autoload

1.7.1 Autoload class: instance creation
---------------------------------------

class: nameSymbol from: fileNameString
     Make Smalltalk automatically load the class named nameSymbol from
     fileNameString when needed

class: nameSymbol in: aNamespace from: fileNameString
     Make Smalltalk automatically load the class named nameSymbol and
     residing in aNamespace from fileNameString when needed



File: gst-base.info,  Node: Autoload-accessing,  Prev: Autoload class-instance creation,  Up: Autoload

1.7.2 Autoload: accessing
-------------------------

class
     We need it to access the metaclass instance, because that's what
     will load the file.

doesNotUnderstand: aMessage
     Load the class and resend the message to it



File: gst-base.info,  Node: AutoloadClass,  Next: Bag,  Prev: Autoload,  Up: Base classes

1.8 AutoloadClass
=================

Defined in namespace Smalltalk
Superclass: none
Category: Examples-Useful tools
     I represent the metaclass of an autoloaded class before it is
     autoloaded.  Having a proxy for the metaclass as well allows one
     to send messages to the metaclass (such as #methodsFor: to extend
     it with class-side methods) and have the class autoloaded.

* Menu:

* AutoloadClass-accessing::  (instance)


File: gst-base.info,  Node: AutoloadClass-accessing,  Up: AutoloadClass

1.8.1 AutoloadClass: accessing
------------------------------

doesNotUnderstand: aMessage
     Load the class and resend the message to its metaclass.

environment
     Answer the namespace in which the class will be autoloaded

environment: aNamespace
     Set to aNamespace the namespace in which the class will be
     autoloaded

fileName
     Answer the name of the file from which the class will be autoloaded

fileName: aString
     Set to aString the name of the file from which the class will be
     autoloaded

loadedClass
     File-in the file and answer the new value of the association which
     held the receiver

loadedMetaclass
     File-in the file and answer the metaclass for the new value of the
     association which held the receiver

name
     Answer the name of the class to be autoloaded

name: aSymbol
     Set to aSymbol the name of the class to be autoloaded



File: gst-base.info,  Node: Bag,  Next: Behavior,  Prev: AutoloadClass,  Up: Base classes

1.9 Bag
=======

Defined in namespace Smalltalk
Superclass: Collection
Category: Collections-Unordered
     My instances are unordered collections of objects.  You can think
     of me as a set with a memory; that is, if the same object is added
     to me twice, then I will report that that element has been stored
     twice.

* Menu:

* Bag class-basic::  (class)
* Bag-adding::  (instance)
* Bag-enumerating the elements of a collection::  (instance)
* Bag-extracting items::  (instance)
* Bag-printing::  (instance)
* Bag-removing::  (instance)
* Bag-storing::  (instance)
* Bag-testing collections::  (instance)


File: gst-base.info,  Node: Bag class-basic,  Next: Bag-adding,  Up: Bag

1.9.1 Bag class: basic
----------------------

new
     Answer a new instance of the receiver

new: size
     Answer a new instance of the receiver, with space for size distinct
     objects



File: gst-base.info,  Node: Bag-adding,  Next: Bag-enumerating the elements of a collection,  Prev: Bag class-basic,  Up: Bag

1.9.2 Bag: adding
-----------------

add: newObject
     Add an occurrence of newObject to the receiver. Answer newObject.
     Fail if newObject is nil.

add: newObject withOccurrences: anInteger
     If anInteger > 0, add anInteger occurrences of newObject to the
     receiver. If anInteger < 0, remove them. Answer newObject.  Fail
     if newObject is nil.



File: gst-base.info,  Node: Bag-enumerating the elements of a collection,  Next: Bag-extracting items,  Prev: Bag-adding,  Up: Bag

1.9.3 Bag: enumerating the elements of a collection
---------------------------------------------------

asSet
     Answer a set with the elements of the receiver

do: aBlock
     Evaluate the block for all members in the collection.



File: gst-base.info,  Node: Bag-extracting items,  Next: Bag-printing,  Prev: Bag-enumerating the elements of a collection,  Up: Bag

1.9.4 Bag: extracting items
---------------------------

sortedByCount
     Answer a collection of counts with elements, sorted by decreasing
     count.



File: gst-base.info,  Node: Bag-printing,  Next: Bag-removing,  Prev: Bag-extracting items,  Up: Bag

1.9.5 Bag: printing
-------------------

printOn: aStream
     Put on aStream a representation of the receiver



File: gst-base.info,  Node: Bag-removing,  Next: Bag-storing,  Prev: Bag-printing,  Up: Bag

1.9.6 Bag: removing
-------------------

remove: oldObject ifAbsent: anExceptionBlock
     Remove oldObject from the collection and return it. If can't be
     found, answer instead the result of evaluationg anExceptionBlock



File: gst-base.info,  Node: Bag-storing,  Next: Bag-testing collections,  Prev: Bag-removing,  Up: Bag

1.9.7 Bag: storing
------------------

storeOn: aStream
     Put on aStream some Smalltalk code compiling to the receiver



File: gst-base.info,  Node: Bag-testing collections,  Prev: Bag-storing,  Up: Bag

1.9.8 Bag: testing collections
------------------------------

= aBag
     Answer whether the receiver and aBag contain the same objects

hash
     Answer an hash value for the receiver

includes: anObject
     Answer whether we include anObject

occurrencesOf: anObject
     Answer the number of occurrences of anObject found in the receiver

size
     Answer the total number of objects found in the receiver



File: gst-base.info,  Node: Behavior,  Next: BindingDictionary,  Prev: Bag,  Up: Base classes

1.10 Behavior
=============

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Implementation
     I am the parent class of all "class" type methods.  My instances
     know about the subclass/superclass relationships between classes,
     contain the description that instances are created from, and hold
     the method dictionary that's associated with each class.  I
     provide methods for compiling methods, modifying the class
     inheritance hierarchy, examining the method dictionary, and
     iterating over the class hierarchy.

* Menu:

* Behavior-accessing class hierarchy::  (instance)
* Behavior-accessing instances and variables::  (instance)
* Behavior-accessing the methodDictionary::  (instance)
* Behavior-built ins::  (instance)
* Behavior-compilation (alternative)::  (instance)
* Behavior-compiling methods::  (instance)
* Behavior-creating a class hierarchy::  (instance)
* Behavior-enumerating::  (instance)
* Behavior-evaluating::  (instance)
* Behavior-instance creation::  (instance)
* Behavior-instance variables::  (instance)
* Behavior-method dictionary::  (instance)
* Behavior-pluggable behavior (not yet implemented)::  (instance)
* Behavior-printing hierarchy::  (instance)
* Behavior-support for lightweight classes::  (instance)
* Behavior-testing functionality::  (instance)
* Behavior-testing the class hierarchy::  (instance)
* Behavior-testing the form of the instances::  (instance)
* Behavior-testing the method dictionary::  (instance)


File: gst-base.info,  Node: Behavior-accessing class hierarchy,  Next: Behavior-accessing instances and variables,  Up: Behavior

1.10.1 Behavior: accessing class hierarchy
------------------------------------------

allSubclasses
     Answer the direct and indirect subclasses of the receiver in a Set

allSuperclasses
     Answer all the receiver's superclasses in a collection

subclasses
     Answer the direct subclasses of the receiver in a Set

superclass
     Answer the receiver's superclass (if any, otherwise answer nil)

withAllSubclasses
     Answer a Set containing the receiver together with its direct and
     indirect subclasses

withAllSuperclasses
     Answer the receiver and all of its superclasses in a collection



File: gst-base.info,  Node: Behavior-accessing instances and variables,  Next: Behavior-accessing the methodDictionary,  Prev: Behavior-accessing class hierarchy,  Up: Behavior

1.10.2 Behavior: accessing instances and variables
--------------------------------------------------

allClassVarNames
     Return all the class variables understood by the receiver

allInstances
     Returns a set of all instances of the receiver

allInstVarNames
     Answer the names of every instance variables the receiver
     contained in the receiver's instances

allSharedPools
     Return the names of the shared pools defined by the class and any
     of its superclasses

classPool
     Answer the class pool dictionary. Since Behavior does not support
     classes with class variables, we answer an empty one; adding
     variables to it results in an error.

classVarNames
     Answer all the class variables for instances of the receiver

instanceCount
     Return a count of all the instances of the receiver

instVarNames
     Answer an Array containing the instance variables defined by the
     receiver

sharedPools
     Return the names of the shared pools defined by the class

subclassInstVarNames
     Answer the names of the instance variables the receiver inherited
     from its superclass



File: gst-base.info,  Node: Behavior-accessing the methodDictionary,  Next: Behavior-built ins,  Prev: Behavior-accessing instances and variables,  Up: Behavior

1.10.3 Behavior: accessing the methodDictionary
-----------------------------------------------

>> selector
     Return the compiled method associated with selector, from the local
     method dictionary.  Error if not found.

allSelectors
     Answer a Set of all the selectors understood by the receiver

compiledMethodAt: selector
     Return the compiled method associated with selector, from the local
     method dictionary.  Error if not found.

compiledMethodAt: selector ifAbsent: aBlock
     Return the compiled method associated with selector, from the local
     method dictionary.  Evaluate aBlock if not found.

selectorAt: method
     Return selector for the given compiledMethod

selectors
     Answer a Set of the receiver's selectors

sourceCodeAt: selector
     Answer source code (if available) for the given compiledMethod

sourceMethodAt: selector
     This is too dependent on the original implementation



File: gst-base.info,  Node: Behavior-built ins,  Next: Behavior-compilation (alternative),  Prev: Behavior-accessing the methodDictionary,  Up: Behavior

1.10.4 Behavior: built ins
--------------------------

basicNew
     Create a new instance of a class with no indexed instance
     variables; this method must not be overridden.

basicNew: numInstanceVariables
     Create a new instance of a class with indexed instance variables.
     The instance has numInstanceVariables indexed instance variables;
     this method must not be overridden.

basicNewInFixedSpace
     Create a new instance of a class with no indexed instance
     variables.  The instance is guaranteed not to move across garbage
     collections.  Like #basicNew, this method should not be overridden.

basicNewInFixedSpace: numInstanceVariables
     Create a new instance of a class with indexed instance variables.
     The instance has numInstanceVariables indexed instance variables.
     The instance is guaranteed not to move across garbage collections.
     Like #basicNew:, this method should not be overridden.

compileString: aString
     Compile the code in aString, with no category. Fail if the code
     does not obey Smalltalk syntax. Answer the generated CompiledMethod
     if it does

compileString: aString ifError: aBlock
     Compile the code in aString, with no category. Evaluate aBlock
     (passing the file name, line number and description of the error)
     if the code does not obey Smalltalk syntax. Answer the generated
     CompiledMethod if it does

flushCache
     Invalidate the method cache kept by the virtual machine. This
     message should not need to be called by user programs.

methodsFor: category ifTrue: condition
     Compile the following code inside the receiver, with the given
     category, if condition is true; else ignore it

new
     Create a new instance of a class with no indexed instance variables

new: numInstanceVariables
     Create a new instance of a class with indexed instance variables.
     The instance has numInstanceVariables indexed instance variables.

someInstance
     Private - Answer the first instance of the receiver in the object
     table



File: gst-base.info,  Node: Behavior-compilation (alternative),  Next: Behavior-compiling methods,  Prev: Behavior-built ins,  Up: Behavior

1.10.5 Behavior: compilation (alternative)
------------------------------------------

methods
     Don't use this, it's only present to file in from Smalltalk/V

methodsFor
     Don't use this, it's only present to file in from Dolphin Smalltalk

methodsFor: category ifFeatures: features
     Start compiling methods in the receiver if this implementation of
     Smalltalk has the given features, else skip the section

methodsFor: category stamp: notUsed
     Don't use this, it's only present to file in from Squeak

privateMethods
     Don't use this, it's only present to file in from IBM Smalltalk

publicMethods
     Don't use this, it's only present to file in from IBM Smalltalk



File: gst-base.info,  Node: Behavior-compiling methods,  Next: Behavior-creating a class hierarchy,  Prev: Behavior-compilation (alternative),  Up: Behavior

1.10.6 Behavior: compiling methods
----------------------------------

methodsFor: aCategoryString
     Calling this method prepares the parser to receive methods
     to be compiled and installed in the receiver's method dictionary.
         The methods are put in the category identified by the
     parameter.



File: gst-base.info,  Node: Behavior-creating a class hierarchy,  Next: Behavior-enumerating,  Prev: Behavior-compiling methods,  Up: Behavior

1.10.7 Behavior: creating a class hierarchy
-------------------------------------------

addSubclass: aClass
     Add aClass asone of the receiver's subclasses.

removeSubclass: aClass
     Remove aClass from the list of the receiver's subclasses

superclass: aClass
     Set the receiver's superclass.



File: gst-base.info,  Node: Behavior-enumerating,  Next: Behavior-evaluating,  Prev: Behavior-creating a class hierarchy,  Up: Behavior

1.10.8 Behavior: enumerating
----------------------------

allInstancesDo: aBlock
     Invokes aBlock for all instances of the receiver

allSubclassesDo: aBlock
     Invokes aBlock for all subclasses, both direct and indirect.

allSubinstancesDo: aBlock
     Invokes aBlock for all instances of each of the receiver's
     subclasses.

allSuperclassesDo: aBlock
     Invokes aBlock for all superclasses, both direct and indirect.

selectSubclasses: aBlock
     Return a Set of subclasses of the receiver satisfying aBlock.

selectSuperclasses: aBlock
     Return a Set of superclasses of the receiver satisfying aBlock.

subclassesDo: aBlock
     Invokes aBlock for all direct subclasses.

withAllSubclassesDo: aBlock
     Invokes aBlock for the receiver and all subclasses, both direct
     and indirect.

withAllSuperclassesDo: aBlock
     Invokes aBlock for the receiver and all superclasses, both direct
     and indirect.



File: gst-base.info,  Node: Behavior-evaluating,  Next: Behavior-instance creation,  Prev: Behavior-enumerating,  Up: Behavior

1.10.9 Behavior: evaluating
---------------------------

evalString: aString to: anObject
     Answer the stack top at the end of the evaluation of the code in
     aString. The code is executed as part of anObject

evalString: aString to: anObject ifError: aBlock
     Answer the stack top at the end of the evaluation of the code in
     aString. If aString cannot be parsed, evaluate aBlock (see
     compileString:ifError:). The code is executed as part of anObject

evaluate: code
     Evaluate Smalltalk expression in 'code' and return result.

evaluate: code ifError: block
     Evaluate 'code'.  If a parsing error is detected, invoke 'block'

evaluate: code notifying: requestor
     Evaluate Smalltalk expression in 'code'. If a parsing error is
     encountered, send #error: to requestor

evaluate: code to: anObject
     Evaluate Smalltalk expression as part of anObject's method
     definition

evaluate: code to: anObject ifError: block
     Evaluate Smalltalk expression as part of anObject's method
     definition.  This method is used to support Inspector expression
     evaluation.  If a parsing error is encountered, invoke error
     block, 'block'



File: gst-base.info,  Node: Behavior-instance creation,  Next: Behavior-instance variables,  Prev: Behavior-evaluating,  Up: Behavior

1.10.10 Behavior: instance creation
-----------------------------------

newInFixedSpace
     Create a new instance of a class without indexed instance
     variables.  The instance is guaranteed not to move across garbage
     collections.  If a subclass overrides #new, the changes will apply
     to this method too.

newInFixedSpace: numInstanceVariables
     Create a new instance of a class with indexed instance variables.
     The instance has numInstanceVariables indexed instance variables.
     The instance is guaranteed not to move across garbage collections.
     If a subclass overrides #new:, the changes will apply to this
     method too.



File: gst-base.info,  Node: Behavior-instance variables,  Next: Behavior-method dictionary,  Prev: Behavior-instance creation,  Up: Behavior

1.10.11 Behavior: instance variables
------------------------------------

addInstVarName: aString
     Add the given instance variable to instance of the receiver

removeInstVarName: aString
     Remove the given instance variable from the receiver and recompile
     all of the receiver's subclasses



File: gst-base.info,  Node: Behavior-method dictionary,  Next: Behavior-pluggable behavior (not yet implemented),  Prev: Behavior-instance variables,  Up: Behavior

1.10.12 Behavior: method dictionary
-----------------------------------

addSelector: selector withMethod: compiledMethod
     Add the given compiledMethod to the method dictionary, giving it
     the passed selector. Answer compiledMethod

compile: code
     Compile method source.  If there are parsing errors, answer nil.
     Else, return a CompiledMethod result of compilation

compile: code ifError: block
     Compile method source.  If there are parsing errors, invoke
     exception block, 'block' passing file name, line number and error.
     description. Return a CompiledMethod result of compilation

     to

compile: code notifying: requestor
     Compile method source.  If there are parsing errors, send #error:
     to the requestor object, else return a CompiledMethod result of
     compilation

compileAll
     Recompile all selectors in the receiver. Ignore errors.

compileAll: aNotifier
     Recompile all selectors in the receiver. Notify aNotifier by sen-
     ding #error: messages if something goes wrong.

compileAllSubclasses
     Recompile all selector of all subclasses. Notify aNotifier by sen-
     ding #error: messages if something goes wrong.

compileAllSubclasses: aNotifier
     Recompile all selector of all subclasses. Notify aNotifier by sen-
     ding #error: messages if something goes wrong.

createGetMethod: what
     Create a method accessing the variable `what'.

createGetMethod: what default: value
     Create a method accessing the variable `what', with a default value
     of `value', using lazy initialization

createSetMethod: what
     Create a method which sets the variable `what'.

decompile: selector
     Decompile the bytecodes for the given selector.

defineAsyncCFunc: cFuncNameString
     withSelectorArgs: selectorAndArgs     args: argsArray Please
     lookup the part on the C interface in the manual.  This method is
     deprecated, you should use the cCall:returning:args: attribute.

defineCFunc: cFuncNameString
     withSelectorArgs: selectorAndArgs     returning: returnTypeSymbol
       args: argsArray Please lookup the part on the C interface in
     the manual.  This method is deprecated, you should use the
     cCall:returning:args: attribute.

edit: selector
     Open Emacs to edit the method with the passed selector, then
     compile it

methodDictionary
     Answer the receiver's method dictionary. Don't modify the method
     dictionary unless you exactly know what you're doing

methodDictionary: aDictionary
     Set the receiver's method dictionary to aDictionary

recompile: selector
     Recompile the given selector, answer nil if something goes wrong or
     the new CompiledMethod if everything's ok.

     to

recompile: selector notifying: aNotifier
     Recompile the given selector.  If there are parsing errors, send
     #error: to the aNotifier object, else return a CompiledMethod
     result of compilation

removeSelector: selector
     Remove the given selector from the method dictionary, answer the
     CompiledMethod attached to that selector

removeSelector: selector ifAbsent: aBlock
     Remove the given selector from the method dictionary, answer the
     CompiledMethod attached to that selector. If the selector cannot
     be found, answer the result of evaluating aBlock.

selectorsAndMethodsDo: aBlock
     Evaluate aBlock, passing for each evaluation a selector that's
     defined in the receiver and the corresponding method.



File: gst-base.info,  Node: Behavior-pluggable behavior (not yet implemented),  Next: Behavior-printing hierarchy,  Prev: Behavior-method dictionary,  Up: Behavior

1.10.13 Behavior: pluggable behavior (not yet implemented)
----------------------------------------------------------

compilerClass
     Answer the class that can be used to compile parse trees, or nil
     if there is none (as is the case now).  Not used for methods if
     parserClass answers nil, and for doits if evaluatorClass answers
     nil.

debuggerClass
     Answer which class is to be used to debug a chain of contexts which
     includes the receiver.  nil means 'do not debug'; other classes are
     sent #debuggingPriority and the one with the highest priority is
     picked.

decompilerClass
     Answer the class that can be used to decompile methods, or nil if
     there is none (as is the case now).

evaluatorClass
     Answer the class that can be used to evaluate doits, or nil if
     there is none (as is the case now).

parserClass
     Answer the class that can be used to parse methods, or nil if
     there is none (as is the case now).



File: gst-base.info,  Node: Behavior-printing hierarchy,  Next: Behavior-support for lightweight classes,  Prev: Behavior-pluggable behavior (not yet implemented),  Up: Behavior

1.10.14 Behavior: printing hierarchy
------------------------------------

hierarchyIndent
     Answer the indent to be used by #printHierarchy - 4 by default

printHierarchy
     Print my entire subclass hierarchy on the terminal.

printSubclasses: level using: aBlock
     I print my name, and then all my subclasses, each indented
     according to its position in the hierarchy. I pass aBlock a class
     name and a level



File: gst-base.info,  Node: Behavior-support for lightweight classes,  Next: Behavior-testing functionality,  Prev: Behavior-printing hierarchy,  Up: Behavior

1.10.15 Behavior: support for lightweight classes
-------------------------------------------------

article
     Answer an article (`a' or `an') which is ok for the receiver's name

asClass
     Answer the first superclass that is a full-fledged Class object

environment
     Answer the namespace that this class belongs to - the same as the
     superclass, since Behavior does not support namespaces yet.

name
     Answer the class name; this prints to the name of the superclass
     enclosed in braces.  This class name is used, for example, to print
     the receiver.

nameIn: aNamespace
     Answer the class name when the class is referenced from aNamespace
     - a dummy one, since Behavior does not support names.

printOn: aStream in: aNamespace
     Answer the class name when the class is referenced from aNamespace
     - a dummy one, since Behavior does not support names.

securityPolicy
     Not commented.

securityPolicy: aSecurityPolicy
     This method should not be called for instances of this class.



File: gst-base.info,  Node: Behavior-testing functionality,  Next: Behavior-testing the class hierarchy,  Prev: Behavior-support for lightweight classes,  Up: Behavior

1.10.16 Behavior: testing functionality
---------------------------------------

isBehavior
     Answer `true'.



File: gst-base.info,  Node: Behavior-testing the class hierarchy,  Next: Behavior-testing the form of the instances,  Prev: Behavior-testing functionality,  Up: Behavior

1.10.17 Behavior: testing the class hierarchy
---------------------------------------------

includesBehavior: aClass
     Returns true if aClass is the receiver or a superclass of the
     receiver.

inheritsFrom: aClass
     Returns true if aClass is a superclass of the receiver

kindOfSubclass
     Return a string indicating the type of class the receiver is

shape
     Not commented.

shapes
     Not commented.



File: gst-base.info,  Node: Behavior-testing the form of the instances,  Next: Behavior-testing the method dictionary,  Prev: Behavior-testing the class hierarchy,  Up: Behavior

1.10.18 Behavior: testing the form of the instances
---------------------------------------------------

instSize
     Answer how many fixed instance variables are reserved to each of
     the receiver's instances

isFixed
     Answer whether the receiver's instances have no indexed instance
     variables

isIdentity
     Answer whether x = y implies x == y for instances of the receiver

isImmediate
     Answer whether, if x is an instance of the receiver, x copy == x

isPointers
     Answer whether the instance variables of the receiver's instances
     are objects

isVariable
     Answer whether the receiver's instances have indexed instance
     variables



File: gst-base.info,  Node: Behavior-testing the method dictionary,  Prev: Behavior-testing the form of the instances,  Up: Behavior

1.10.19 Behavior: testing the method dictionary
-----------------------------------------------

canUnderstand: selector
     Returns true if the instances of the receiver understand the given
     selector

hasMethods
     Return whether the receiver has any methods defined

includesSelector: selector
     Returns true if the local method dictionary contains the given
     selector

scopeHas: name ifTrue: aBlock
     If methods understood by the receiver's instances have access to a
     symbol named 'name', evaluate aBlock

whichClassIncludesSelector: selector
     Answer which class in the receiver's hierarchy contains the
     implementation of selector used by instances of the class (nil if
     none does)

whichSelectorsAccess: instVarName
     Answer a Set of selectors which access the given instance variable

whichSelectorsAssign: instVarName
     Answer a Set of selectors which read the given instance variable

whichSelectorsRead: instVarName
     Answer a Set of selectors which read the given instance variable

whichSelectorsReferTo: anObject
     Returns a Set of selectors that refer to anObject

whichSelectorsReferToByteCode: aByteCode
     Return the collection of selectors in the class which reference
     the byte code, aByteCode



File: gst-base.info,  Node: BindingDictionary,  Next: BlockClosure,  Prev: Behavior,  Up: Base classes

1.11 BindingDictionary
======================

Defined in namespace Smalltalk
Superclass: Dictionary
Category: Language-Implementation
     I am a special form of dictionary that provides special ways to
     access my keys, which typically begin with an uppercase letter;
     also, my associations are actually VariableBinding instances.

     My keys are (expected to be) symbols, so I use == to match
     searched keys to those in the dictionary - this is done expecting
     that it brings a bit more speed.

* Menu:

* BindingDictionary-accessing::  (instance)
* BindingDictionary-copying::  (instance)
* BindingDictionary-forward declarations::  (instance)
* BindingDictionary-printing::  (instance)
* BindingDictionary-testing::  (instance)


File: gst-base.info,  Node: BindingDictionary-accessing,  Next: BindingDictionary-copying,  Up: BindingDictionary

1.11.1 BindingDictionary: accessing
-----------------------------------

define: aSymbol
     Define aSymbol as equal to nil inside the receiver.  Fail if such
     a variable already exists (use #at:put: if you don't want to fail)

doesNotUnderstand: aMessage
     Try to map unary selectors to read accesses to the Namespace, and
     one-argument keyword selectors to write accesses.  Note that: a)
     this works only if the selector has an uppercase first letter; and
     b) `aNamespace Variable: value' is the same as `aNamespace set:
     #Variable to: value', not the same as `aNamespace at: #Variable
     put: value' -- the latter always refers to the current namespace,
     while the former won't define a new variable, instead searching in
     superspaces (and raising an error if the variable cannot be found).

environment
     Answer the environment to which the receiver is connected.  This
     can be the class for a dictionary that holds class variables, or
     the super-namespace.  In general it is used to compute the
     receiver's name.

environment: anObject
     Set the environment to which the receiver is connected.  This can
     be the class for a dictionary that holds class variables, or the
     super-namespace.  In general it is used to compute the receiver's
     name.

import: aSymbol from: aNamespace
     Add to the receiver the symbol aSymbol, associated to the same
     value as in aNamespace. Fail if aNamespace does not contain the
     given key.

name
     Answer the receiver's name, which by default is the same as the
     name of the receiver's environment.

nameIn: aNamespace
     Answer the receiver's name when referred to from aNamespace; by
     default the computation is deferred to the receiver's environment.



File: gst-base.info,  Node: BindingDictionary-copying,  Next: BindingDictionary-forward declarations,  Prev: BindingDictionary-accessing,  Up: BindingDictionary

1.11.2 BindingDictionary: copying
---------------------------------

copy
     Answer the receiver.

copyEmpty: newSize
     Answer an empty copy of the receiver whose size is newSize

copyEmptyForCollect
     Answer an empty copy of the receiver which is filled in to compute
     the result of #collect:

deepCopy
     Answer the receiver.

shallowCopy
     Answer the receiver.



File: gst-base.info,  Node: BindingDictionary-forward declarations,  Next: BindingDictionary-printing,  Prev: BindingDictionary-copying,  Up: BindingDictionary

1.11.3 BindingDictionary: forward declarations
----------------------------------------------

at: key put: value
     Store value as associated to the given key. If any, recycle
     Associations temporarily stored by the compiler inside the
     `Undeclared' dictionary.



File: gst-base.info,  Node: BindingDictionary-printing,  Next: BindingDictionary-testing,  Prev: BindingDictionary-forward declarations,  Up: BindingDictionary

1.11.4 BindingDictionary: printing
----------------------------------

printOn: aStream in: aNamespace
     Print the receiver's name when referred to from aNamespace; by
     default the computation is deferred to the receiver's environment.



File: gst-base.info,  Node: BindingDictionary-testing,  Prev: BindingDictionary-printing,  Up: BindingDictionary

1.11.5 BindingDictionary: testing
---------------------------------

species
     Answer `IdentityDictionary'.



File: gst-base.info,  Node: BlockClosure,  Next: BlockContext,  Prev: BindingDictionary,  Up: Base classes

1.12 BlockClosure
=================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Implementation
     I am a factotum class.  My instances represent Smalltalk blocks,
     portions of executeable code that have access to the environment
     that they were declared in, take parameters, and can be passed
     around as objects to be executed by methods outside the current
     class.  Block closures are sent a message to compute their value
     and create a new execution context; this property can be used in
     the construction of control flow methods.  They also provide some
     methods that are used in the creation of Processes from blocks.

* Menu:

* BlockClosure class-instance creation::  (class)
* BlockClosure class-testing::  (class)
* BlockClosure-accessing::  (instance)
* BlockClosure-built ins::  (instance)
* BlockClosure-control structures::  (instance)
* BlockClosure-exception handling::  (instance)
* BlockClosure-multiple process::  (instance)
* BlockClosure-overriding::  (instance)
* BlockClosure-testing::  (instance)
* BlockClosure-unwind protection::  (instance)


File: gst-base.info,  Node: BlockClosure class-instance creation,  Next: BlockClosure class-testing,  Up: BlockClosure

1.12.1 BlockClosure class: instance creation
--------------------------------------------

block: aCompiledBlock
     Answer a BlockClosure that activates the passed CompiledBlock.

block: aCompiledBlock receiver: anObject
     Answer a BlockClosure that activates the passed CompiledBlock with
     the given receiver.

block: aCompiledBlock receiver: anObject outerContext: aContext
     Answer a BlockClosure that activates the passed CompiledBlock with
     the given receiver.

exceptionHandlerResetBlock
     Not commented.

exceptionHandlerSearchBlock
     Not commented.

numArgs: args numTemps: temps bytecodes: bytecodes depth: depth literals: literalArray
     Answer a BlockClosure for a new CompiledBlock that is created using
     the passed parameters.  To make it work, you must put the
     BlockClosure into a CompiledMethod's literals.



File: gst-base.info,  Node: BlockClosure class-testing,  Next: BlockClosure-accessing,  Prev: BlockClosure class-instance creation,  Up: BlockClosure

1.12.2 BlockClosure class: testing
----------------------------------

isImmediate
     Answer whether, if x is an instance of the receiver, x copy == x



File: gst-base.info,  Node: BlockClosure-accessing,  Next: BlockClosure-built ins,  Prev: BlockClosure class-testing,  Up: BlockClosure

1.12.3 BlockClosure: accessing
------------------------------

argumentCount
     Answer the number of arguments passed to the receiver

block
     Answer the CompiledBlock which contains the receiver's bytecodes

block: aCompiledBlock
     Set the CompiledBlock which contains the receiver's bytecodes

finalIP
     Answer the last instruction that can be executed by the receiver

fixTemps
     This should fix the values of the temporary variables used in the
     block that are ordinarily shared with the method in which the block
     is defined.  Not defined yet, but it is not harmful that it isn't.
     Answer the receiver.

initialIP
     Answer the initial instruction pointer into the receiver.

method
     Answer the CompiledMethod in which the receiver lies

numArgs
     Answer the number of arguments passed to the receiver

numTemps
     Answer the number of temporary variables used by the receiver

outerContext
     Answer the method/block context which is the immediate outer of
     the receiver

outerContext: containingContext
     Set the method/block context which is the immediate outer of the
     receiver

receiver
     Answer the object that is used as `self' when executing the
     receiver (if nil, it might mean that the receiver is not valid
     though...)

receiver: anObject
     Set the object that is used as `self' when executing the receiver

stackDepth
     Answer the number of stack slots needed for the receiver



File: gst-base.info,  Node: BlockClosure-built ins,  Next: BlockClosure-control structures,  Prev: BlockClosure-accessing,  Up: BlockClosure

1.12.4 BlockClosure: built ins
------------------------------

value
     Evaluate the receiver passing no parameters

value: arg1
     Evaluate the receiver passing arg1 as the only parameter

value: arg1 value: arg2
     Evaluate the receiver passing arg1 and arg2 as the parameters

value: arg1 value: arg2 value: arg3
     Evaluate the receiver passing arg1, arg2 and arg3 as the parameters

valueWithArguments: argumentsArray
     Evaluate the receiver passing argArray's elements as the parameters



File: gst-base.info,  Node: BlockClosure-control structures,  Next: BlockClosure-exception handling,  Prev: BlockClosure-built ins,  Up: BlockClosure

1.12.5 BlockClosure: control structures
---------------------------------------

repeat
     Evaluate the receiver 'forever' (actually until a return is
     executed or the process is terminated).

whileFalse
     Evaluate the receiver until it returns true

whileFalse: aBlock
     Evaluate the receiver. If it returns false, evaluate aBlock and re-
     start

whileTrue
     Evaluate the receiver until it returns false

whileTrue: aBlock
     Evaluate the receiver. If it returns true, evaluate aBlock and re-
     start



File: gst-base.info,  Node: BlockClosure-exception handling,  Next: BlockClosure-multiple process,  Prev: BlockClosure-control structures,  Up: BlockClosure

1.12.6 BlockClosure: exception handling
---------------------------------------

ifError: aBlock
     Evaluate the receiver; when #error: is called, pass to aBlock the
     receiver and the parameter, and answer the result of evaluating
     aBlock.  If another exception is raised, it is passed to an outer
     handler; if no exception is raised, the result of evaluating the
     receiver is returned.

on: anException do: aBlock
     Evaluate the receiver; when anException is signaled, evaluate
     aBlock passing a Signal describing the exception. Answer either
     the result of evaluating the receiver or the parameter of a
     Signal>>#return:

on: e1 do: b1 on: e2 do: b2
     Evaluate the receiver; when e1 or e2 are signaled, evaluate
     respectively b1 or b2, passing a Signal describing the exception.
     Answer either the result of evaluating the receiver or the
     argument of a Signal>>#return:

on: e1 do: b1 on: e2 do: b2 on: e3 do: b3
     Evaluate the receiver; when e1, e2 or e3 are signaled, evaluate
     respectively b1, b2 or b3, passing a Signal describing the
     exception.  Answer either the result of evaluating the receiver or
     the parameter of a Signal>>#return:

on: e1 do: b1 on: e2 do: b2 on: e3 do: b3 on: e4 do: b4
     Evaluate the receiver; when e1, e2, e3 or e4 are signaled, evaluate
     respectively b1, b2, b3 or b4, passing a Signal describing the
     exception.  Answer either the result of evaluating the receiver or
     the parameter of a Signal>>#return:

on: e1 do: b1 on: e2 do: b2 on: e3 do: b3 on: e4 do: b4 on: e5 do: b5
     Evaluate the receiver; when e1, e2, e3, e4 or e5 are signaled,
     evaluate respectively b1, b2, b3, b4 or b5, passing a Signal
     describing the exception.  Answer either the result of evaluating
     the receiver or the parameter of a Signal>>#return:



File: gst-base.info,  Node: BlockClosure-multiple process,  Next: BlockClosure-overriding,  Prev: BlockClosure-exception handling,  Up: BlockClosure

1.12.7 BlockClosure: multiple process
-------------------------------------

fork
     Create a new process executing the receiver and start it

forkAt: priority
     Create a new process executing the receiver with given priority
     and start it

forkWithoutPreemption
     Evaluate the receiver in a process that cannot be preempted.  If
     the receiver expect a parameter, pass the current process (can be
     useful for queuing interrupts from within the uninterruptible
     process).

newProcess
     Create a new process executing the receiver in suspended state.
     The priority is the same as for the calling process. The receiver
     must not contain returns

newProcessWith: anArray
     Create a new process executing the receiver with the passed
     arguments, and leave it in suspended state. The priority is the
     same as for the calling process. The receiver must not contain
     returns

valueWithoutInterrupts
     Evaluate aBlock and delay all interrupts that are requested to the
     active process during its execution to after aBlock returns.

valueWithoutPreemption
     Evaluate the receiver with external interrupts disabled.  This
     effectively disables preemption as long as the block does not
     explicitly yield control, wait on semaphores, and the like.



File: gst-base.info,  Node: BlockClosure-overriding,  Next: BlockClosure-testing,  Prev: BlockClosure-multiple process,  Up: BlockClosure

1.12.8 BlockClosure: overriding
-------------------------------

deepCopy
     Answer the receiver.

shallowCopy
     Answer the receiver.



File: gst-base.info,  Node: BlockClosure-testing,  Next: BlockClosure-unwind protection,  Prev: BlockClosure-overriding,  Up: BlockClosure

1.12.9 BlockClosure: testing
----------------------------

hasMethodReturn
     Answer whether the block contains a method return



File: gst-base.info,  Node: BlockClosure-unwind protection,  Prev: BlockClosure-testing,  Up: BlockClosure

1.12.10 BlockClosure: unwind protection
---------------------------------------

ensure: aBlock
     Evaluate the receiver; when any exception is signaled exit
     returning the result of evaluating aBlock; if no exception is
     raised, return the result of evaluating aBlock when the receiver
     has ended

ifCurtailed: aBlock
     Evaluate the receiver; if its execution triggers an unwind which
     truncates the execution of the block (`curtails' the block),
     evaluate aBlock.  The three cases which can curtail the execution
     of the receiver are: a non-local return in the receiver, a
     non-local return in a block evaluated by the receiver which
     returns past the receiver itself, and an exception raised and not
     resumed during the execution of the receiver.

valueWithUnwind
     Evaluate the receiver. Any errors caused by the block will cause a
     backtrace, but execution will continue in the method that sent
     #valueWithUnwind, after that call. Example: [ 1 / 0 ]
     valueWithUnwind.  'unwind works!' printNl.  Important: this method
     is public, but it is intended to be used in very special cases (as
     a rule of thumb, use it only when the corresponding C code uses
     the _gst_prepare_execution_environment and
     _gst_finish_execution_environment functions). You should usually
     rely on #ensure: and #on:do:.



File: gst-base.info,  Node: BlockContext,  Next: Boolean,  Prev: BlockClosure,  Up: Base classes

1.13 BlockContext
=================

Defined in namespace Smalltalk
Superclass: ContextPart
Category: Language-Implementation
     My instances represent executing Smalltalk blocks, which are
     portions of executeable code that have access to the environment
     that they were declared in, take parameters, and result from
     BlockClosure objects created to be executed by methods outside the
     current class.  Block contexts are created by messages sent to
     compute a closure's value.  They contain a stack and also provide
     some methods that can be used in inspection or debugging.

* Menu:

* BlockContext-accessing::  (instance)
* BlockContext-debugging::  (instance)
* BlockContext-printing::  (instance)


File: gst-base.info,  Node: BlockContext-accessing,  Next: BlockContext-debugging,  Up: BlockContext

1.13.1 BlockContext: accessing
------------------------------

caller
     Answer the context that called the receiver

home
     Answer the MethodContext to which the receiver refers, or nil if
     it has been optimized away

isBlock
     Answer whether the receiver is a block context

     block

isDisabled
     Answers false, because contexts that are skipped when doing a
     return are always MethodContexts.  BlockContexts are removed from
     the chain whenever a non-local return is done, because
     MethodContexts need to stay there in case there is a non-local
     return from the #ensure: block.

isEnvironment
     To create a valid execution environment for the interpreter even
     before it starts, GST creates a fake context whose selector is nil
     and which can be used as a marker for the current execution
     environment.  Answer whether the receiver is that kind of context
     (always false, since those contexts are always MethodContexts).

isUnwind
     Answers whether the context must continue execution even after a
     non-local return (a return from the enclosing method of a block, or
     a call to the #continue: method of ContextPart).  Such contexts are
     created only by #ensure: and are always MethodContexts.

nthOuterContext: n
     Answer the n-th outer block/method context for the receiver

outerContext
     Answer the outer block/method context for the receiver



File: gst-base.info,  Node: BlockContext-debugging,  Next: BlockContext-printing,  Prev: BlockContext-accessing,  Up: BlockContext

1.13.2 BlockContext: debugging
------------------------------

isInternalExceptionHandlingContext
     Answer whether the receiver is a context that should be hidden to
     the user when presenting a backtrace.  Such contexts are never
     blocks, but check the rest of the chain.



File: gst-base.info,  Node: BlockContext-printing,  Prev: BlockContext-debugging,  Up: BlockContext

1.13.3 BlockContext: printing
-----------------------------

printOn: aStream
     Print a representation for the receiver on aStream



File: gst-base.info,  Node: Boolean,  Next: ByteArray,  Prev: BlockContext,  Up: Base classes

1.14 Boolean
============

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Data types
     I have two instances in the Smalltalk system: true and false.  I
     provide methods that are conditional on boolean values, such as
     conditional execution and loops, and conditional testing, such as
     conditional and and conditional or.  I should say that I appear to
     provide those operations; my subclasses True and False actually
     provide those operations.

* Menu:

* Boolean class-testing::  (class)
* Boolean-basic::  (instance)
* Boolean-C hacks::  (instance)
* Boolean-overriding::  (instance)
* Boolean-storing::  (instance)


File: gst-base.info,  Node: Boolean class-testing,  Next: Boolean-basic,  Up: Boolean

1.14.1 Boolean class: testing
-----------------------------

isIdentity
     Answer whether x = y implies x == y for instances of the receiver

isImmediate
     Answer whether, if x is an instance of the receiver, x copy == x



File: gst-base.info,  Node: Boolean-basic,  Next: Boolean-C hacks,  Prev: Boolean class-testing,  Up: Boolean

1.14.2 Boolean: basic
---------------------

& aBoolean
     This method's functionality should be implemented by subclasses of
     Boolean

and: aBlock
     This method's functionality should be implemented by subclasses of
     Boolean

eqv: aBoolean
     This method's functionality should be implemented by subclasses of
     Boolean

ifFalse: falseBlock
     This method's functionality should be implemented by subclasses of
     Boolean

ifFalse: falseBlock ifTrue: trueBlock
     This method's functionality should be implemented by subclasses of
     Boolean

ifTrue: trueBlock
     This method's functionality should be implemented by subclasses of
     Boolean

ifTrue: trueBlock ifFalse: falseBlock
     This method's functionality should be implemented by subclasses of
     Boolean

not
     This method's functionality should be implemented by subclasses of
     Boolean

or: aBlock
     This method's functionality should be implemented by subclasses of
     Boolean

xor: aBoolean
     This method's functionality should be implemented by subclasses of
     Boolean

| aBoolean
     This method's functionality should be implemented by subclasses of
     Boolean



File: gst-base.info,  Node: Boolean-C hacks,  Next: Boolean-overriding,  Prev: Boolean-basic,  Up: Boolean

1.14.3 Boolean: C hacks
-----------------------

asCBooleanValue
     This method's functionality should be implemented by subclasses of
     Boolean



File: gst-base.info,  Node: Boolean-overriding,  Next: Boolean-storing,  Prev: Boolean-C hacks,  Up: Boolean

1.14.4 Boolean: overriding
--------------------------

deepCopy
     Answer the receiver.

shallowCopy
     Answer the receiver.



File: gst-base.info,  Node: Boolean-storing,  Prev: Boolean-overriding,  Up: Boolean

1.14.5 Boolean: storing
-----------------------

storeOn: aStream
     Store on aStream some Smalltalk code which compiles to the receiver



File: gst-base.info,  Node: ByteArray,  Next: ByteStream,  Prev: Boolean,  Up: Base classes

1.15 ByteArray
==============

Defined in namespace Smalltalk
Superclass: ArrayedCollection
Category: Collections-Sequenceable
     My instances are similar to strings in that they are both
     represented as a sequence of bytes, but my individual elements are
     integers, where as a String's elements are characters.

* Menu:

* ByteArray class-instance creation::  (class)
* ByteArray-built ins::  (instance)
* ByteArray-converting::  (instance)
* ByteArray-more advanced accessing::  (instance)


File: gst-base.info,  Node: ByteArray class-instance creation,  Next: ByteArray-built ins,  Up: ByteArray

1.15.1 ByteArray class: instance creation
-----------------------------------------

fromCData: aCObject size: anInteger
     Answer a ByteArray containing anInteger bytes starting at the
     location pointed to by aCObject



File: gst-base.info,  Node: ByteArray-built ins,  Next: ByteArray-converting,  Prev: ByteArray class-instance creation,  Up: ByteArray

1.15.2 ByteArray: built ins
---------------------------

asCData: aCType
     Convert the receiver to a CObject with the given type

byteAt: index
     Answer the index-th indexed instance variable of the receiver

byteAt: index put: value
     Store the `value' byte in the index-th indexed instance variable
     of the receiver

hash
     Answer an hash value for the receiver

primReplaceFrom: start to: stop with: aByteArray startingAt: srcIndex
     Private - Replace the characters from start to stop with the ASCII
     codes contained in aString (which, actually, can be any variable
     byte class), starting at the srcIndex location of aString

replaceFrom: start to: stop with: aByteArray startingAt: replaceStart
     Replace the characters from start to stop with the bytes contained
     in aByteArray (which, actually, can be any variable byte class),
     starting at the replaceStart location of aByteArray

replaceFrom: start to: stop withString: aString startingAt: replaceStart
     Replace the characters from start to stop with the ASCII codes
     contained in aString (which, actually, can be any variable byte
     class), starting at the replaceStart location of aString



File: gst-base.info,  Node: ByteArray-converting,  Next: ByteArray-more advanced accessing,  Prev: ByteArray-built ins,  Up: ByteArray

1.15.3 ByteArray: converting
----------------------------

asString
     Answer a String whose character's ASCII codes are the receiver's
     contents



File: gst-base.info,  Node: ByteArray-more advanced accessing,  Prev: ByteArray-converting,  Up: ByteArray

1.15.4 ByteArray: more advanced accessing
-----------------------------------------

charAt: index
     Access the C char at the given index in the receiver. The value is
     returned as a Smalltalk Character.  Indices are 1-based just like
     for other Smalltalk access.

charAt: index put: value
     Store as a C char the Smalltalk Character or Integer object
     identified by `value', at the given index in the receiver, using
     sizeof(char) bytes - i.e. 1 byte.  Indices are 1-based just like
     for other Smalltalk access.

doubleAt: index
     Access the C double at the given index in the receiver.  Indices
     are 1-based just like for other Smalltalk access.

doubleAt: index put: value
     Store the Smalltalk Float object identified by `value', at the
     given index in the receiver, writing it like a C double.  Indices
     are 1-based just like for other Smalltalk access.

floatAt: index
     Access the C float at the given index in the receiver.  Indices
     are 1-based just like for other Smalltalk access.

floatAt: index put: value
     Store the Smalltalk Float object identified by `value', at the
     given index in the receiver, writing it like a C float.  Indices
     are 1-based just like for other Smalltalk access.

intAt: index
     Access the C int at the given index in the receiver.  Indices are
     1-based just like for other Smalltalk access.

intAt: index put: value
     Store the Smalltalk Integer object identified by `value', at the
     given index in the receiver, using sizeof(int) bytes.  Indices are
     1-based just like for other Smalltalk access.

longAt: index
     Access the C long int at the given index in the receiver.  Indices
     are 1-based just like for other Smalltalk access.

longAt: index put: value
     Store the Smalltalk Integer object identified by `value', at the
     given index in the receiver, using sizeof(long) bytes.  Indices
     are 1-based just like for other Smalltalk access.

longDoubleAt: index
     Access the C long double at the given index in the receiver.
     Indices are 1-based just like for other Smalltalk access.

longDoubleAt: index put: value
     Store the Smalltalk Float object identified by `value', at the
     given index in the receiver, writing it like a C double.  Indices
     are 1-based just like for other Smalltalk access.

"Note that
     Not commented.

"Storing methods
     objectAt: index put: value

shortAt: index
     Access the C short int at the given index in the receiver.
     Indices are 1-based just like for other Smalltalk access.

shortAt: index put: value
     Store the Smalltalk Integer object identified by `value', at the
     given index in the receiver, using sizeof(short) bytes.  Indices
     are 1-based just like for other Smalltalk access.

stringAt: index
     Access the string pointed by the C `char *' at the given index in
     the receiver. Indices are 1-based just like for other Smalltalk
     access.

stringAt: index put: value
     Store the Smalltalk String object identified by `value', at the
     given index in the receiver, writing it like a *FRESHLY ALLOCATED*
     C string. It is the caller's responsibility to free it if
     necessary.  Indices are 1-based just like for other Smalltalk
     access.

ucharAt: index
     Access the C unsigned char at the given index in the receiver.
     The value is returned as a Smalltalk Character.  Indices are
     1-based just like for other Smalltalk access.

ucharAt: index put: value
     Store as a C char the Smalltalk Character or Integer object
     identified by `value', at the given index in the receiver, using
     sizeof(char) bytes - i.e. 1 byte.  Indices are 1-based just like
     for other Smalltalk access.

uintAt: index
     Access the C unsigned int at the given index in the receiver.
     Indices are 1-based just like for other Smalltalk access.

uintAt: index put: value
     Store the Smalltalk Integer object identified by `value', at the
     given index in the receiver, using sizeof(int) bytes.  Indices are
     1-based just like for other Smalltalk access.

ulongAt: index
     Access the C unsigned long int at the given index in the receiver.
     Indices are 1-based just like for other Smalltalk access.

ulongAt: index put: value
     Store the Smalltalk Integer object identified by `value', at the
     given index in the receiver, using sizeof(long) bytes.  Indices
     are 1-based just like for other Smalltalk access.

unsignedCharAt: index
     Access the C unsigned char at the given index in the receiver.
     The value is returned as a Smalltalk Character.  Indices are
     1-based just like for other Smalltalk access.

unsignedCharAt: index put: value
     Store as a C char the Smalltalk Character or Integer object
     identified by `value', at the given index in the receiver, using
     sizeof(char) bytes - i.e. 1 byte.  Indices are 1-based just like
     for other Smalltalk access.

unsignedIntAt: index
     Access the C unsigned int at the given index in the receiver.
     Indices are 1-based just like for other Smalltalk access.

unsignedIntAt: index put: value
     Store the Smalltalk Integer object identified by `value', at the
     given index in the receiver, using sizeof(int) bytes.  Indices are
     1-based just like for other Smalltalk access.

unsignedLongAt: index
     Access the C unsigned long int at the given index in the receiver.
     Indices are 1-based just like for other Smalltalk access.

unsignedLongAt: index put: value
     Store the Smalltalk Integer object identified by `value', at the
     given index in the receiver, using sizeof(long) bytes.  Indices
     are 1-based just like for other Smalltalk access.

unsignedShortAt: index
     Access the C unsigned short int at the given index in the receiver.
     Indices are 1-based just like for other Smalltalk access.

unsignedShortAt: index put: value
     Store the Smalltalk Integer object identified by `value', at the
     given index in the receiver, using sizeof(short) bytes.  Indices
     are 1-based just like for other Smalltalk access.

ushortAt: index
     Access the C unsigned short int at the given index in the receiver.
     Indices are 1-based just like for other Smalltalk access.

ushortAt: index put: value
     Store the Smalltalk Integer object identified by `value', at the
     given index in the receiver, using sizeof(short) bytes.  Indices
     are 1-based just like for other Smalltalk access.



File: gst-base.info,  Node: ByteStream,  Next: CAggregate,  Prev: ByteArray,  Up: Base classes

1.16 ByteStream
===============

Defined in namespace Smalltalk
Superclass: ReadWriteStream
Category: Streams-Collections
     My instances are read/write streams specially crafted for
     ByteArrays.  They are able to write binary data to them.

* Menu:

* ByteStream-basic::  (instance)


File: gst-base.info,  Node: ByteStream-basic,  Up: ByteStream

1.16.1 ByteStream: basic
------------------------

next
     Return the next *character* in the ByteArray

nextByte
     Return the next byte in the byte array

nextByteArray: numBytes
     Return the next numBytes bytes in the byte array

nextDouble
     Return the next 64-bit float in the byte array

nextFloat
     Return the next 32-bit float in the byte array

nextLong
     Return the next 4 bytes in the byte array, interpreted as a 32 bit
     signed int

nextLongLong
     Return the next 8 bytes in the byte array, interpreted as a 64 bit
     signed int

nextPut: aChar
     Store aChar on the byte array

nextPutAll: aCollection
     Write all the objects in aCollection to the receiver

nextPutByte: anInteger
     Store anInteger (range: -128..255) on the byte array

nextPutByteArray: aByteArray
     Store aByteArray on the byte array

nextPutDouble: aDouble
     Store aDouble as a 64-bit float in the byte array

nextPutFloat: aFloat
     Return the next 32-bit float in the byte array

nextPutInt64: anInteger
     Store anInteger (range: -2^63..2^64-1) on the byte array as 4 bytes

nextPutLong: anInteger
     Store anInteger (range: -2^31..2^32-1) on the byte array as 4 bytes

nextPutShort: anInteger
     Store anInteger (range: -32768..65535) on the byte array as 2 bytes

nextShort
     Return the next 2 bytes in the byte array, interpreted as a 16 bit
     signed int

nextSignedByte
     Return the next byte in the byte array, interpreted as a 8 bit
     signed number

nextUint64
     Return the next 8 bytes in the byte array, interpreted as a 64 bit
     unsigned int

nextUlong
     Return the next 4 bytes in the byte array, interpreted as a 32 bit
     unsigned int

nextUshort
     Return the next 2 bytes in the byte array, interpreted as a 16 bit
     unsigned int



File: gst-base.info,  Node: CAggregate,  Next: CallinProcess,  Prev: ByteStream,  Up: Base classes

1.17 CAggregate
===============

Defined in namespace Smalltalk
Superclass: CObject
Category: Language-C interface

* Menu:

* CAggregate class-accessing::  (class)
* CAggregate-accessing::  (instance)


File: gst-base.info,  Node: CAggregate class-accessing,  Next: CAggregate-accessing,  Up: CAggregate

1.17.1 CAggregate class: accessing
----------------------------------

alignof
     Answer the receiver's instances required aligment

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CAggregate-accessing,  Prev: CAggregate class-accessing,  Up: CAggregate

1.17.2 CAggregate: accessing
----------------------------

elementType
     Answer the type over which the receiver is constructed.



File: gst-base.info,  Node: CallinProcess,  Next: CArray,  Prev: CAggregate,  Up: Base classes

1.18 CallinProcess
==================

Defined in namespace Smalltalk
Superclass: Process
Category: Language-Processes
     I represent a unit of computation for which external C code
     requested execution, so I must store the returned value once my
     computation terminates and I must not survive across image saves
     (since those who invoked me no longer exist).  I am otherwise
     equivalent to a Process.

* Menu:


File: gst-base.info,  Node: CArray,  Next: CArrayCType,  Prev: CallinProcess,  Up: Base classes

1.19 CArray
===========

Defined in namespace Smalltalk
Superclass: CAggregate
Category: Language-C interface

* Menu:

* CArray-accessing::  (instance)


File: gst-base.info,  Node: CArray-accessing,  Up: CArray

1.19.1 CArray: accessing
------------------------

alignof
     Answer the receiver's required aligment

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CArrayCType,  Next: CBoolean,  Prev: CArray,  Up: Base classes

1.20 CArrayCType
================

Defined in namespace Smalltalk
Superclass: CPtrCType
Category: Language-C interface

* Menu:

* CArrayCType class-instance creation::  (class)
* CArrayCType-accessing::  (instance)


File: gst-base.info,  Node: CArrayCType class-instance creation,  Next: CArrayCType-accessing,  Up: CArrayCType

1.20.1 CArrayCType class: instance creation
-------------------------------------------

elementType: aCType
     This method should not be called for instances of this class.

elementType: aCType numberOfElements: anInteger
     Answer a new instance of CPtrCType that maps an array whose
     elements are of the given CType, and whose size is exactly
     anInteger elements (of course, anInteger only matters for
     allocation, not for access, since no out-of-bounds protection is
     provided for C objects).



File: gst-base.info,  Node: CArrayCType-accessing,  Prev: CArrayCType class-instance creation,  Up: CArrayCType

1.20.2 CArrayCType: accessing
-----------------------------

alignof
     Answer the alignment of the receiver's instances

numberOfElements
     Answer the number of elements in the receiver's instances

sizeof
     Answer the size of the receiver's instances



File: gst-base.info,  Node: CBoolean,  Next: CByte,  Prev: CArrayCType,  Up: Base classes

1.21 CBoolean
=============

Defined in namespace Smalltalk
Superclass: CByte
Category: Language-C interface
     I return true if a byte is not zero, false otherwise.

* Menu:

* CBoolean-accessing::  (instance)


File: gst-base.info,  Node: CBoolean-accessing,  Up: CBoolean

1.21.1 CBoolean: accessing
--------------------------

value
     Get the receiver's value - answer true if it is != 0, false if it
     is 0.

value: aBoolean
     Set the receiver's value - it's the same as for CBytes, but we get
     a Boolean, not a Character



File: gst-base.info,  Node: CByte,  Next: CChar,  Prev: CBoolean,  Up: Base classes

1.22 CByte
==========

Defined in namespace Smalltalk
Superclass: CUChar
Category: Language-C interface
     You're a marine.  You adapt - you improvise - you overcome

     - Gunnery Sgt. Thomas Highway
     Heartbreak Ridge

* Menu:

* CByte class-conversion::  (class)
* CByte-accessing::  (instance)


File: gst-base.info,  Node: CByte class-conversion,  Next: CByte-accessing,  Up: CByte

1.22.1 CByte class: conversion
------------------------------

scalarIndex
     Nothing special in the default case - answer a CType for the
     receiver

type
     Nothing special in the default case - answer a CType for the
     receiver



File: gst-base.info,  Node: CByte-accessing,  Prev: CByte class-conversion,  Up: CByte

1.22.2 CByte: accessing
-----------------------

scalarIndex
     Nothing special in the default case - answer the receiver's CType

type
     Answer a CType for the receiver

value
     Answer the value the receiver is pointing to. The returned value
     is a SmallInteger

value: aValue
     Set the receiver to point to the value, aValue (a SmallInteger).



File: gst-base.info,  Node: CChar,  Next: CCompound,  Prev: CByte,  Up: Base classes

1.23 CChar
==========

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CChar class-accessing::  (class)
* CChar-accessing::  (instance)
* CChar-conversion::  (instance)


File: gst-base.info,  Node: CChar class-accessing,  Next: CChar-accessing,  Up: CChar

1.23.1 CChar class: accessing
-----------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CChar-accessing,  Next: CChar-conversion,  Prev: CChar class-accessing,  Up: CChar

1.23.2 CChar: accessing
-----------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CChar-conversion,  Prev: CChar-accessing,  Up: CChar

1.23.3 CChar: conversion
------------------------

asByteArray: size
     Convert size bytes pointed to by the receiver to a String

asString
     Convert the data pointed to by the receiver, up to the first NULL
     byte, to a String

asString: size
     Convert size bytes pointed to by the receiver to a String



File: gst-base.info,  Node: CCompound,  Next: CDouble,  Prev: CChar,  Up: Base classes

1.24 CCompound
==============

Defined in namespace Smalltalk
Superclass: CObject
Category: Language-C interface

* Menu:

* CCompound class-instance creation::  (class)
* CCompound class-subclass creation::  (class)
* CCompound-instance creation::  (instance)


File: gst-base.info,  Node: CCompound class-instance creation,  Next: CCompound class-subclass creation,  Up: CCompound

1.24.1 CCompound class: instance creation
-----------------------------------------

new
     Allocate a new instance of the receiver. To free the memory after
     GC, remember to call #addToBeFinalized.

type
     Answer a CType for the receiver



File: gst-base.info,  Node: CCompound class-subclass creation,  Next: CCompound-instance creation,  Prev: CCompound class-instance creation,  Up: CCompound

1.24.2 CCompound class: subclass creation
-----------------------------------------

alignof
     Answer 1, the alignment of an empty struct

compileDeclaration: array
     This method's functionality should be implemented by subclasses of
     CCompound

compileDeclaration: array inject: startOffset into: aBlock
     Compile methods that implement the declaration in array.  To
     compute the offset after each field, the value of the old offset
     plus the new field's size is passed to aBlock, together with the
     new field's alignment requirements.

compileSize: size align: alignment
     Private - Compile sizeof and alignof methods

computeAggregateType: type block: aBlock
     Private - Called by computeTypeString:block: for pointers/arrays.
     Format of type: (array int 3) or (ptr FooStruct)

computeArrayType: type block: aBlock
     Private - Called by computeAggregateType:block: for arrays

computePtrType: type block: aBlock
     Private - Called by computeAggregateType:block: for pointers

computeTypeString: type block: aBlock
     Private - Pass the size, alignment, and description of CType for
     aBlock, given the field description in `type' (the second element
     of each pair).

emitInspectTo: str for: name
     Private - Emit onto the given stream the code for adding the given
     selector to the CCompound's inspector.

initialize
     Initialize the receiver's TypeMap

newStruct: structName declaration: array
     The old way to create a CStruct.  Superseded by
     #subclass:declaration:...

sizeof
     Answer 0, the size of an empty struct

subclass: structName declaration: array
     classVariableNames: cvn poolDictionaries: pd category: category
     Create a new class with the given name that contains code to
     implement the given C struct.  All the parameters except `array'
     are the same as for a standard class creation message; see
     documentation for more information



File: gst-base.info,  Node: CCompound-instance creation,  Prev: CCompound class-subclass creation,  Up: CCompound

1.24.3 CCompound: instance creation
-----------------------------------

inspect
     Inspect the contents of the receiver

inspectSelectorList
     Answer a list of selectors whose return values should be inspected
     by #inspect.



File: gst-base.info,  Node: CDouble,  Next: CFloat,  Prev: CCompound,  Up: Base classes

1.25 CDouble
============

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CDouble class-accessing::  (class)
* CDouble-accessing::  (instance)


File: gst-base.info,  Node: CDouble class-accessing,  Next: CDouble-accessing,  Up: CDouble

1.25.1 CDouble class: accessing
-------------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CDouble-accessing,  Prev: CDouble class-accessing,  Up: CDouble

1.25.2 CDouble: accessing
-------------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CFloat,  Next: CFunctionDescriptor,  Prev: CDouble,  Up: Base classes

1.26 CFloat
===========

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CFloat class-accessing::  (class)
* CFloat-accessing::  (instance)


File: gst-base.info,  Node: CFloat class-accessing,  Next: CFloat-accessing,  Up: CFloat

1.26.1 CFloat class: accessing
------------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CFloat-accessing,  Prev: CFloat class-accessing,  Up: CFloat

1.26.2 CFloat: accessing
------------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CFunctionDescriptor,  Next: Character,  Prev: CFloat,  Up: Base classes

1.27 CFunctionDescriptor
========================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-C interface
     I am not part of the Smalltalk definition.  My instances contain
     information about C functions that can be called from within
     Smalltalk, such as number and type of parameters.  This
     information is used by the C callout mechanism to perform the
     actual call-out to C routines.

* Menu:

* CFunctionDescriptor class-instance creation::  (class)
* CFunctionDescriptor class-testing::  (class)
* CFunctionDescriptor-accessing::  (instance)
* CFunctionDescriptor-calling::  (instance)
* CFunctionDescriptor-printing::  (instance)


File: gst-base.info,  Node: CFunctionDescriptor class-instance creation,  Next: CFunctionDescriptor class-testing,  Up: CFunctionDescriptor

1.27.1 CFunctionDescriptor class: instance creation
---------------------------------------------------

for: funcNameString returning: returnTypeSymbol withArgs: argsArray
     Private - Answer a CFunctionDescriptor



File: gst-base.info,  Node: CFunctionDescriptor class-testing,  Next: CFunctionDescriptor-accessing,  Prev: CFunctionDescriptor class-instance creation,  Up: CFunctionDescriptor

1.27.2 CFunctionDescriptor class: testing
-----------------------------------------

addressOf: function
     Answer whether a function is registered (on the C side) with the
     given name or is dynamically loadable.

isFunction: function
     Answer whether a function is registered (on the C side) with the
     given name.



File: gst-base.info,  Node: CFunctionDescriptor-accessing,  Next: CFunctionDescriptor-calling,  Prev: CFunctionDescriptor class-testing,  Up: CFunctionDescriptor

1.27.3 CFunctionDescriptor: accessing
-------------------------------------

address
     Answer the address (CObject) of the function represented by the
     receiver

address: aCObject
     Set to aCObject the address of the function represented by the
     receiver

isValid
     Answer whether the function represented by the receiver is actually
     a registered one

name
     Answer the name of the function (on the C side) represented by the
     receiver



File: gst-base.info,  Node: CFunctionDescriptor-calling,  Next: CFunctionDescriptor-printing,  Prev: CFunctionDescriptor-accessing,  Up: CFunctionDescriptor

1.27.4 CFunctionDescriptor: calling
-----------------------------------

asyncCallFrom: aContext
     Perform the call-out for the function represented by the receiver.
     The arguments (and the receiver if one of the arguments has type
     #self or #selfSmalltalk) are taken from the base of the stack of
     aContext.  Asynchronous call-outs don't return a value, but if the
     function calls back into Smalltalk the process that started the
     call-out is not suspended.

asyncCallNoRetryFrom: aContext
     Perform the call-out for the function represented by the receiver.
     The arguments (and the receiver if one of the arguments has type
     #self or #selfSmalltalk) are taken from the base of the stack of
     aContext.  Asynchronous call-outs don't return a value, but if the
     function calls back into Smalltalk the process that started the
     call-out is not suspended.  Unlike #asyncCallFrom:, this method
     does not attempt to find functions in shared objects.

callFrom: aContext into: aValueHolder
     Perform the call-out for the function represented by the receiver.
     The arguments (and the receiver if one of the arguments has type
     #self or #selfSmalltalk) are taken from the base of the stack of
     aContext, and the result is stored into aValueHolder.  aValueHolder
     is also returned.

callNoRetryFrom: aContext into: aValueHolder
     Perform the call-out for the function represented by the receiver.
     The arguments (and the receiver if one of the arguments has type
     #self or #selfSmalltalk) are taken from the base of the stack of
     aContext, and the result is stored into aValueHolder.  aValueHolder
     is also returned.  Unlike #callFrom:into:, this method does not
     attempt to find functions in shared objects.



File: gst-base.info,  Node: CFunctionDescriptor-printing,  Prev: CFunctionDescriptor-calling,  Up: CFunctionDescriptor

1.27.5 CFunctionDescriptor: printing
------------------------------------

printOn: aStream
     Print a representation of the receiver onto aStream



File: gst-base.info,  Node: Character,  Next: CharacterArray,  Prev: CFunctionDescriptor,  Up: Base classes

1.28 Character
==============

Defined in namespace Smalltalk
Superclass: Magnitude
Category: Language-Data types
     My instances represent the 256 characters of the character set.  I
     provide messages to translate between integers and character
     objects, and provide names for some of the common unprintable
     characters.

* Menu:

* Character class-built ins::  (class)
* Character class-constants::  (class)
* Character class-initializing lookup tables::  (class)
* Character class-instance creation::  (class)
* Character class-testing::  (class)
* Character-built ins::  (instance)
* Character-coercion methods::  (instance)
* Character-comparing::  (instance)
* Character-converting::  (instance)
* Character-printing::  (instance)
* Character-storing::  (instance)
* Character-testing::  (instance)
* Character-testing functionality::  (instance)


File: gst-base.info,  Node: Character class-built ins,  Next: Character class-constants,  Up: Character

1.28.1 Character class: built ins
---------------------------------

asciiValue: anInteger
     Returns the character object corresponding to anInteger.  Error if
     anInteger is not an integer, or not in 0..255.  #codePoint:,
     #asciiValue: and #value: are synonyms.

codePoint: anInteger
     Returns the character object corresponding to anInteger.  Error if
     anInteger is not an integer, or not in 0..255.  #codePoint:,
     #asciiValue: and #value: are synonyms.

value: anInteger
     Returns the character object corresponding to anInteger.  Error if
     anInteger is not an integer, or not in 0..255.  #codePoint:,
     #asciiValue: and #value: are synonyms.



File: gst-base.info,  Node: Character class-constants,  Next: Character class-initializing lookup tables,  Prev: Character class-built ins,  Up: Character

1.28.2 Character class: constants
---------------------------------

backspace
     Returns the character 'backspace'

bell
     Returns the character 'bel'

cr
     Returns the character 'cr'

eof
     Returns the character 'eof', also known as 'sub'

eot
     Returns the character 'eot', also known as 'Ctrl-D'

esc
     Returns the character 'esc'

lf
     Returns the character 'lf', also known as 'nl'

newPage
     Returns the character 'newPage', also known as 'ff'

nl
     Returns the character 'nl', also known as 'lf'

nul
     Returns the character 'nul'

space
     Returns the character 'space'

tab
     Returns the character 'tab'



File: gst-base.info,  Node: Character class-initializing lookup tables,  Next: Character class-instance creation,  Prev: Character class-constants,  Up: Character

1.28.3 Character class: initializing lookup tables
--------------------------------------------------

initialize
     Initialize the lookup table which is used to make case and
     digit-to-char conversions faster.  Indices in Table are ASCII
     values incremented by one. Indices 1-256 classify chars (0 =
     nothing special, 2 = separator, 48 = digit, 55 = uppercase, 3 =
     lowercase), indices 257-512 map to lowercase chars, indices
     513-768 map to uppercase chars.



File: gst-base.info,  Node: Character class-instance creation,  Next: Character class-testing,  Prev: Character class-initializing lookup tables,  Up: Character

1.28.4 Character class: instance creation
-----------------------------------------

digitValue: anInteger
     Returns a character that corresponds to anInteger.  0-9 map to
     $0-$9, 10-35 map to $A-$Z



File: gst-base.info,  Node: Character class-testing,  Next: Character-built ins,  Prev: Character class-instance creation,  Up: Character

1.28.5 Character class: testing
-------------------------------

isIdentity
     Answer whether x = y implies x == y for instances of the receiver

isImmediate
     Answer whether, if x is an instance of the receiver, x copy == x



File: gst-base.info,  Node: Character-built ins,  Next: Character-coercion methods,  Prev: Character class-testing,  Up: Character

1.28.6 Character: built ins
---------------------------

= char
     Boolean return value; true if the characters are equal

asciiValue
     Returns the integer value corresponding to self.  #codePoint,
     #asciiValue, #value, and #asInteger are synonyms.

asInteger
     Returns the integer value corresponding to self.  #codePoint,
     #asciiValue, #value, and #asInteger are synonyms.

codePoint
     Returns the integer value corresponding to self.  #codePoint,
     #asciiValue, #value, and #asInteger are synonyms.

value
     Returns the integer value corresponding to self.  #codePoint,
     #asciiValue, #value, and #asInteger are synonyms.



File: gst-base.info,  Node: Character-coercion methods,  Next: Character-comparing,  Prev: Character-built ins,  Up: Character

1.28.7 Character: coercion methods
----------------------------------

asLowercase
     Returns self as a lowercase character if it's an uppercase letter,
     otherwise returns the character unchanged.

asString
     Returns the character self as a string.

asSymbol
     Returns the character self as a symbol.

asUppercase
     Returns self as a uppercase character if it's an lowercase letter,
     otherwise returns the character unchanged.



File: gst-base.info,  Node: Character-comparing,  Next: Character-converting,  Prev: Character-coercion methods,  Up: Character

1.28.8 Character: comparing
---------------------------

< aCharacter
     Compare the character's ASCII value. Answer whether the receiver's
     is the least.

<= aCharacter
     Compare the character's ASCII value. Answer whether the receiver's
     is the least or their equal.

> aCharacter
     Compare the character's ASCII value. Answer whether the receiver's
     is the greatest.

>= aCharacter
     Compare the character's ASCII value. Answer whether the receiver's
     is the greatest or their equal.



File: gst-base.info,  Node: Character-converting,  Next: Character-printing,  Prev: Character-comparing,  Up: Character

1.28.9 Character: converting
----------------------------

asCharacter
     Return the receiver, since it is already a character.

digitValue
     Returns the value of self interpreted as a digit.  Here, 'digit'
     means either 0-9, or A-Z, which maps to 10-35.



File: gst-base.info,  Node: Character-printing,  Next: Character-storing,  Prev: Character-converting,  Up: Character

1.28.10 Character: printing
---------------------------

displayOn: aStream
     Print a representation of the receiver on aStream. Unlike
     #printOn:, this method strips the leading dollar.

printOn: aStream
     Store a representation of the receiver on aStream



File: gst-base.info,  Node: Character-storing,  Next: Character-testing,  Prev: Character-printing,  Up: Character

1.28.11 Character: storing
--------------------------

storeOn: aStream
     Store Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Character-testing,  Next: Character-testing functionality,  Prev: Character-storing,  Up: Character

1.28.12 Character: testing
--------------------------

isAlphaNumeric
     True if self is a letter or a digit

isDigit
     True if self is a 0-9 digit

isDigit: radix
     Answer whether the receiver is a valid character in the given
     radix.

isLetter
     True if self is an upper- or lowercase letter

isLowercase
     True if self is a lowercase letter

isPunctuation
     Returns true if self is one of '.,:;!?'

isSeparator
     Returns true if self is a space, cr, tab, nl, or newPage

isUppercase
     True if self is uppercase

isVowel
     Returns true if self is a, e, i, o, or u; case insensitive



File: gst-base.info,  Node: Character-testing functionality,  Prev: Character-testing,  Up: Character

1.28.13 Character: testing functionality
----------------------------------------

isCharacter
     Answer True. We're definitely characters



File: gst-base.info,  Node: CharacterArray,  Next: CInt,  Prev: Character,  Up: Base classes

1.29 CharacterArray
===================

Defined in namespace Smalltalk
Superclass: ArrayedCollection
Category: Language-Data types
     My instances represent a generic textual (string) data type.  I
     provide accessing and manipulation methods for strings.

* Menu:

* CharacterArray class-basic::  (class)
* CharacterArray-basic::  (instance)
* CharacterArray-built ins::  (instance)
* CharacterArray-comparing::  (instance)
* CharacterArray-converting::  (instance)
* CharacterArray-printing::  (instance)
* CharacterArray-storing::  (instance)
* CharacterArray-string processing::  (instance)
* CharacterArray-testing functionality::  (instance)


File: gst-base.info,  Node: CharacterArray class-basic,  Next: CharacterArray-basic,  Up: CharacterArray

1.29.1 CharacterArray class: basic
----------------------------------

fromString: aCharacterArray
     Make up an instance of the receiver containing the same characters
     as aCharacterArray, and answer it.

lineDelimiter
     Answer a CharacterArray which one can use as a line delimiter.



File: gst-base.info,  Node: CharacterArray-basic,  Next: CharacterArray-built ins,  Prev: CharacterArray class-basic,  Up: CharacterArray

1.29.2 CharacterArray: basic
----------------------------

basicAt: index
     Answer the index-th character of the receiver. This is an exception
     to the `do not override' rule that allows storage optimization by
     storing the characters as values instead of as objects.

basicAt: index put: anObject
     Set the index-th character of the receiver to be anObject. This
     method must not be overridden; override at: instead. String
     overrides it so that it looks like it contains character objects
     even though it contains bytes



File: gst-base.info,  Node: CharacterArray-built ins,  Next: CharacterArray-comparing,  Prev: CharacterArray-basic,  Up: CharacterArray

1.29.3 CharacterArray: built ins
--------------------------------

valueAt: index
     Answer the ascii value of index-th character variable of the
     receiver

valueAt: index put: value
     Store (Character value: value) in the index-th indexed instance
     variable of the receiver



File: gst-base.info,  Node: CharacterArray-comparing,  Next: CharacterArray-converting,  Prev: CharacterArray-built ins,  Up: CharacterArray

1.29.4 CharacterArray: comparing
--------------------------------

< aCharacterArray
     Return true if the receiver is less than aCharacterArray, ignoring
     case differences.

<= aCharacterArray
     Returns true if the receiver is less than or equal to
     aCharacterArray, ignoring case differences.  If is receiver is an
     initial substring of aCharacterArray, it is considered to be less
     than aCharacterArray.

> aCharacterArray
     Return true if the receiver is greater than aCharacterArray,
     ignoring case differences.

>= aCharacterArray
     Returns true if the receiver is greater than or equal to
     aCharacterArray, ignoring case differences.  If is aCharacterArray
     is an initial substring of the receiver, it is considered to be
     less than the receiver.

indexOf: aCharacterArray matchCase: aBoolean startingAt: anIndex
     Answer an Interval of indices in the receiver which match the
     aCharacterArray pattern. # in aCharacterArray means 'match any
     character', * in aCharacterArray means 'match any sequence of
     characters'. The first item of the returned in- terval is >=
     anIndex. If aBoolean is false, the search is case-insen- sitive,
     else it is case-sensitive.  If no Interval matches the pattern,
     answer nil.

match: aCharacterArray
     Answer whether aCharacterArray matches the pattern contained in the
     receiver. # in the receiver means 'match any character', * in
     receiver means 'match any sequence of characters'.

match: aCharacterArray ignoreCase: aBoolean
     Answer whether aCharacterArray matches the pattern contained in the
     receiver. # in the receiver means 'match any character', * in
     receiver means 'match any sequence of characters'.  The case of
     alphabetic characters is ignored if aBoolean is true.

sameAs: aCharacterArray
     Returns true if the receiver is the same CharacterArray as
     aCharacterArray, ignoring case differences.

startsWith: aCharacterArray
     Returns true if the receiver starts with the same characters as
     aCharacterArray.



File: gst-base.info,  Node: CharacterArray-converting,  Next: CharacterArray-printing,  Prev: CharacterArray-comparing,  Up: CharacterArray

1.29.5 CharacterArray: converting
---------------------------------

asByteArray
     Return the receiver, converted to a ByteArray of ASCII values

asClassPoolKey
     Return the receiver, ready to be put in a class pool dictionary

asGlobalKey
     Return the receiver, ready to be put in the Smalltalk dictionary

asInteger
     Parse an Integer number from the receiver until the input character
     is invalid and answer the result at this point

asLowercase
     Returns a copy of self as a lowercase CharacterArray

asNumber
     Parse a Number from the receiver until the input character is
     invalid and answer the result at this point

asPoolKey
     Return the receiver, ready to be put in a pool dictionary

asString
     But I already am a String!  Really!

asSymbol
     Returns the symbol corresponding to the CharacterArray

asUppercase
     Returns a copy of self as an uppercase CharacterArray

fileName
     But I don't HAVE a file name!

filePos
     But I don't HAVE a file position!

isNumeric
     Answer whether the receiver denotes a number

trimSeparators
     Return a copy of the reciever without any spaces on front or back.
     The implementation is protected against the `all blanks' case.



File: gst-base.info,  Node: CharacterArray-printing,  Next: CharacterArray-storing,  Prev: CharacterArray-converting,  Up: CharacterArray

1.29.6 CharacterArray: printing
-------------------------------

displayOn: aStream
     Print a representation of the receiver on aStream. Unlike
     #printOn:, this method strips extra quotes.

displayString
     Answer a String representing the receiver. For most objects this
     is simply its #printString, but for CharacterArrays and characters,
     superfluous dollars or extra pair of quotes are stripped.

printOn: aStream
     Print a representation of the receiver on aStream



File: gst-base.info,  Node: CharacterArray-storing,  Next: CharacterArray-string processing,  Prev: CharacterArray-printing,  Up: CharacterArray

1.29.7 CharacterArray: storing
------------------------------

storeOn: aStream
     Print Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: CharacterArray-string processing,  Next: CharacterArray-testing functionality,  Prev: CharacterArray-storing,  Up: CharacterArray

1.29.8 CharacterArray: string processing
----------------------------------------

bindWith: s1
     Answer the receiver with every %1 replaced by the displayString of
     s1

bindWith: s1 with: s2
     Answer the receiver with every %1 or %2 replaced by s1 or s2,
     respectively.  s1 and s2 are `displayed' (i.e. their displayString
     is used) upon replacement.

bindWith: s1 with: s2 with: s3
     Answer the receiver with every %1, %2 or %3 replaced by s1, s2 or
     s3, respectively.  s1, s2 and s3 are `displayed' (i.e. their
     displayString is used) upon replacement.

bindWith: s1 with: s2 with: s3 with: s4
     Answer the receiver with every %1, %2, %3 or %4 replaced by s1,
     s2, s3 or s4, respectively.  s1, s2, s3 and s4 are `displayed'
     (i.e. their displayString is used) upon replacement.

bindWithArguments: anArray
     Answer the receiver with every %n (1<=n<=9) replaced by the n-th
     element of anArray.  The replaced elements are `displayed' (i.e.
     their displayString is used).  In addition, the special pattern
     %<trueString|falseString>n is replaced with one of the two strings
     depending on the n-th element of anArray being true or false.

contractTo: smallSize
     Either return myself, or a copy shortened to smallSize characters
     by inserting an ellipsis (three dots: ...)

subStrings
     Answer an OrderedCollection of substrings of the receiver. A new
     substring start at the start of the receiver, or after every
     sequence of white space characters

substrings
     Answer an OrderedCollection of substrings of the receiver. A new
     substring start at the start of the receiver, or after every
     sequence of white space characters.  This message is preserved for
     backwards compatibility; the ANSI standard mandates `subStrings',
     with an uppercase s.

substrings: aCharacter
     Answer an OrderedCollection of substrings of the receiver. A new
     substring start at the start of the receiver, or after every
     sequence of characters matching aCharacter.  This message is
     preserved for backwards compatibility; the ANSI standard mandates
     `subStrings:', with an uppercase s.

subStrings: aCharacter
     Answer an OrderedCollection of substrings of the receiver. A new
     substring start at the start of the receiver, or after every
     sequence of characters matching aCharacter



File: gst-base.info,  Node: CharacterArray-testing functionality,  Prev: CharacterArray-string processing,  Up: CharacterArray

1.29.9 CharacterArray: testing functionality
--------------------------------------------

isCharacterArray
     Answer `true'.



File: gst-base.info,  Node: CInt,  Next: Class,  Prev: CharacterArray,  Up: Base classes

1.30 CInt
=========

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CInt class-accessing::  (class)
* CInt-accessing::  (instance)


File: gst-base.info,  Node: CInt class-accessing,  Next: CInt-accessing,  Up: CInt

1.30.1 CInt class: accessing
----------------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CInt-accessing,  Prev: CInt class-accessing,  Up: CInt

1.30.2 CInt: accessing
----------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: Class,  Next: ClassDescription,  Prev: CInt,  Up: Base classes

1.31 Class
==========

Defined in namespace Smalltalk
Superclass: ClassDescription
Category: Language-Implementation
     I am THE class object.  My instances are the classes of the system.
     I provide information commonly attributed to classes: namely, the
     class name, class comment (you wouldn't be reading this if it
     weren't for me), a list of the instance variables of the class, and
     the class category.

* Menu:

* Class class-initialize::  (class)
* Class-accessing instances and variables::  (instance)
* Class-filing::  (instance)
* Class-instance creation::  (instance)
* Class-instance creation - alternative::  (instance)
* Class-pragmas::  (instance)
* Class-printing::  (instance)
* Class-saving and loading::  (instance)
* Class-security::  (instance)
* Class-testing::  (instance)
* Class-testing functionality::  (instance)


File: gst-base.info,  Node: Class class-initialize,  Next: Class-accessing instances and variables,  Up: Class

1.31.1 Class class: initialize
------------------------------

initialize
     Perform the special initialization of root classes.



File: gst-base.info,  Node: Class-accessing instances and variables,  Next: Class-filing,  Prev: Class class-initialize,  Up: Class

1.31.2 Class: accessing instances and variables
-----------------------------------------------

addClassVarName: aString
     Add a class variable with the given name to the class pool
     dictionary

addSharedPool: aDictionary
     Add the given shared pool to the list of the class' pool
     dictionaries

allClassVarNames
     Answer the names of the variables in the receiver's class pool
     dictionary and in each of the superclasses' class pool dictionaries

bindingFor: aString
     Answer the variable binding for the class variable with the given
     name

category
     Answer the class category

category: aString
     Change the class category to aString

classPool
     Answer the class pool dictionary

classVarNames
     Answer the names of the variables in the class pool dictionary

comment
     Answer the class comment

comment: aString
     Change the class name

environment
     Answer `environment'.

environment: aNamespace
     Set the receiver's environment to aNamespace and recompile
     everything

initialize
     redefined in children (?)

initializeAsRootClass
     Perform special initialization reserved to root classes.

name
     Answer the class name

removeClassVarName: aString
     Removes the class variable from the class, error if not present, or
     still in use.

removeSharedPool: aDictionary
     Remove the given dictionary to the list of the class' pool
     dictionaries

sharedPools
     Return the names of the shared pools defined by the class

superclass: aClass
     Not commented.



File: gst-base.info,  Node: Class-filing,  Next: Class-instance creation,  Prev: Class-accessing instances and variables,  Up: Class

1.31.3 Class: filing
--------------------

fileOutDeclarationOn: aFileStream
     File out class definition to aFileStream

fileOutInitializeOn: aFileStream
     Not commented.

fileOutMethodsOn: aFileStream
     File out instance methods of the receiver.

fileOutOn: aFileStream
     File out complete class description:  class definition, class and
     instance methods



File: gst-base.info,  Node: Class-instance creation,  Next: Class-instance creation - alternative,  Prev: Class-filing,  Up: Class

1.31.4 Class: instance creation
-------------------------------

extend
     Redefine a version of the receiver in the current namespace.  Note:
     this method can bite you in various ways when sent to system
     classes; read the section on namespaces in the manual for some
     examples of the problems you can encounter.

subclass: classNameString
     instanceVariableNames: stringInstVarNames     classVariableNames:
     stringOfClassVarNames     poolDictionaries: stringOfPoolNames
     category: categoryNameString Define a fixed subclass of the
     receiver with the given name, instance variables, class variables,
     pool dictionaries and category. If the class is already defined,
     if necessary, recompile everything needed.

     #int 

variable: shape subclass: classNameString
     instanceVariableNames: stringInstVarNames     classVariableNames:
     stringOfClassVarNames     poolDictionaries: stringOfPoolNames
     category: categoryNameString Define a variable pointer subclass of
     the receiver with the given name, instance variables, class
     variables, pool dictionaries and category. If the class is already
     defined, if necessary, recompile everything needed.  The shape can
     be one of #byte #int8 #short #ushort #int #uint #float #int64
     #uint64 #double or #pointer.

variableByteSubclass: classNameString
     instanceVariableNames: stringInstVarNames   classVariableNames:
     stringOfClassVarNames   poolDictionaries: stringOfPoolNames
     category: categoryNameString Define a byte variable subclass of
     the receiver with the given name, instance variables (must be "),
     class variables, pool dictionaries and category. If the class is
     already defined, if necessary, recompile everything needed.

variableSubclass: classNameString
     instanceVariableNames: stringInstVarNames     classVariableNames:
     stringOfClassVarNames     poolDictionaries: stringOfPoolNames
     category: categoryNameString Define a variable pointer subclass of
     the receiver with the given name, instance variables, class
     variables, pool dictionaries and category. If the class is already
     defined, if necessary, recompile everything needed.

variableWordSubclass: classNameString
     instanceVariableNames: stringInstVarNames   classVariableNames:
     stringOfClassVarNames   poolDictionaries: stringOfPoolNames
     category: categoryNameString Define a word variable subclass of
     the receiver with the given name, instance variables (must be "),
     class variables, pool dictionaries and category. If the class is
     already defined, if necessary, recompile everything needed.



File: gst-base.info,  Node: Class-instance creation - alternative,  Next: Class-pragmas,  Prev: Class-instance creation,  Up: Class

1.31.5 Class: instance creation - alternative
---------------------------------------------

categoriesFor: method are: categories
     Don't use this, it is only present to file in from IBM Smalltalk

subclass: classNameString classInstanceVariableNames: stringClassInstVarNames instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames
     Don't use this, it is only present to file in from IBM Smalltalk

subclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames
     Don't use this, it is only present to file in from IBM Smalltalk

variableByteSubclass: classNameString classInstanceVariableNames: stringClassInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames
     Don't use this, it is only present to file in from IBM Smalltalk

variableByteSubclass: classNameString classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames
     Don't use this, it is only present to file in from IBM Smalltalk

variableLongSubclass: classNameString classInstanceVariableNames: stringClassInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames
     Don't use this, it is only present to file in from IBM Smalltalk

variableLongSubclass: classNameString classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames
     Don't use this, it is only present to file in from IBM Smalltalk

variableSubclass: classNameString classInstanceVariableNames: stringClassInstVarNames instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames
     Don't use this, it is only present to file in from IBM Smalltalk

variableSubclass: classNameString instanceVariableNames: stringInstVarNames classVariableNames: stringOfClassVarNames poolDictionaries: stringOfPoolNames
     Don't use this, it is only present to file in from IBM Smalltalk



File: gst-base.info,  Node: Class-pragmas,  Next: Class-printing,  Prev: Class-instance creation - alternative,  Up: Class

1.31.6 Class: pragmas
---------------------

pragmaHandlerFor: aSymbol
     Not commented.

registerHandler: aBlock forPragma: pragma
     Not commented.



File: gst-base.info,  Node: Class-printing,  Next: Class-saving and loading,  Prev: Class-pragmas,  Up: Class

1.31.7 Class: printing
----------------------

article
     Answer an article (`a' or `an') which is ok for the receiver's name

printOn: aStream
     Print a representation of the receiver on aStream

storeOn: aStream
     Store Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Class-saving and loading,  Next: Class-security,  Prev: Class-printing,  Up: Class

1.31.8 Class: saving and loading
--------------------------------

binaryRepresentationVersion
     Answer a number >= 0 which represents the current version of the
     object's representation.  The default implementation answers zero.

convertFromVersion: version withFixedVariables: fixed
     indexedVariables: indexed                       for: anObjectDumper
     This method is called if a VersionableObjectProxy is attached to a
     class.  It receives the version number that was stored for the
     object (or nil if the object did not use a VersionableObjectProxy),
     the fixed instance variables, the indexed instance variables, and
     the ObjectDumper that has read the object.  The default
     implementation ignores the version and simply fills in an instance
     of the receiver with the given fixed and indexed instance
     variables (nil if the class instances are of fixed size).  If
     instance variables were removed from the class, extras are
     ignored; if the class is now fixed and used to be indexed, indexed
     is not used.

nonVersionedInstSize
     Answer the number of instance variables that the class used to have
     when objects were stored without using a VersionableObjectProxy.
     The default implementation answers the current instSize.



File: gst-base.info,  Node: Class-security,  Next: Class-testing,  Prev: Class-saving and loading,  Up: Class

1.31.9 Class: security
----------------------

check: aPermission
     Not commented.

policy
     Answer `securityPolicy'.

policy: aSecurityPolicy
     Not commented.



File: gst-base.info,  Node: Class-testing,  Next: Class-testing functionality,  Prev: Class-security,  Up: Class

1.31.10 Class: testing
----------------------

= aClass
     Returns true if the two class objects are to be considered equal.



File: gst-base.info,  Node: Class-testing functionality,  Prev: Class-testing,  Up: Class

1.31.11 Class: testing functionality
------------------------------------

asClass
     Answer the receiver.

isClass
     Answer `true'.



File: gst-base.info,  Node: ClassDescription,  Next: CLong,  Prev: Class,  Up: Base classes

1.32 ClassDescription
=====================

Defined in namespace Smalltalk
Superclass: Behavior
Category: Language-Implementation
     My instances provide methods that access classes by category, and
     allow whole categories of classes to be filed out to external disk
     files.

* Menu:

* ClassDescription-compiling::  (instance)
* ClassDescription-conversion::  (instance)
* ClassDescription-copying::  (instance)
* ClassDescription-filing::  (instance)
* ClassDescription-organization of messages and classes::  (instance)
* ClassDescription-printing::  (instance)


File: gst-base.info,  Node: ClassDescription-compiling,  Next: ClassDescription-conversion,  Up: ClassDescription

1.32.1 ClassDescription: compiling
----------------------------------

compile: code classified: categoryName
     Compile code in the receiver, assigning the method to the given
     category.  Answer the newly created CompiledMethod, or nil if an
     error was found.

compile: code classified: categoryName ifError: block
     Compile method source and install in method category,
     categoryName.  If there are parsing errors, invoke exception
     block, 'block' (see compile:ifError:).  Return the method

compile: code classified: categoryName notifying: requestor
     Compile method source and install in method category,
     categoryName.  If there are parsing errors, send an error message
     to requestor



File: gst-base.info,  Node: ClassDescription-conversion,  Next: ClassDescription-copying,  Prev: ClassDescription-compiling,  Up: ClassDescription

1.32.2 ClassDescription: conversion
-----------------------------------

asClass
     This method's functionality should be implemented by subclasses of
     ClassDescription

asMetaclass
     Answer the metaclass associated to the receiver

binding
     Answer a VariableBinding object whose value is the receiver



File: gst-base.info,  Node: ClassDescription-copying,  Next: ClassDescription-filing,  Prev: ClassDescription-conversion,  Up: ClassDescription

1.32.3 ClassDescription: copying
--------------------------------

copy: selector from: aClass
     Copy the given selector from aClass, assigning it the same category

copy: selector from: aClass classified: categoryName
     Copy the given selector from aClass, assigning it the given
     category

copyAll: arrayOfSelectors from: class
     Copy all the selectors in arrayOfSelectors from class, assigning
     them the same category they have in class

copyAll: arrayOfSelectors from: class classified: categoryName
     Copy all the selectors in arrayOfSelectors from aClass, assigning
     them the given category

copyAllCategoriesFrom: aClass
     Copy all the selectors in aClass, assigning them the original
     category

copyCategory: categoryName from: aClass
     Copy all the selectors in from aClass that belong to the given
     category

copyCategory: categoryName from: aClass classified: newCategoryName
     Copy all the selectors in from aClass that belong to the given
     category, reclassifying them as belonging to the given category



File: gst-base.info,  Node: ClassDescription-filing,  Next: ClassDescription-organization of messages and classes,  Prev: ClassDescription-copying,  Up: ClassDescription

1.32.4 ClassDescription: filing
-------------------------------

fileOut: fileName
     Open the given file and to file out a complete class description
     to it

fileOutCategory: categoryName to: fileName
     File out all the methods belonging to the method category,
     categoryName, to the fileName file

fileOutCategory: category toStream: aFileStream
     File out all the methods belonging to the method category,
     categoryName, to aFileStream

fileOutHeaderOn: aFileStream
     Write date and time stamp to aFileStream

fileOutOn: aFileStream
     File out complete class description:  class definition, class and
     instance methods

fileOutSelector: selector to: fileName
     File out the given selector to fileName



File: gst-base.info,  Node: ClassDescription-organization of messages and classes,  Next: ClassDescription-printing,  Prev: ClassDescription-filing,  Up: ClassDescription

1.32.5 ClassDescription: organization of messages and classes
-------------------------------------------------------------

classify: aSelector under: aString
     Put the method identified by the selector aSelector under the
     category given by aString.

createGetMethod: what
     Create a method accessing the variable `what'.

createGetMethod: what default: value
     Create a method accessing the variable `what', with a default value
     of `value', using lazy initialization

createSetMethod: what
     Create a method which sets the variable `what'.

defineAsyncCFunc: cFuncNameString
     withSelectorArgs: selectorAndArgs     args: argsArray See
     documentation.  This function is deprecated, you should use the
     <asyncCCall: ... > special syntax instead.

defineCFunc: cFuncNameString
     withSelectorArgs: selectorAndArgs     returning: returnTypeSymbol
       args: argsArray See documentation.  This function is
     deprecated, you should use the <asyncCCall: ... > special syntax
     instead.

removeCategory: aString
     Remove from the receiver every method belonging to the given
     category

whichCategoryIncludesSelector: selector
     Answer the category for the given selector, or nil if the selector
     is not found



File: gst-base.info,  Node: ClassDescription-printing,  Prev: ClassDescription-organization of messages and classes,  Up: ClassDescription

1.32.6 ClassDescription: printing
---------------------------------

classVariableString
     This method's functionality should be implemented by subclasses of
     ClassDescription

instanceVariableString
     Answer a string containing the name of the receiver's instance
     variables.

nameIn: aNamespace
     Answer the class name when the class is referenced from aNamespace

printOn: aStream in: aNamespace
     Print on aStream the class name when the class is referenced from
     aNamespace

sharedVariableString
     This method's functionality should be implemented by subclasses of
     ClassDescription



File: gst-base.info,  Node: CLong,  Next: CLongDouble,  Prev: ClassDescription,  Up: Base classes

1.33 CLong
==========

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CLong class-accessing::  (class)
* CLong-accessing::  (instance)


File: gst-base.info,  Node: CLong class-accessing,  Next: CLong-accessing,  Up: CLong

1.33.1 CLong class: accessing
-----------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CLong-accessing,  Prev: CLong class-accessing,  Up: CLong

1.33.2 CLong: accessing
-----------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CLongDouble,  Next: CObject,  Prev: CLong,  Up: Base classes

1.34 CLongDouble
================

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CLongDouble class-accessing::  (class)
* CLongDouble-accessing::  (instance)


File: gst-base.info,  Node: CLongDouble class-accessing,  Next: CLongDouble-accessing,  Up: CLongDouble

1.34.1 CLongDouble class: accessing
-----------------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CLongDouble-accessing,  Prev: CLongDouble class-accessing,  Up: CLongDouble

1.34.2 CLongDouble: accessing
-----------------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CObject,  Next: Collection,  Prev: CLongDouble,  Up: Base classes

1.35 CObject
============

Defined in namespace Smalltalk
Superclass: Object
Category: Language-C interface
     I am not part of the standard Smalltalk kernel class hierarchy.
     My instances contain values that are not interpreted by the
     Smalltalk system; they frequently hold "pointers" to data outside
     of the Smalltalk environment.  The C callout mechanism allows my
     instances to be transformed into their corresponding C values for
     use in external routines.

* Menu:

* CObject class-conversion::  (class)
* CObject class-instance creation::  (class)
* CObject-accessing::  (instance)
* CObject-C data access::  (instance)
* CObject-conversion::  (instance)
* CObject-finalization::  (instance)
* CObject-pointer-like behavior::  (instance)


File: gst-base.info,  Node: CObject class-conversion,  Next: CObject class-instance creation,  Up: CObject

1.35.1 CObject class: conversion
--------------------------------

scalarIndex
     Nothing special in the default case - answer a CType for the
     receiver

type
     Nothing special in the default case - answer a CType for the
     receiver



File: gst-base.info,  Node: CObject class-instance creation,  Next: CObject-accessing,  Prev: CObject class-conversion,  Up: CObject

1.35.2 CObject class: instance creation
---------------------------------------

address: anInteger
     Answer a new object pointing to the passed address, anInteger

alloc: nBytes
     Allocate nBytes bytes and return an instance of the receiver

alloc: nBytes type: cTypeObject
     Allocate nBytes bytes and return a CObject of the given type

new
     Answer a new object pointing to NULL.

new: nBytes
     Allocate nBytes bytes and return an instance of the receiver



File: gst-base.info,  Node: CObject-accessing,  Next: CObject-C data access,  Prev: CObject class-instance creation,  Up: CObject

1.35.3 CObject: accessing
-------------------------

address
     Answer the address the receiver is pointing to.

address: anInteger
     Set the receiver to point to the passed address, anInteger

printOn: aStream
     Print a representation of the receiver

type: aCType
     Set the receiver's type to aCType.



File: gst-base.info,  Node: CObject-C data access,  Next: CObject-conversion,  Prev: CObject-accessing,  Up: CObject

1.35.4 CObject: C data access
-----------------------------

at: byteOffset put: aValue type: aType
     Store aValue as data of the given type from byteOffset bytes after
     the pointer stored in the receiver

at: byteOffset type: aType
     Answer some data of the given type from byteOffset bytes after the
     pointer stored in the receiver

free
     Free the receiver's pointer and set it to null. Big trouble hits
     you if the receiver doesn't point to the base of a malloc-ed area.



File: gst-base.info,  Node: CObject-conversion,  Next: CObject-finalization,  Prev: CObject-C data access,  Up: CObject

1.35.5 CObject: conversion
--------------------------

castTo: aType
     Answer another CObject, pointing to the same address as the
     receiver, but belonging to the aType CType.

narrow
     This method is called on CObjects returned by a C call-out whose
     return type is specified as a CType; it mostly allows one to
     change the class of the returned CObject.  By default it does
     nothing, and that's why it is not called when #cObject is used to
     specify the return type.

scalarIndex
     Nothing special in the default case - answer the receiver's CType

type
     Answer a CType for the receiver



File: gst-base.info,  Node: CObject-finalization,  Next: CObject-pointer-like behavior,  Prev: CObject-conversion,  Up: CObject

1.35.6 CObject: finalization
----------------------------

finalize
     To make the VM call this, use #addToBeFinalized. It frees
     automatically any memory pointed to by the CObject. It is not
     automatically enabled because big trouble hits you if you use
     #free and the receiver doesn't point to the base of a malloc-ed
     area.



File: gst-base.info,  Node: CObject-pointer-like behavior,  Prev: CObject-finalization,  Up: CObject

1.35.7 CObject: pointer-like behavior
-------------------------------------

+ anInteger
     Return another instance of the receiver's class which points at
     &receiver[anInteger] (or, if you prefer, what `receiver +
     anInteger' does in C).

- intOrPtr
     If intOrPtr is an integer, return another instance of the
     receiver's class pointing at &receiver[-anInteger] (or, if you
     prefer, what `receiver - anInteger' does in C).  If it is the same
     class as the receiver, return the difference in chars, i.e. in
     bytes, between the two pointed addresses (or, if you prefer, what
     `receiver - anotherCharPtr' does in C)

addressAt: anIndex
     Return a new CObject of the element type, corresponding to an
     object that is anIndex places past the receiver (remember that
     CObjects represent pointers and that C pointers behave like
     arrays).  anIndex is zero-based, just like with all other C-style
     accessing.

at: anIndex
     Dereference a pointer that is anIndex places past the receiver
     (remember that CObjects represent pointers and that C pointers
     behave like arrays).  anIndex is zero-based, just like with all
     other C-style accessing.

at: anIndex put: aValue
     Store anIndex places past the receiver the passed Smalltalk object
     or CObject `aValue'; if it is a CObject is dereferenced: that is,
     this method is equivalent either to cobj[anIndex]=aValue or
     cobj[anIndex]=*aValue.  anIndex is zero-based, just like with all
     other C-style accessing.  In both cases, aValue should be of the
     element type or of the corresponding Smalltalk type (that is, a
     String is ok for an array of CStrings) to avoid typing problems
     which however will not be signaled because C is untyped.

decr
     Adjust the pointer by sizeof(dereferencedType) bytes down (i.e.
     -receiver)

decrBy: anInteger
     Adjust the pointer by anInteger elements down (i.e. receiver -=
     anInteger)

incr
     Adjust the pointer by sizeof(dereferencedType) bytes up (i.e.
     ++receiver)

incrBy: anInteger
     Adjust the pointer by anInteger elements up (i.e. receiver +=
     anInteger)



File: gst-base.info,  Node: Collection,  Next: CompiledBlock,  Prev: CObject,  Up: Base classes

1.36 Collection
===============

Defined in namespace Smalltalk
Superclass: Object
Category: Collections
     I am an abstract class.  My instances are collections of objects.
     My subclasses may place some restrictions or add some definitions
     to how the objects are stored or organized; I say nothing about
     this.  I merely provide some object creation and access routines
     for general collections of objects.

* Menu:

* Collection class-instance creation::  (class)
* Collection-adding::  (instance)
* Collection-converting::  (instance)
* Collection-copying Collections::  (instance)
* Collection-enumeration::  (instance)
* Collection-finalization::  (instance)
* Collection-printing::  (instance)
* Collection-removing::  (instance)
* Collection-storing::  (instance)
* Collection-testing collections::  (instance)


File: gst-base.info,  Node: Collection class-instance creation,  Next: Collection-adding,  Up: Collection

1.36.1 Collection class: instance creation
------------------------------------------

with: anObject
     Answer a collection whose only element is anObject

with: firstObject with: secondObject
     Answer a collection whose only elements are the parameters in the
     order they were passed

with: firstObject with: secondObject with: thirdObject
     Answer a collection whose only elements are the parameters in the
     order they were passed

with: firstObject with: secondObject with: thirdObject with: fourthObject
     Answer a collection whose only elements are the parameters in the
     order they were passed

with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject
     Answer a collection whose only elements are the parameters in the
     order they were passed

withAll: aCollection
     Answer a collection whose elements are all those in aCollection



File: gst-base.info,  Node: Collection-adding,  Next: Collection-converting,  Prev: Collection class-instance creation,  Up: Collection

1.36.2 Collection: adding
-------------------------

add: newObject
     Add newObject to the receiver, answer it

addAll: aCollection
     Adds all the elements of 'aCollection' to the receiver, answer
     aCollection



File: gst-base.info,  Node: Collection-converting,  Next: Collection-copying Collections,  Prev: Collection-adding,  Up: Collection

1.36.3 Collection: converting
-----------------------------

asArray
     Answer an Array containing all the elements in the receiver

asBag
     Answer a Bag containing all the elements in the receiver

asByteArray
     Answer a ByteArray containing all the elements in the receiver

asOrderedCollection
     Answer an OrderedCollection containing all the elements in the
     receiver

     order

asRunArray
     Answer the receiver converted to a RunArray. If the receiver is not
     ordered the order of the elements in the RunArray might not be the
     #do: order.

asSet
     Answer a Set containing all the elements in the receiver with no
     duplicates

asSortedCollection
     Answer a SortedCollection containing all the elements in the
     receiver with the default sort block - [ :a :b | a <= b ]

asSortedCollection: aBlock
     Answer a SortedCollection whose elements are the elements of the
     receiver, sorted according to the sort block aBlock



File: gst-base.info,  Node: Collection-copying Collections,  Next: Collection-enumeration,  Prev: Collection-converting,  Up: Collection

1.36.4 Collection: copying Collections
--------------------------------------

copyReplacing: targetObject withObject: newObject
     Copy replacing each object which is = to targetObject with
     newObject

copyWith: newElement
     Answer a copy of the receiver to which newElement is added

copyWithout: oldElement
     Answer a copy of the receiver to which all occurrences of
     oldElement are removed



File: gst-base.info,  Node: Collection-enumeration,  Next: Collection-finalization,  Prev: Collection-copying Collections,  Up: Collection

1.36.5 Collection: enumeration
------------------------------

allSatisfy: aBlock
     Search the receiver for an element for which aBlock returns false.
     Answer true if none does, false otherwise.

anyOne
     Answer an unspecified element of the collection.

anySatisfy: aBlock
     Search the receiver for an element for which aBlock returns true.
     Answer true if some does, false otherwise.

beConsistent
     This method is private, but it is quite interesting so it is
     documented. It ensures that a collection is in a consistent state
     before attempting to iterate on it; its presence reduces the
     number of overrides needed by collections who try to amortize
     their execution times.  The default implementation does nothing,
     so it is optimized out by the virtual machine and so it loses very
     little on the performance side.  Note that descendants of
     Collection have to call it explicitly since #do: is abstract in
     Collection.

collect: aBlock
     Answer a new instance of a Collection containing all the results
     of evaluating aBlock passing each of the receiver's elements

conform: aBlock
     Search the receiver for an element for which aBlock returns false.
     Answer true if none does, false otherwise.

contains: aBlock
     Search the receiver for an element for which aBlock returns true.
     Answer true if some does, false otherwise.

detect: aBlock
     Search the receiver for an element for which aBlock returns true.
     If some does, answer it. If none does, fail

detect: aBlock ifNone: exceptionBlock
     Search the receiver for an element for which aBlock returns true.
     If some does, answer it. If none does, answer the result of
     evaluating aBlock

do: aBlock
     Enumerate each object of the receiver, passing them to aBlock

do: aBlock separatedBy: separatorBlock
     Enumerate each object of the receiver, passing them to aBlock.
     Between every two invocations of aBlock, invoke separatorBlock

fold: binaryBlock
     First, pass to binaryBlock the first and second elements of the
     receiver; for each subsequent element, pass the result of the
     previous evaluation and an element. Answer the result of the last
     invocation, or the first element if the collection has size 1.
     Fail if the collection is empty.

inject: thisValue into: binaryBlock
     First, pass to binaryBlock thisValue and the first element of the
     receiver; for each subsequent element, pass the result of the
     previous evaluation and an element. Answer the result of the last
     invocation.

reject: aBlock
     Answer a new instance of a Collection containing all the elements
     in the receiver which, when passed to aBlock, don't answer true

select: aBlock
     Answer a new instance of a Collection containing all the elements
     in the receiver which, when passed to aBlock, answer true



File: gst-base.info,  Node: Collection-finalization,  Next: Collection-printing,  Prev: Collection-enumeration,  Up: Collection

1.36.6 Collection: finalization
-------------------------------

mourn: anObject
     Private - anObject has been found to have a weak key, remove it
     and possibly finalize the key.



File: gst-base.info,  Node: Collection-printing,  Next: Collection-removing,  Prev: Collection-finalization,  Up: Collection

1.36.7 Collection: printing
---------------------------

inspect
     Print all the instance variables and objects in the receiver on the
     Transcript

printOn: aStream
     Print a representation of the receiver on aStream



File: gst-base.info,  Node: Collection-removing,  Next: Collection-storing,  Prev: Collection-printing,  Up: Collection

1.36.8 Collection: removing
---------------------------

empty
     Remove everything from the receiver.

remove: oldObject
     Remove oldObject from the receiver. If absent, fail, else answer
     oldObject.

remove: oldObject ifAbsent: anExceptionBlock
     Remove oldObject from the receiver. If absent, evaluate
     anExceptionBlock and answer the result, else answer oldObject.

removeAll: aCollection
     Remove each object in aCollection, answer aCollection, fail if some
     of them is absent. Warning: this could leave the collection in a
     semi-updated state.

removeAll: aCollection ifAbsent: aBlock
     Remove each object in aCollection, answer aCollection; if some
     element is absent, pass it to aBlock.



File: gst-base.info,  Node: Collection-storing,  Next: Collection-testing collections,  Prev: Collection-removing,  Up: Collection

1.36.9 Collection: storing
--------------------------

storeOn: aStream
     Store Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Collection-testing collections,  Prev: Collection-storing,  Up: Collection

1.36.10 Collection: testing collections
---------------------------------------

capacity
     Answer how many elements the receiver can hold before having to
     grow.

identityIncludes: anObject
     Answer whether we include the anObject object

includes: anObject
     Answer whether we include anObject

isEmpty
     Answer whether we are (still) empty

notEmpty
     Answer whether we include at least one object

occurrencesOf: anObject
     Answer how many occurrences of anObject we include

size
     Answer how many objects we include



File: gst-base.info,  Node: CompiledBlock,  Next: CompiledCode,  Prev: Collection,  Up: Base classes

1.37 CompiledBlock
==================

Defined in namespace Smalltalk
Superclass: CompiledCode
Category: Language-Implementation
     I represent a block that has been compiled.

* Menu:

* CompiledBlock class-instance creation::  (class)
* CompiledBlock-accessing::  (instance)
* CompiledBlock-basic::  (instance)
* CompiledBlock-printing::  (instance)
* CompiledBlock-saving and loading::  (instance)


File: gst-base.info,  Node: CompiledBlock class-instance creation,  Next: CompiledBlock-accessing,  Up: CompiledBlock

1.37.1 CompiledBlock class: instance creation
---------------------------------------------

new: numBytecodes header: anInteger method: outerMethod
     Answer a new instance of the receiver with room for the given
     number of bytecodes and the given header.

numArgs: args numTemps: temps bytecodes: bytecodes depth: depth literals: literalArray
     Answer an (almost) full fledged CompiledBlock.  To make it
     complete, you must either set the new object's `method' variable,
     or put it into a BlockClosure and put the BlockClosure into a
     CompiledMethod's literals.  The clean-ness of the block is
     automatically computed.



File: gst-base.info,  Node: CompiledBlock-accessing,  Next: CompiledBlock-basic,  Prev: CompiledBlock class-instance creation,  Up: CompiledBlock

1.37.2 CompiledBlock: accessing
-------------------------------

flags
     Answer the `cleanness' of the block.  0 = clean; 1 = access to
     receiver variables and/or self; 2-30 = access to variables that
     are 1-29 contexts away; 31 = return from method or push thisContext

method
     Answer the CompiledMethod in which the receiver lies

methodClass
     Answer the class in which the receiver is installed.

methodClass: methodClass
     Set the receiver's class instance variable

numArgs
     Answer the number of arguments passed to the receiver

numLiterals
     Answer the number of literals for the receiver

numTemps
     Answer the number of temporary variables used by the receiver

selector
     Answer the selector through which the method is called

selector: aSymbol
     Set the selector through which the method is called

stackDepth
     Answer the number of stack slots needed for the receiver



File: gst-base.info,  Node: CompiledBlock-basic,  Next: CompiledBlock-printing,  Prev: CompiledBlock-accessing,  Up: CompiledBlock

1.37.3 CompiledBlock: basic
---------------------------

= aMethod
     Answer whether the receiver and aMethod are equal

methodCategory
     Answer the method category

methodCategory: aCategory
     Set the method category to the given string

methodSourceCode
     Answer the method source code (a FileSegment or String or nil)

methodSourceFile
     Answer the file where the method source code is stored

methodSourcePos
     Answer the location where the method source code is stored in the
     methodSourceFile

methodSourceString
     Answer the method source code as a string



File: gst-base.info,  Node: CompiledBlock-printing,  Next: CompiledBlock-saving and loading,  Prev: CompiledBlock-basic,  Up: CompiledBlock

1.37.4 CompiledBlock: printing
------------------------------

printOn: aStream
     Print the receiver's class and selector on aStream



File: gst-base.info,  Node: CompiledBlock-saving and loading,  Prev: CompiledBlock-printing,  Up: CompiledBlock

1.37.5 CompiledBlock: saving and loading
----------------------------------------

     to

binaryRepresentationObject
     This method is implemented to allow for a PluggableProxy to be used
     with CompiledBlocks.  Answer a DirectedMessage which sends
     #blockAt: to the CompiledMethod containing the receiver.



File: gst-base.info,  Node: CompiledCode,  Next: CompiledMethod,  Prev: CompiledBlock,  Up: Base classes

1.38 CompiledCode
=================

Defined in namespace Smalltalk
Superclass: ArrayedCollection
Category: Language-Implementation
     I represent code that has been compiled.  I am an abstract
     superclass for blocks and methods

* Menu:

* CompiledCode class-cache flushing::  (class)
* CompiledCode class-instance creation::  (class)
* CompiledCode class-tables::  (class)
* CompiledCode-accessing::  (instance)
* CompiledCode-basic::  (instance)
* CompiledCode-copying::  (instance)
* CompiledCode-debugging::  (instance)
* CompiledCode-decoding bytecodes::  (instance)
* CompiledCode-literals - iteration::  (instance)
* CompiledCode-security::  (instance)
* CompiledCode-testing accesses::  (instance)
* CompiledCode-translation::  (instance)


File: gst-base.info,  Node: CompiledCode class-cache flushing,  Next: CompiledCode class-instance creation,  Up: CompiledCode

1.38.1 CompiledCode class: cache flushing
-----------------------------------------

flushTranslatorCache
     Answer any kind of cache mantained by a just-in-time code
     translator in the virtual machine (if any).  Do nothing for now.



File: gst-base.info,  Node: CompiledCode class-instance creation,  Next: CompiledCode class-tables,  Prev: CompiledCode class-cache flushing,  Up: CompiledCode

1.38.2 CompiledCode class: instance creation
--------------------------------------------

new: numBytecodes header: anInteger literals: literals
     Answer a new instance of the receiver with room for the given
     number of bytecodes and the given header

new: numBytecodes header: anInteger numLiterals: numLiterals
     Answer a new instance of the receiver with room for the given
     number of bytecodes and the given header



File: gst-base.info,  Node: CompiledCode class-tables,  Next: CompiledCode-accessing,  Prev: CompiledCode class-instance creation,  Up: CompiledCode

1.38.3 CompiledCode class: tables
---------------------------------

bytecodeInfoTable
     Return a ByteArray which defines some properties of the bytecodes.
     For each bytecode, 4 bytes are reserved.  The fourth byte is a
     flag byte: bit 7 means that the argument is a line number to be
     used in creating the bytecode->line number map.  The first three
     have a meaning only for those bytecodes that represent a
     combination of operations: the combination can be BC1 ARG BC2
     OPERAND      if the fourth byte's bit 0 = 0 or  BC1 OPERAND BC2
     ARG      if the fourth byte's bit 0 = 1 where BC1 is the first
     byte, BC2 is the second, ARG is the third and OPERAND is the
     bytecode argument as it appears in the bytecode stream.

specialSelectors
     This method should not be called for instances of this class.

specialSelectorsNumArgs
     Not commented.



File: gst-base.info,  Node: CompiledCode-accessing,  Next: CompiledCode-basic,  Prev: CompiledCode class-tables,  Up: CompiledCode

1.38.4 CompiledCode: accessing
------------------------------

at: anIndex put: aBytecode
     Store aBytecode as the anIndex-th bytecode

blockAt: anIndex
     Answer the CompiledBlock attached to the anIndex-th literal,
     assuming that the literal is a CompiledBlock or a BlockClosure.

bytecodeAt: anIndex
     Answer the anIndex-th bytecode

bytecodeAt: anIndex put: aBytecode
     Store aBytecode as the anIndex-th bytecode

flags
     Private - Answer the optimization flags for the receiver

isAnnotated
     Answer `false'.

literalAt: anIndex
     Answer the anIndex-th literal

literalAt: anInteger put: aValue
     Store aValue as the anIndex-th literal

literals
     Not commented.

methodClass
     Answer the class in which the receiver is installed.

methodClass: methodClass
     Set the receiver's class instance variable

numArgs
     Answer the number of arguments for the receiver

numLiterals
     Answer the number of literals for the receiver

numTemps
     Answer the number of temporaries for the receiver

primitive
     Answer the primitive called by the receiver

selector
     Answer the selector through which the method is called

selector: aSymbol
     Set the selector through which the method is called

stackDepth
     Answer the number of stack slots needed for the receiver



File: gst-base.info,  Node: CompiledCode-basic,  Next: CompiledCode-copying,  Prev: CompiledCode-accessing,  Up: CompiledCode

1.38.5 CompiledCode: basic
--------------------------

= aMethod
     Answer whether the receiver and aMethod are equal

hash
     Answer an hash value for the receiver

methodCategory
     Answer the method category

methodCategory: aCategory
     Set the method category to the given string

methodSourceCode
     Answer the method source code (a FileSegment or String or nil)

methodSourceFile
     Answer the file where the method source code is stored

methodSourcePos
     Answer the location where the method source code is stored in the
     methodSourceFile

methodSourceString
     Answer the method source code as a string



File: gst-base.info,  Node: CompiledCode-copying,  Next: CompiledCode-debugging,  Prev: CompiledCode-basic,  Up: CompiledCode

1.38.6 CompiledCode: copying
----------------------------

deepCopy
     Answer a deep copy of the receiver



File: gst-base.info,  Node: CompiledCode-debugging,  Next: CompiledCode-decoding bytecodes,  Prev: CompiledCode-copying,  Up: CompiledCode

1.38.7 CompiledCode: debugging
------------------------------

inspect
     Print the contents of the receiver in a verbose way.



File: gst-base.info,  Node: CompiledCode-decoding bytecodes,  Next: CompiledCode-literals - iteration,  Prev: CompiledCode-debugging,  Up: CompiledCode

1.38.8 CompiledCode: decoding bytecodes
---------------------------------------

dispatchTo: anObject with: param
     Disassemble the bytecodes and tell anObject about them in the form
     of message sends.  param is given as an argument to every message
     send.



File: gst-base.info,  Node: CompiledCode-literals - iteration,  Next: CompiledCode-security,  Prev: CompiledCode-decoding bytecodes,  Up: CompiledCode

1.38.9 CompiledCode: literals - iteration
-----------------------------------------

allLiteralsDo: aBlock
     Not commented.

allLiteralSymbolsDo: aBlock
     Not commented.

literalsDo: aBlock
     Not commented.

traverseLiteral: anArray with: aBlock
     Not commented.



File: gst-base.info,  Node: CompiledCode-security,  Next: CompiledCode-testing accesses,  Prev: CompiledCode-literals - iteration,  Up: CompiledCode

1.38.10 CompiledCode: security
------------------------------

verify
     Verify the bytecodes for the receiver, and raise an exception if
     the verification process failed.



File: gst-base.info,  Node: CompiledCode-testing accesses,  Next: CompiledCode-translation,  Prev: CompiledCode-security,  Up: CompiledCode

1.38.11 CompiledCode: testing accesses
--------------------------------------

accesses: instVarIndex
     Answer whether the receiver accesses the instance variable with
     the given index

assigns: instVarIndex
     Answer whether the receiver writes to the instance variable with
     the given index

containsLiteral: anObject
     Answer if the receiver contains a literal which is equal to
     anObject.

hasBytecode: byte between: firstIndex and: lastIndex
     Answer whether the receiver includes the `byte' bytecode in any of
     the indices between firstIndex and lastIndex.

jumpDestinationAt: anIndex
     Answer where the jump at bytecode index `anIndex' lands

reads: instVarIndex
     Answer whether the receiver reads the instance variable with the
     given index

refersTo: anObject
     Answer whether the receiver refers to the given object

sourceCodeMap
     Answer an array which maps bytecode indices to source code line
     numbers.  0 values represent invalid instruction pointer indices.



File: gst-base.info,  Node: CompiledCode-translation,  Prev: CompiledCode-testing accesses,  Up: CompiledCode

1.38.12 CompiledCode: translation
---------------------------------

discardTranslation
     Flush the just-in-time translated code for the receiver (if any).



File: gst-base.info,  Node: CompiledMethod,  Next: ContextPart,  Prev: CompiledCode,  Up: Base classes

1.39 CompiledMethod
===================

Defined in namespace Smalltalk
Superclass: CompiledCode
Category: Language-Implementation
     I represent methods that have been compiled.  I can recompile
     methods from their source code, I can invoke Emacs to edit the
     source code for one of my instances, and I know how to access
     components of my instances.

* Menu:

* CompiledMethod class-instance creation::  (class)
* CompiledMethod class-lean images::  (class)
* CompiledMethod-accessing::  (instance)
* CompiledMethod-attributes::  (instance)
* CompiledMethod-basic::  (instance)
* CompiledMethod-c call-outs::  (instance)
* CompiledMethod-invoking::  (instance)
* CompiledMethod-printing::  (instance)
* CompiledMethod-saving and loading::  (instance)
* CompiledMethod-testing::  (instance)


File: gst-base.info,  Node: CompiledMethod class-instance creation,  Next: CompiledMethod class-lean images,  Up: CompiledMethod

1.39.1 CompiledMethod class: instance creation
----------------------------------------------

literals: lits numArgs: numArg numTemps: numTemp
     attributes: attrArray bytecodes: bytecodes depth: depth Answer a
     full fledged CompiledMethod. Construct the method header from the
     parameters, and set the literals and bytecodes to the provided
     ones.  Also, the bytecodes are optimized and any embedded
     CompiledBlocks modified to refer to these literals and to the
     newly created CompiledMethod.

numArgs: args
     Create a user-defined method (one that is sent
     #valueWithReceiver:withArguments: when it is invoked) with numArgs
     arguments.  This only makes sense when called for a subclass of
     CompiledMethod.



File: gst-base.info,  Node: CompiledMethod class-lean images,  Next: CompiledMethod-accessing,  Prev: CompiledMethod class-instance creation,  Up: CompiledMethod

1.39.2 CompiledMethod class: lean images
----------------------------------------

stripSourceCode
     Remove all the references to method source code from the system



File: gst-base.info,  Node: CompiledMethod-accessing,  Next: CompiledMethod-attributes,  Prev: CompiledMethod class-lean images,  Up: CompiledMethod

1.39.3 CompiledMethod: accessing
--------------------------------

allBlocksDo: aBlock
     Evaluate aBlock, passing to it all the CompiledBlocks it holds

allLiterals
     Answer the literals referred to by the receiver and all the blocks
     in it

flags
     Private - Answer the optimization flags for the receiver

methodClass
     Answer the class in which the receiver is installed.

methodClass: methodClass
     Set the receiver's class instance variable

numArgs
     Answer the number of arguments for the receiver

numTemps
     Answer the number of temporaries for the receiver

primitive
     Answer the primitive called by the receiver

selector
     Answer the selector through which the method is called

selector: aSymbol
     Set the selector through which the method is called

stackDepth
     Answer the number of stack slots needed for the receiver

withAllBlocksDo: aBlock
     Evaluate aBlock, passing the receiver and all the CompiledBlocks it
     holds

withNewMethodClass: class
     Answer either the receiver or a copy of it, with the method class
     set to class

withNewMethodClass: class selector: selector
     Answer either the receiver or a copy of it, with the method class
     set to class



File: gst-base.info,  Node: CompiledMethod-attributes,  Next: CompiledMethod-basic,  Prev: CompiledMethod-accessing,  Up: CompiledMethod

1.39.4 CompiledMethod: attributes
---------------------------------

attributeAt: aSymbol
     Return a Message for the first attribute named aSymbol defined by
     the receiver, or answer an error if none was found.

attributeAt: aSymbol ifAbsent: aBlock
     Return a Message for the first attribute named aSymbol defined by
     the receiver, or evaluate aBlock is none was found.

attributes
     Return an Array of Messages, one for each attribute defined by the
     receiver.

attributesDo: aBlock
     Evaluate aBlock once for each attribute defined by the receiver,
     passing a Message each time.

isAnnotated
     If the receiver has any attributes, answer true.

primitiveAttribute
     If the receiver defines a primitive, return a Message resembling
     the attribute that was used to define it.



File: gst-base.info,  Node: CompiledMethod-basic,  Next: CompiledMethod-c call-outs,  Prev: CompiledMethod-attributes,  Up: CompiledMethod

1.39.5 CompiledMethod: basic
----------------------------

= aMethod
     Answer whether the receiver and aMethod are equal

hash
     Answer an hash value for the receiver

methodCategory
     Answer the method category

methodCategory: aCategory
     Set the method category to the given string

methodSourceCode
     Answer the method source code (a FileSegment or String or nil)

methodSourceFile
     Answer the file where the method source code is stored

methodSourcePos
     Answer the location where the method source code is stored in the
     methodSourceFile

methodSourceString
     Answer the method source code as a string



File: gst-base.info,  Node: CompiledMethod-c call-outs,  Next: CompiledMethod-invoking,  Prev: CompiledMethod-basic,  Up: CompiledMethod

1.39.6 CompiledMethod: c call-outs
----------------------------------

isValidCCall
     Not commented.

rewriteAsAsyncCCall: func args: argsArray
     Not commented.

rewriteAsCCall: func returning: returnType args: argsArray
     Not commented.



File: gst-base.info,  Node: CompiledMethod-invoking,  Next: CompiledMethod-printing,  Prev: CompiledMethod-c call-outs,  Up: CompiledMethod

1.39.7 CompiledMethod: invoking
-------------------------------

valueWithReceiver: anObject withArguments: args
     Execute the method within anObject, passing the elements of the
     args Array as parameters.  The method need not reside on the
     hierarchy from the receiver's class to Object - it need not reside
     at all in a MethodDictionary, in fact - but doing bad things will
     compromise stability of the Smalltalk virtual machine (and don't
     blame anybody but yourself).  If the flags field of the method
     header is 6, this method instead provides a hook from which the
     virtual machine can call back whenever execution of the method is
     requested.  In this case, invoking the method would cause an
     infinite loop (the VM asks the method to run, the method asks the
     VM to invoke it, and so on), so this method fails with a
     #subclassResponsibility error.



File: gst-base.info,  Node: CompiledMethod-printing,  Next: CompiledMethod-saving and loading,  Prev: CompiledMethod-invoking,  Up: CompiledMethod

1.39.8 CompiledMethod: printing
-------------------------------

printOn: aStream
     Print the receiver's class and selector on aStream

storeOn: aStream
     Print code to create the receiver on aStream



File: gst-base.info,  Node: CompiledMethod-saving and loading,  Next: CompiledMethod-testing,  Prev: CompiledMethod-printing,  Up: CompiledMethod

1.39.9 CompiledMethod: saving and loading
-----------------------------------------

     to

binaryRepresentationObject
     This method is implemented to allow for a PluggableProxy to be used
     with CompiledMethods.  Answer a DirectedMessage which sends #>> to
     the class object containing the receiver.



File: gst-base.info,  Node: CompiledMethod-testing,  Prev: CompiledMethod-saving and loading,  Up: CompiledMethod

1.39.10 CompiledMethod: testing
-------------------------------

accesses: instVarIndex
     Answer whether the receiver or the blocks it contains accesses the
     instance variable with the given index

assigns: instVarIndex
     Answer whether the receiver or the blocks it contains writes to
     the instance variable with the given index

reads: instVarIndex
     Answer whether the receiver or the blocks it contains reads to the
     instance variable with the given index



File: gst-base.info,  Node: ContextPart,  Next: CoreException,  Prev: CompiledMethod,  Up: Base classes

1.40 ContextPart
================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Implementation
     My instances represent executing Smalltalk code, which represent
     the local environment of executable code. They contain a stack and
     also provide some methods that can be used in inspection or
     debugging.

* Menu:

* ContextPart class-built ins::  (class)
* ContextPart class-exception handling::  (class)
* ContextPart-accessing::  (instance)
* ContextPart-built ins::  (instance)
* ContextPart-copying::  (instance)
* ContextPart-debugging::  (instance)
* ContextPart-enumerating::  (instance)
* ContextPart-exception handling::  (instance)
* ContextPart-printing::  (instance)
* ContextPart-security checks::  (instance)


File: gst-base.info,  Node: ContextPart class-built ins,  Next: ContextPart class-exception handling,  Up: ContextPart

1.40.1 ContextPart class: built ins
-----------------------------------

thisContext
     Return the value of the thisContext variable.  Called internally
     when the variable is accessed.



File: gst-base.info,  Node: ContextPart class-exception handling,  Next: ContextPart-accessing,  Prev: ContextPart class-built ins,  Up: ContextPart

1.40.2 ContextPart class: exception handling
--------------------------------------------

backtrace
     Print a backtrace from the caller to the bottom of the stack on the
     Transcript

backtraceOn: aStream
     Print a backtrace from the caller to the bottom of the stack on
     aStream

lastUnwindPoint
     Private - Return the last context marked as an unwind point, or
     our environment if none is.

removeLastUnwindPoint
     Private - Return and remove the last context marked as an unwind
     point, or our environment if the last unwind point belongs to
     another environment.

unwind
     Return execution to the last context marked as an unwind point,
     returning nil on that stack.

unwind: returnValue
     Return execution to the last context marked as an unwind point,
     returning returnValue on that stack.



File: gst-base.info,  Node: ContextPart-accessing,  Next: ContextPart-built ins,  Prev: ContextPart class-exception handling,  Up: ContextPart

1.40.3 ContextPart: accessing
-----------------------------

client
     Answer the client of this context, that is, the object that sent
     the message that created this context. Fail if the receiver has no
     parent

environment
     To create a valid execution environment for the interpreter even
     before it starts, GST creates a fake context whose selector is nil
     and which can be used as a marker for the current execution
     environment. This method answers that context.  For processes, it
     answers the process block itself

home
     Answer the MethodContext to which the receiver refers

initialIP
     Answer the value of the instruction pointer when execution starts
     in the current context

ip
     Answer the current instruction pointer into the receiver

ip: newIP
     Set the instruction pointer for the receiver

isBlock
     Answer whether the receiver is a block context

isDisabled
     Answers whether the context is skipped when doing a return.
     Contexts are marked as disabled whenever a non-local return is
     done (either by returning from the enclosing method of a block, or
     with the #continue: method of ContextPart) and there are unwind
     contexts such as those created by #ensure:.  All non-unwind
     contexts are then marked as disabled.

isEnvironment
     To create a valid execution environment for the interpreter even
     before it starts, GST creates a fake context which invokes a
     special "termination" method.  Such a context can be used as a
     marker for the current execution environment.  Answer whether the
     receiver is that kind of context.

isProcess
     Answer whether the receiver represents a process context, i.e. a
     context created by BlockClosure>>#newProcess. Such a context can
     be recognized because it has no parent but its flags are different
     from those of the contexts created by the VM's
     prepareExecutionEnvironment function.

isUnwind
     Answers whether the context must continue execution even after a
     non-local return (a return from the enclosing method of a block, or
     a call to the #continue: method of ContextPart).  Such contexts are
     created by #ensure:.

method
     Return the CompiledMethod being executed

methodClass
     Return the class in which the CompiledMethod being executed is
     defined

numArgs
     Answer the number of arguments passed to the receiver

numTemps
     Answer the number of temporaries used by the receiver

parentContext
     Answer the context that called the receiver

parentContext: aContext
     Set the context to which the receiver will return

push: anObject
     Push an object on the receiver's stack.

receiver
     Return the receiver (self) for the method being executed

selector
     Return the selector for the method being executed

size
     Answer the number of valid fields for the receiver. Any read
     access from (self size + 1) to (self basicSize) has undefined
     results - even crashing

sp
     Answer the current stack pointer into the receiver

sp: newSP
     Set the stack pointer for the receiver.

validSize
     Answer how many elements in the receiver should be inspected



File: gst-base.info,  Node: ContextPart-built ins,  Next: ContextPart-copying,  Prev: ContextPart-accessing,  Up: ContextPart

1.40.4 ContextPart: built ins
-----------------------------

continue: anObject
     Resume execution from the receiver, faking that the context on top
     of it in the execution chain has returned anObject.  The receiver
     must belong to the same process as the executing context,
     otherwise the results are not predictable.  All #ensure: (and
     possibly #ifCurtailed:) blocks between the currently executing
     context and the receiver are evaluated (which is not what would
     happen if you directly bashed at the parent context of
     thisContext).



File: gst-base.info,  Node: ContextPart-copying,  Next: ContextPart-debugging,  Prev: ContextPart-built ins,  Up: ContextPart

1.40.5 ContextPart: copying
---------------------------

deepCopy
     Answer a shallow copy of the receiver - duplicating e.g. the
     method and the instance variables that have been pushed is almost
     surely not the right thing.



File: gst-base.info,  Node: ContextPart-debugging,  Next: ContextPart-enumerating,  Prev: ContextPart-copying,  Up: ContextPart

1.40.6 ContextPart: debugging
-----------------------------

debuggerClass
     Answer which debugger should be used to debug the current context
     chain.  The class with the highest debugging priority is picked
     among those mentioned in the chain.

isInternalExceptionHandlingContext
     Answer whether the receiver is a context that should be hidden to
     the user when presenting a backtrace.



File: gst-base.info,  Node: ContextPart-enumerating,  Next: ContextPart-exception handling,  Prev: ContextPart-debugging,  Up: ContextPart

1.40.7 ContextPart: enumerating
-------------------------------

scanBacktraceFor: selectors do: aBlock
     Scan the backtrace for contexts whose selector is among those
     listed in selectors; if one is found, invoke aBlock passing the
     context.

scanBacktraceForAttribute: selector do: aBlock
     Scan the backtrace for contexts which have the attribute selector
     listed in selectors; if one is found, invoke aBlock passing the
     context and the attribute.



File: gst-base.info,  Node: ContextPart-exception handling,  Next: ContextPart-printing,  Prev: ContextPart-enumerating,  Up: ContextPart

1.40.8 ContextPart: exception handling
--------------------------------------

mark
     Add the receiver as a possible unwind point



File: gst-base.info,  Node: ContextPart-printing,  Next: ContextPart-security checks,  Prev: ContextPart-exception handling,  Up: ContextPart

1.40.9 ContextPart: printing
----------------------------

backtrace
     Print a backtrace from the receiver to the bottom of the stack on
     the Transcript.

backtraceOn: aStream
     Print a backtrace from the caller to the bottom of the stack on
     aStream.



File: gst-base.info,  Node: ContextPart-security checks,  Prev: ContextPart-printing,  Up: ContextPart

1.40.10 ContextPart: security checks
------------------------------------

checkSecurityFor: perm
     First of all, check against the static permissions for this
     context.

doSecurityCheckForName: name actions: actions target: target
     Not commented.

securityCheckForName: name
     Not commented.

securityCheckForName: name action: action
     Not commented.

securityCheckForName: name actions: actions target: target
     Not commented.

securityCheckForName: name target: target
     Not commented.



File: gst-base.info,  Node: CoreException,  Next: CPtr,  Prev: ContextPart,  Up: Base classes

1.41 CoreException
==================

Defined in namespace Smalltalk
Superclass: TrappableEvent
Category: Language-Exceptions
     My instances describe a single event that can be trapped using
     #on:do:..., contain whether such execution can be resumed after
     such an event, a description of what happened, and a block that is
     used as an handler by default. Using my methods you can raise
     exceptions and create new exceptions.  Exceptions are organized in
     a kind of hierarchy (different from the class hierarchy):
     intercepting an exception will intercept all its children too.

     CoreExceptions are different from ANSI Exceptions in that the
     signaled exception is not an instance of the CoreException,
     instead it belongs to a different class, Signal.  ANSI Exceptions
     inherit from Signal but hold on to a CoreException via a
     class-instance variable.

* Menu:

* CoreException class-instance creation::  (class)
* CoreException-accessing::  (instance)
* CoreException-basic::  (instance)
* CoreException-enumerating::  (instance)
* CoreException-exception handling::  (instance)
* CoreException-instance creation::  (instance)


File: gst-base.info,  Node: CoreException class-instance creation,  Next: CoreException-accessing,  Up: CoreException

1.41.1 CoreException class: instance creation
---------------------------------------------

new
     Create a new exception whose parent is ExAll



File: gst-base.info,  Node: CoreException-accessing,  Next: CoreException-basic,  Prev: CoreException class-instance creation,  Up: CoreException

1.41.2 CoreException: accessing
-------------------------------

defaultHandler
     Answer the default handler for the receiver

defaultHandler: aBlock
     Set the default handler of the receiver to aBlock. A Signal object
     will be passed to aBlock

description
     Answer a description of the receiver

description: aString
     Set the description of the receiver to aString

isResumable
     Answer true if the receiver is resumable

isResumable: aBoolean
     Set the resumable flag of the receiver to aBoolean

parent
     Answer the parent of the receiver

signalClass
     Answer the subclass of Signal to be passed to handler blocks that
     handle the receiver

signalClass: aClass
     Set which subclass of Signal is to be passed to handler blocks
     that handle the receiver



File: gst-base.info,  Node: CoreException-basic,  Next: CoreException-enumerating,  Prev: CoreException-accessing,  Up: CoreException

1.41.3 CoreException: basic
---------------------------

postCopy
     Modify the receiver so that the description is deep copied



File: gst-base.info,  Node: CoreException-enumerating,  Next: CoreException-exception handling,  Prev: CoreException-basic,  Up: CoreException

1.41.4 CoreException: enumerating
---------------------------------

allExceptionsDo: aBlock
     Private - Evaluate aBlock for every exception in the receiver. As
     it contains just one exception, evaluate it just once, passing the
     receiver

goodness: exception
     Answer how good the receiver is at handling the given exception.  A
     negative value indicates that the receiver is not able to handle
     the exception.

handles: exceptionOrSignal
     Answer whether the receiver handles `exceptionOrSignal'.



File: gst-base.info,  Node: CoreException-exception handling,  Next: CoreException-instance creation,  Prev: CoreException-enumerating,  Up: CoreException

1.41.5 CoreException: exception handling
----------------------------------------

signal
     Raise the exception described by the receiver, passing no
     parameters

signalWith: arg
     Raise the exception described by the receiver, passing the
     parameter arg

signalWith: arg with: arg2
     Raise the exception described by the receiver, passing the
     parameters arg and arg2

signalWithArguments: args
     Raise the exception described by the receiver, passing the
     parameters in args



File: gst-base.info,  Node: CoreException-instance creation,  Prev: CoreException-exception handling,  Up: CoreException

1.41.6 CoreException: instance creation
---------------------------------------

newChild
     Answer a child exception of the receiver. Its properties are set
     to those of the receiver



File: gst-base.info,  Node: CPtr,  Next: CPtrCType,  Prev: CoreException,  Up: Base classes

1.42 CPtr
=========

Defined in namespace Smalltalk
Superclass: CAggregate
Category: Language-C interface

* Menu:

* CPtr-accessing::  (instance)


File: gst-base.info,  Node: CPtr-accessing,  Up: CPtr

1.42.1 CPtr: accessing
----------------------

alignof
     Answer the receiver's required aligment

sizeof
     Answer the receiver's size

value
     Answer the address of the location pointed to by the receiver.

value: anObject
     Set the address of the location pointed to by the receiver to
     anObject, which can be either an Integer or a CObject.  if
     anObject is an Integer, it is interpreted as a 32-bit or 64-bit
     address.  If it is a CObject, its address is stored.



File: gst-base.info,  Node: CPtrCType,  Next: CScalar,  Prev: CPtr,  Up: Base classes

1.43 CPtrCType
==============

Defined in namespace Smalltalk
Superclass: CType
Category: Language-C interface

* Menu:

* CPtrCType class-instance creation::  (class)
* CPtrCType-accessing::  (instance)


File: gst-base.info,  Node: CPtrCType class-instance creation,  Next: CPtrCType-accessing,  Up: CPtrCType

1.43.1 CPtrCType class: instance creation
-----------------------------------------

elementType: aCType
     Answer a new instance of CPtrCType that maps pointers to the given
     CType



File: gst-base.info,  Node: CPtrCType-accessing,  Prev: CPtrCType class-instance creation,  Up: CPtrCType

1.43.2 CPtrCType: accessing
---------------------------

elementType
     Answer the type of the elements in the receiver's instances

new: size
     Allocate space for `size' objects like those that the receiver
     points to, and with the type (class) identified by the receiver.
     It is the caller's responsibility to free the memory allocated for
     it.



File: gst-base.info,  Node: CScalar,  Next: CScalarCType,  Prev: CPtrCType,  Up: Base classes

1.44 CScalar
============

Defined in namespace Smalltalk
Superclass: CObject
Category: Language-C interface

* Menu:

* CScalar class-instance creation::  (class)
* CScalar-accessing::  (instance)


File: gst-base.info,  Node: CScalar class-instance creation,  Next: CScalar-accessing,  Up: CScalar

1.44.1 CScalar class: instance creation
---------------------------------------

type
     Answer a CType for the receiver - for example, CByteType if the
     receiver is CByte.

value: anObject
     Answer a newly allocated CObject containing the passed value,
     anObject. Remember to call #addToBeFinalized if you want the
     CObject to be automatically freed



File: gst-base.info,  Node: CScalar-accessing,  Prev: CScalar class-instance creation,  Up: CScalar

1.44.2 CScalar: accessing
-------------------------

cObjStoredType
     Private - Provide a conversion from a CObject to a Smalltalk object
     to be stored by #at:put:

value
     Answer the value the receiver is pointing to. The exact returned
     value depends on the receiver's class

value: aValue
     Set the receiver to point to the value, aValue. The exact meaning
     of aValue depends on the receiver's class



File: gst-base.info,  Node: CScalarCType,  Next: CShort,  Prev: CScalar,  Up: Base classes

1.45 CScalarCType
=================

Defined in namespace Smalltalk
Superclass: CType
Category: Language-C interface

* Menu:

* CScalarCType-accessing::  (instance)
* CScalarCType-storing::  (instance)


File: gst-base.info,  Node: CScalarCType-accessing,  Next: CScalarCType-storing,  Up: CScalarCType

1.45.1 CScalarCType: accessing
------------------------------

valueType
     valueType is used as a means to communicate to the interpreter the
     underlying type of the data.  For scalars, it is supplied by the
     CObject subclass.



File: gst-base.info,  Node: CScalarCType-storing,  Prev: CScalarCType-accessing,  Up: CScalarCType

1.45.2 CScalarCType: storing
----------------------------

storeOn: aStream
     Store Smalltalk code that compiles to the receiver



File: gst-base.info,  Node: CShort,  Next: CSmalltalk,  Prev: CScalarCType,  Up: Base classes

1.46 CShort
===========

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CShort class-accessing::  (class)
* CShort-accessing::  (instance)


File: gst-base.info,  Node: CShort class-accessing,  Next: CShort-accessing,  Up: CShort

1.46.1 CShort class: accessing
------------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CShort-accessing,  Prev: CShort class-accessing,  Up: CShort

1.46.2 CShort: accessing
------------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CSmalltalk,  Next: CString,  Prev: CShort,  Up: Base classes

1.47 CSmalltalk
===============

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CSmalltalk class-accessing::  (class)
* CSmalltalk-accessing::  (instance)


File: gst-base.info,  Node: CSmalltalk class-accessing,  Next: CSmalltalk-accessing,  Up: CSmalltalk

1.47.1 CSmalltalk class: accessing
----------------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CSmalltalk-accessing,  Prev: CSmalltalk class-accessing,  Up: CSmalltalk

1.47.2 CSmalltalk: accessing
----------------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CString,  Next: CStringCType,  Prev: CSmalltalk,  Up: Base classes

1.48 CString
============

Defined in namespace Smalltalk
Superclass: CPtr
Category: Language-C interface
     Technically, CString is really a pointer to CChar.  However, it
     can be very useful as a distinct datatype because it is a separate
     datatype in Smalltalk, so we allow developers to express their
     semantics more precisely by using a more descriptive type.

     Note that like CChar is a pointer to char, CString is actually a
     *pointer* to string: a char ** in C terms.  If you need to take a
     String out of a char *, use CChar>>#asString.

     In general, I behave like a cross between an array of characters
     and a pointer to a character.  I provide the protocol for both
     data types.  My #value method returns a Smalltalk String, as you
     would expect for a scalar datatype.


* Menu:

* CString class-instance creation::  (class)
* CString-accessing::  (instance)


File: gst-base.info,  Node: CString class-instance creation,  Next: CString-accessing,  Up: CString

1.48.1 CString class: instance creation
---------------------------------------

type
     Answer a CType for the receiver - for example, CByteType if the
     receiver is CByte.

value: anObject
     Answer a newly allocated CObject containing the passed value,
     anObject. Remember to call #addToBeFinalized if you want the
     CObject to be automatically freed



File: gst-base.info,  Node: CString-accessing,  Prev: CString class-instance creation,  Up: CString

1.48.2 CString: accessing
-------------------------

cObjStoredType
     Private - Provide a conversion from a CObject to a Smalltalk object
     to be stored by #at:put:

value
     Answer the value the receiver is pointing to. The exact returned
     value depends on the receiver's class

value: aValue
     Set the receiver to point to the value, aValue. The exact meaning
     of aValue depends on the receiver's class



File: gst-base.info,  Node: CStringCType,  Next: CStruct,  Prev: CString,  Up: Base classes

1.49 CStringCType
=================

Defined in namespace Smalltalk
Superclass: CScalarCType
Category: Language-C interface

* Menu:

* CStringCType-accessing::  (instance)


File: gst-base.info,  Node: CStringCType-accessing,  Up: CStringCType

1.49.1 CStringCType: accessing
------------------------------

elementType
     Answer the type of the elements in the receiver's instances



File: gst-base.info,  Node: CStruct,  Next: CType,  Prev: CStringCType,  Up: Base classes

1.50 CStruct
============

Defined in namespace Smalltalk
Superclass: CCompound
Category: Language-C interface

* Menu:

* CStruct class-subclass creation::  (class)


File: gst-base.info,  Node: CStruct class-subclass creation,  Up: CStruct

1.50.1 CStruct class: subclass creation
---------------------------------------

compileDeclaration: array
     Compile methods that implement the declaration in array.



File: gst-base.info,  Node: CType,  Next: CUChar,  Prev: CStruct,  Up: Base classes

1.51 CType
==========

Defined in namespace Smalltalk
Superclass: Object
Category: Language-C interface
     I am not part of the standard Smalltalk kernel class hierarchy.  I
     contain type information used by subclasses of CObject, which
     represents external C data items.

     My only instance variable, cObjectType, is used to hold onto the
     CObject subclass that gets created for a given CType.  Used
     primarily in the C part of the interpreter because internally it
     cannot execute methods to get values, so it has a simple way to
     access instance variable which holds the desired subclass.

     My subclasses have instances which represent the actual data
     types; for the scalar types, there is only one instance created of
     each, but for the aggregate types, there is at least one instance
     per base type and/or number of elements.

* Menu:

* CType class-C instance creation::  (class)
* CType-accessing::  (instance)
* CType-C instance creation::  (instance)
* CType-storing::  (instance)


File: gst-base.info,  Node: CType class-C instance creation,  Next: CType-accessing,  Up: CType

1.51.1 CType class: C instance creation
---------------------------------------

cObjectType: aCObjectSubclass
     Create a new CType for the given subclass of CObject



File: gst-base.info,  Node: CType-accessing,  Next: CType-C instance creation,  Prev: CType class-C instance creation,  Up: CType

1.51.2 CType: accessing
-----------------------

alignof
     Answer the size of the receiver's instances

arrayType: size
     Answer a CArrayCType which represents an array with the given size
     of CObjects whose type is in turn represented by the receiver

cObjectType
     Answer the CObject subclass whose instance is created when new is
     sent to the receiver

ptrType
     Answer a CPtrCType which represents a pointer to CObjects whose
     type is in turn represented by the receiver

sizeof
     Answer the size of the receiver's instances

valueType
     valueType is used as a means to communicate to the interpreter the
     underlying type of the data.  For anything but scalars, it's just
     'self'



File: gst-base.info,  Node: CType-C instance creation,  Next: CType-storing,  Prev: CType-accessing,  Up: CType

1.51.3 CType: C instance creation
---------------------------------

address: cObjOrInt
     Create a new CObject with the type (class) identified by the
     receiver, pointing to the given address (identified by an Integer
     or CObject).

new
     Allocate a new CObject with the type (class) identified by the
     receiver.  It is the caller's responsibility to free the memory
     allocated for it.



File: gst-base.info,  Node: CType-storing,  Prev: CType-C instance creation,  Up: CType

1.51.4 CType: storing
---------------------

storeOn: aStream
     Store Smalltalk code that compiles to the receiver



File: gst-base.info,  Node: CUChar,  Next: CUInt,  Prev: CType,  Up: Base classes

1.52 CUChar
===========

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CUChar class-getting info::  (class)
* CUChar-accessing::  (instance)


File: gst-base.info,  Node: CUChar class-getting info,  Next: CUChar-accessing,  Up: CUChar

1.52.1 CUChar class: getting info
---------------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CUChar-accessing,  Prev: CUChar class-getting info,  Up: CUChar

1.52.2 CUChar: accessing
------------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CUInt,  Next: CULong,  Prev: CUChar,  Up: Base classes

1.53 CUInt
==========

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CUInt class-accessing::  (class)
* CUInt-accessing::  (instance)


File: gst-base.info,  Node: CUInt class-accessing,  Next: CUInt-accessing,  Up: CUInt

1.53.1 CUInt class: accessing
-----------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CUInt-accessing,  Prev: CUInt class-accessing,  Up: CUInt

1.53.2 CUInt: accessing
-----------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CULong,  Next: CUnion,  Prev: CUInt,  Up: Base classes

1.54 CULong
===========

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CULong class-accessing::  (class)
* CULong-accessing::  (instance)


File: gst-base.info,  Node: CULong class-accessing,  Next: CULong-accessing,  Up: CULong

1.54.1 CULong class: accessing
------------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CULong-accessing,  Prev: CULong class-accessing,  Up: CULong

1.54.2 CULong: accessing
------------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: CUnion,  Next: CUShort,  Prev: CULong,  Up: Base classes

1.55 CUnion
===========

Defined in namespace Smalltalk
Superclass: CCompound
Category: Language-C interface

* Menu:

* CUnion class-subclass creation::  (class)


File: gst-base.info,  Node: CUnion class-subclass creation,  Up: CUnion

1.55.1 CUnion class: subclass creation
--------------------------------------

compileDeclaration: array
     Compile methods that implement the declaration in array.



File: gst-base.info,  Node: CUShort,  Next: Date,  Prev: CUnion,  Up: Base classes

1.56 CUShort
============

Defined in namespace Smalltalk
Superclass: CScalar
Category: Language-C interface

* Menu:

* CUShort class-accessing::  (class)
* CUShort-accessing::  (instance)


File: gst-base.info,  Node: CUShort class-accessing,  Next: CUShort-accessing,  Up: CUShort

1.56.1 CUShort class: accessing
-------------------------------

alignof
     Answer the receiver's instances required aligment

scalarIndex
     Private - Answer an index referring to the receiver's instances
     scalar type

sizeof
     Answer the receiver's instances size



File: gst-base.info,  Node: CUShort-accessing,  Prev: CUShort class-accessing,  Up: CUShort

1.56.2 CUShort: accessing
-------------------------

alignof
     Answer the receiver's required aligment

scalarIndex
     Private - Answer an index referring to the receiver's scalar type

sizeof
     Answer the receiver's size



File: gst-base.info,  Node: Date,  Next: DateTime,  Prev: CUShort,  Up: Base classes

1.57 Date
=========

Defined in namespace Smalltalk
Superclass: Magnitude
Category: Language-Data types
     My instances represent dates.  My base date is defined to be Jan
     1, 1901.  I provide methods for instance creation (including via
     "symbolic" dates, such as "Date newDay: 14 month: #Feb year: 1990".

     PLEASE BE WARNED - use this class only for dates after 1582 AD;
     that's the beginning of the epoch. Dates before 1582 will not be
     correctly printed. In addition, since ten days were lost from
     October 5 through October 15, operations between a Gregorian date
     (after 15-Oct-1582) and a Julian date (before 5-Oct-1582) will
     give incorrect results; or, 4-Oct-1582 + 2 days will yield
     6-Oct-1582 (a non-existent day!), not 16-Oct-1582.

     In fact, if you pass a year < 1582 to a method like
     #newDay:month:year: it will assume that it is a two-digit year
     (e.g. 90=1990, 1000=2900). The only way to create Julian calendar
     dates is with the #fromDays: instance creation method.

* Menu:

* Date class-basic::  (class)
* Date class-instance creation (ANSI)::  (class)
* Date class-instance creation (Blue Book)::  (class)
* Date-basic::  (instance)
* Date-compatibility (non-ANSI)::  (instance)
* Date-date computations::  (instance)
* Date-printing::  (instance)
* Date-storing::  (instance)
* Date-testing::  (instance)


File: gst-base.info,  Node: Date class-basic,  Next: Date class-instance creation (ANSI),  Up: Date

1.57.1 Date class: basic
------------------------

abbreviationOfDay: dayIndex
     Answer the abbreviated name of the day of week corresponding to
     the given index

dayOfWeek: dayName
     Answer the index of the day of week corresponding to the given name

daysInMonth: monthName forYear: yearInteger
     Answer the number of days in the given (named) month for the given
     year

daysInYear: i
     Answer the number of days in the given year

indexOfMonth: monthName
     Answer the index of the month corresponding to the given name

initDayNameDict
     Initialize the DayNameDict to the names of the days

initialize
     Initialize the receiver

initMonthNameDict
     Initialize the MonthNameDict to the names of the months

nameOfDay: dayIndex
     Answer the name of the day of week corresponding to the given index

nameOfMonth: monthIndex
     Answer the name of the month corresponding to the given index

shortNameOfMonth: monthIndex
     Answer the name of the month corresponding to the given index



File: gst-base.info,  Node: Date class-instance creation (ANSI),  Next: Date class-instance creation (Blue Book),  Prev: Date class-basic,  Up: Date

1.57.2 Date class: instance creation (ANSI)
-------------------------------------------

year: y day: d hour: h minute: min second: s
     Answer a Date denoting the d-th day of the given year

year: y month: m day: d hour: h minute: min second: s
     Answer a Date denoting the d-th day of the given (as a number)
     month and year



File: gst-base.info,  Node: Date class-instance creation (Blue Book),  Next: Date-basic,  Prev: Date class-instance creation (ANSI),  Up: Date

1.57.3 Date class: instance creation (Blue Book)
------------------------------------------------

dateAndTimeNow
     Answer an array containing the current date and time

fromDays: dayCount
     Answer a Date denoting dayCount days past 1/1/1901

fromJulian: jd
     Answer a Date denoting the jd-th day in the astronomical Julian
     calendar.

fromSeconds: time
     Answer a Date denoting the date time seconds past Jan 1st, 1901

newDay: day month: monthName year: yearInteger
     Answer a Date denoting the dayCount day of the given (named) month
     and year

newDay: day monthIndex: monthIndex year: yearInteger
     Answer a Date denoting the dayCount day of the given (as a number)
     month and year

newDay: dayCount year: yearInteger
     Answer a Date denoting the dayCount day of the yearInteger year

readFrom: aStream
     Parse an instance of the receiver from aStream

today
     Answer a Date denoting the current date in local time

utcDateAndTimeNow
     Answer an array containing the current date and time in Coordinated
     Universal Time (UTC)

utcToday
     Answer a Date denoting the current date in Coordinated Universal
     Time (UTC)



File: gst-base.info,  Node: Date-basic,  Next: Date-compatibility (non-ANSI),  Prev: Date class-instance creation (Blue Book),  Up: Date

1.57.4 Date: basic
------------------

addDays: dayCount
     Answer a new Date pointing dayCount past the receiver

subtractDate: aDate
     Answer the number of days between aDate and the receiver (negative
     if the receiver is before aDate)

subtractDays: dayCount
     Answer a new Date pointing dayCount before the receiver



File: gst-base.info,  Node: Date-compatibility (non-ANSI),  Next: Date-date computations,  Prev: Date-basic,  Up: Date

1.57.5 Date: compatibility (non-ANSI)
-------------------------------------

day
     Answer the day represented by the receiver

dayName
     Answer the day of week of the receiver as a Symbol

shortMonthName
     Answer the abbreviated name of the month represented by the
     receiver



File: gst-base.info,  Node: Date-date computations,  Next: Date-printing,  Prev: Date-compatibility (non-ANSI),  Up: Date

1.57.6 Date: date computations
------------------------------

asSeconds
     Answer the date as the number of seconds from 1/1/1901.

dayOfMonth
     Answer the day represented by the receiver (same as #day)

dayOfWeek
     Answer the day of week of the receiver. 1 = Monday, 7 = Sunday

dayOfWeekAbbreviation
     Answer the day of week of the receiver as a Symbol

dayOfWeekName
     Answer the day of week of the receiver as a Symbol

dayOfYear
     Answer the days passed since 31/12 of last year; e.g. New Year's
     Day is 1

daysFromBaseDay
     Answer the days passed since 1/1/1901

daysInMonth
     Answer the days in the month represented by the receiver

daysInYear
     Answer the days in the year represented by the receiver

daysLeftInMonth
     Answer the days to the end of the month represented by the receiver

daysLeftInYear
     Answer the days to the end of the year represented by the receiver

firstDayOfMonth
     Answer a Date representing the first day of the month represented
     by the receiver

isLeapYear
     Answer whether the receiver refers to a date in a leap year.

lastDayOfMonth
     Answer a Date representing the last day of the month represented
     by the receiver

month
     Answer the index of the month represented by the receiver

monthAbbreviation
     Answer the abbreviated name of the month represented by the
     receiver

monthIndex
     Answer the index of the month represented by the receiver

monthName
     Answer the name of the month represented by the receiver

year
     Answer the year represented by the receiver



File: gst-base.info,  Node: Date-printing,  Next: Date-storing,  Prev: Date-date computations,  Up: Date

1.57.7 Date: printing
---------------------

printOn: aStream
     Print a representation for the receiver on aStream



File: gst-base.info,  Node: Date-storing,  Next: Date-testing,  Prev: Date-printing,  Up: Date

1.57.8 Date: storing
--------------------

storeOn: aStream
     Store on aStream Smalltalk code compiling to the receiver



File: gst-base.info,  Node: Date-testing,  Prev: Date-storing,  Up: Date

1.57.9 Date: testing
--------------------

< aDate
     Answer whether the receiver indicates a date preceding aDate

= aDate
     Answer whether the receiver indicates the same date as aDate

hash
     Answer an hash value for the receievr



File: gst-base.info,  Node: DateTime,  Next: Delay,  Prev: Date,  Up: Base classes

1.58 DateTime
=============

Defined in namespace Smalltalk
Superclass: Date
Category: Language-Data types
     My instances represent timestamps.

* Menu:

* DateTime class-information::  (class)
* DateTime class-instance creation::  (class)
* DateTime class-instance creation (non-ANSI)::  (class)
* DateTime-basic::  (instance)
* DateTime-computations::  (instance)
* DateTime-printing::  (instance)
* DateTime-splitting in dates & times::  (instance)
* DateTime-storing::  (instance)
* DateTime-testing::  (instance)
* DateTime-time zones::  (instance)


File: gst-base.info,  Node: DateTime class-information,  Next: DateTime class-instance creation,  Up: DateTime

1.58.1 DateTime class: information
----------------------------------

clockPrecision
     Answer `ClockPrecision'.

initialize
     Initialize the receiver's class variables



File: gst-base.info,  Node: DateTime class-instance creation,  Next: DateTime class-instance creation (non-ANSI),  Prev: DateTime class-information,  Up: DateTime

1.58.2 DateTime class: instance creation
----------------------------------------

now
     Answer an instance of the receiver referring to the current date
     and time.

readFrom: aStream
     Parse an instance of the receiver from aStream

year: y day: d hour: h minute: min second: s
     Answer a DateTime denoting the d-th day of the given year, and
     setting the time part to the given hour, minute, and second

year: y day: d hour: h minute: min second: s offset: ofs
     Answer a DateTime denoting the d-th day of the given year.  Set
     the offset field to ofs (a Duration), and the time part to the
     given hour, minute, and second

year: y month: m day: d hour: h minute: min second: s
     Answer a DateTime denoting the d-th day of the given (as a number)
     month and year, setting the time part to the given hour, minute,
     and second

year: y month: m day: d hour: h minute: min second: s offset: ofs
     Answer a DateTime denoting the d-th day of the given (as a number)
     month and year. Set the offset field to ofs (a Duration), and the
     the time part to the given hour, minute, and second



File: gst-base.info,  Node: DateTime class-instance creation (non-ANSI),  Next: DateTime-basic,  Prev: DateTime class-instance creation,  Up: DateTime

1.58.3 DateTime class: instance creation (non-ANSI)
---------------------------------------------------

fromDays: days seconds: secs offset: ofs
     Answer a DateTime denoting the d-th day of the given (as a number)
     month and year. Set the offset field to ofs (a Duration), and the
     the time part to the given hour, minute, and second



File: gst-base.info,  Node: DateTime-basic,  Next: DateTime-computations,  Prev: DateTime class-instance creation (non-ANSI),  Up: DateTime

1.58.4 DateTime: basic
----------------------

+ aDuration
     Answer a new Date pointing dayCount past the receiver

- aDateTimeOrDuration
     Answer a new Date pointing dayCount before the receiver



File: gst-base.info,  Node: DateTime-computations,  Next: DateTime-printing,  Prev: DateTime-basic,  Up: DateTime

1.58.5 DateTime: computations
-----------------------------

asSeconds
     Answer the date as the number of seconds from 1/1/1901.

dayOfWeek
     Answer the day of week of the receiver. Unlike Dates, DateAndTimes
     have 1 = Sunday, 7 = Saturday

hour
     Answer the hour in a 24-hour clock

hour12
     Answer the hour in a 12-hour clock

hour24
     Answer the hour in a 24-hour clock

meridianAbbreviation
     Answer either #AM (for anti-meridian) or #PM (for post-meridian)

minute
     Answer the minute

second
     Answer the month represented by the receiver



File: gst-base.info,  Node: DateTime-printing,  Next: DateTime-splitting in dates & times,  Prev: DateTime-computations,  Up: DateTime

1.58.6 DateTime: printing
-------------------------

printOn: aStream
     Print a representation for the receiver on aStream



File: gst-base.info,  Node: DateTime-splitting in dates & times,  Next: DateTime-storing,  Prev: DateTime-printing,  Up: DateTime

1.58.7 DateTime: splitting in dates & times
-------------------------------------------

asDate
     Answer a Date referring to the same day as the receiver

asTime
     Answer a Time referring to the same time (from midnight) as the
     receiver

at: anIndex
     Since in the past timestamps were referred to as Arrays containing
     a Date and a Time (in this order), this method provides access to
     DateTime objects like if they were two-element Arrays.



File: gst-base.info,  Node: DateTime-storing,  Next: DateTime-testing,  Prev: DateTime-splitting in dates & times,  Up: DateTime

1.58.8 DateTime: storing
------------------------

storeOn: aStream
     Store on aStream Smalltalk code compiling to the receiver



File: gst-base.info,  Node: DateTime-testing,  Next: DateTime-time zones,  Prev: DateTime-storing,  Up: DateTime

1.58.9 DateTime: testing
------------------------

< aDateTime
     Answer whether the receiver indicates a date preceding aDate

= aDateTime
     Answer whether the receiver indicates the same date as aDate

hash
     Answer an hash value for the receievr



File: gst-base.info,  Node: DateTime-time zones,  Prev: DateTime-testing,  Up: DateTime

1.58.10 DateTime: time zones
----------------------------

asLocal
     Answer the receiver, since DateTime objects store themselves in
     Local time

asUTC
     Convert the receiver to UTC time, and answer a new DateTime object.

offset
     Answer the receiver's offset from UTC to local time (e.g. +3600
     seconds for Central Europe Time, -3600*6 seconds for Eastern
     Standard Time).  The offset is expressed as a Duration

offset: anOffset
     Answer a copy of the receiver with the offset from UTC to local
     time changed to anOffset (a Duration).

timeZoneAbbreviation
     Answer an abbreviated indication of the receiver's offset,
     expressed as `shhmm', where `hh' is the number of hours and `mm'
     is the number of minutes between UTC and local time, and `s' can
     be `+' for the Eastern hemisphere and `-' for the Western
     hemisphere.

timeZoneName
     Answer the time zone name for the receiver (currently, it is
     simply `GMT +xxxx', where `xxxx' is the receiver's
     #timeZoneAbbreviation).



File: gst-base.info,  Node: Delay,  Next: DelayedAdaptor,  Prev: DateTime,  Up: Base classes

1.59 Delay
==========

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Processes
     I am the ultimate agent for frustration in the world.  I cause
     things to wait (sometimes much more than is appropriate, but it is
     those losing operating systems' fault).  When a process sends one
     of my instances a wait message, that process goes to sleep for the
     interval specified when the instance was created.

* Menu:

* Delay class-general inquiries::  (class)
* Delay class-initialization::  (class)
* Delay class-instance creation::  (class)
* Delay-accessing::  (instance)
* Delay-comparing::  (instance)
* Delay-process delay::  (instance)


File: gst-base.info,  Node: Delay class-general inquiries,  Next: Delay class-initialization,  Up: Delay

1.59.1 Delay class: general inquiries
-------------------------------------

millisecondClockValue
     Private - Answer the number of milliseconds since midnight



File: gst-base.info,  Node: Delay class-initialization,  Next: Delay class-instance creation,  Prev: Delay class-general inquiries,  Up: Delay

1.59.2 Delay class: initialization
----------------------------------

initialize
     Private - Initialize the receiver and the associated process



File: gst-base.info,  Node: Delay class-instance creation,  Next: Delay-accessing,  Prev: Delay class-initialization,  Up: Delay

1.59.3 Delay class: instance creation
-------------------------------------

forMilliseconds: millisecondCount
     Answer a Delay waiting for millisecondCount milliseconds

forSeconds: secondCount
     Answer a Delay waiting for secondCount seconds

untilMilliseconds: millisecondCount
     Answer a Delay waiting for millisecondCount milliseconds after
     midnight



File: gst-base.info,  Node: Delay-accessing,  Next: Delay-comparing,  Prev: Delay class-instance creation,  Up: Delay

1.59.4 Delay: accessing
-----------------------

resumptionTime
     Answer the time when a process waiting on a Delay will resume



File: gst-base.info,  Node: Delay-comparing,  Next: Delay-process delay,  Prev: Delay-accessing,  Up: Delay

1.59.5 Delay: comparing
-----------------------

= aDelay
     Answer whether the receiver and aDelay denote the same delay

hash
     Answer an hash value for the receiver



File: gst-base.info,  Node: Delay-process delay,  Prev: Delay-comparing,  Up: Delay

1.59.6 Delay: process delay
---------------------------

wait
     Wait until the amount of time represented by the instance of Delay
     elapses



File: gst-base.info,  Node: DelayedAdaptor,  Next: Dictionary,  Prev: Delay,  Up: Base classes

1.60 DelayedAdaptor
===================

Defined in namespace Smalltalk
Superclass: PluggableAdaptor
Category: Language-Data types
     I can be used where many expensive updates must be performed. My
     in- stances buffer the last value that was set, and only actually
     set the value when the #trigger message is sent. Apart from this,
     I'm equi- valent to PluggableAdaptor.

* Menu:

* DelayedAdaptor-accessing::  (instance)


File: gst-base.info,  Node: DelayedAdaptor-accessing,  Up: DelayedAdaptor

1.60.1 DelayedAdaptor: accessing
--------------------------------

trigger
     Really set the value of the receiver.

value
     Get the value of the receiver.

value: anObject
     Set the value of the receiver - actually, the value is cached and
     is not set until the #trigger method is sent.



File: gst-base.info,  Node: Dictionary,  Next: DirectedMessage,  Prev: DelayedAdaptor,  Up: Base classes

1.61 Dictionary
===============

Defined in namespace Smalltalk
Superclass: HashedCollection
Category: Collections-Keyed
     I implement a dictionary, which is an object that is indexed by
     unique objects (typcially instances of Symbol), and associates
     another object with that index.  I use the equality operator = to
     determine equality of indices.

* Menu:

* Dictionary class-instance creation::  (class)
* Dictionary-accessing::  (instance)
* Dictionary-awful ST-80 compatibility hacks::  (instance)
* Dictionary-dictionary enumerating::  (instance)
* Dictionary-dictionary removing::  (instance)
* Dictionary-dictionary testing::  (instance)
* Dictionary-polymorphism hacks::  (instance)
* Dictionary-printing::  (instance)
* Dictionary-rehashing::  (instance)
* Dictionary-storing::  (instance)
* Dictionary-testing::  (instance)


File: gst-base.info,  Node: Dictionary class-instance creation,  Next: Dictionary-accessing,  Up: Dictionary

1.61.1 Dictionary class: instance creation
------------------------------------------

new
     Create a new dictionary with a default size



File: gst-base.info,  Node: Dictionary-accessing,  Next: Dictionary-awful ST-80 compatibility hacks,  Prev: Dictionary class-instance creation,  Up: Dictionary

1.61.2 Dictionary: accessing
----------------------------

add: newObject
     Add the newObject association to the receiver

associationAt: key
     Answer the key/value Association for the given key. Fail if the key
     is not found

associationAt: key ifAbsent: aBlock
     Answer the key/value Association for the given key. Evaluate aBlock
     (answering the result) if the key is not found

at: key
     Answer the value associated to the given key. Fail if the key is
     not found

at: key ifAbsent: aBlock
     Answer the value associated to the given key, or the result of
     evaluating aBlock if the key is not found

at: aKey ifAbsentPut: aBlock
     Answer the value associated to the given key. If the key is not
     found, evaluate aBlock and associate the result to aKey before
     returning.

at: aKey ifPresent: aBlock
     If aKey is absent, answer nil. Else, evaluate aBlock passing the
     associated value and answer the result of the invocation

at: key put: value
     Store value as associated to the given key

keyAtValue: value
     Answer the key associated to the given value, or nil if the value
     is not found

keyAtValue: value ifAbsent: exceptionBlock
     Answer the key associated to the given value. Evaluate
     exceptionBlock (answering the result) if the value is not found.
     IMPORTANT: == is used to compare values

keys
     Answer a kind of Set containing the keys of the receiver

values
     Answer an Array containing the values of the receiver



File: gst-base.info,  Node: Dictionary-awful ST-80 compatibility hacks,  Next: Dictionary-dictionary enumerating,  Prev: Dictionary-accessing,  Up: Dictionary

1.61.3 Dictionary: awful ST-80 compatibility hacks
--------------------------------------------------

findKeyIndex: key
     Tries to see if key exists as a the key of an indexed variable. As
     soon as nil or an association with the correct key is found, the
     index of that slot is answered



File: gst-base.info,  Node: Dictionary-dictionary enumerating,  Next: Dictionary-dictionary removing,  Prev: Dictionary-awful ST-80 compatibility hacks,  Up: Dictionary

1.61.4 Dictionary: dictionary enumerating
-----------------------------------------

associationsDo: aBlock
     Pass each association in the dictionary to aBlock

collect: aBlock
     Answer a new dictionary where the keys are the same and the values
     are obtained by passing each value to aBlock and collecting the
     return values

do: aBlock
     Pass each value in the dictionary to aBlock

keysAndValuesDo: aBlock
     Pass each key/value pair in the dictionary as two distinct
     parameters to aBlock

keysDo: aBlock
     Pass each key in the dictionary to aBlock

reject: aBlock
     Answer a new dictionary containing the key/value pairs for which
     aBlock returns false. aBlock only receives the value part of the
     pairs.

select: aBlock
     Answer a new dictionary containing the key/value pairs for which
     aBlock returns true. aBlock only receives the value part of the
     pairs.



File: gst-base.info,  Node: Dictionary-dictionary removing,  Next: Dictionary-dictionary testing,  Prev: Dictionary-dictionary enumerating,  Up: Dictionary

1.61.5 Dictionary: dictionary removing
--------------------------------------

remove: anAssociation
     Remove anAssociation's key from the dictionary

remove: anAssociation ifAbsent: aBlock
     Remove anAssociation's key from the dictionary

removeAllKeys: keys
     Remove all the keys in keys, without raising any errors

removeAllKeys: keys ifAbsent: aBlock
     Remove all the keys in keys, passing the missing keys as parameters
     to aBlock as they're encountered

removeKey: key
     Remove the passed key from the dictionary, fail if it is not found

removeKey: key ifAbsent: aBlock
     Remove the passed key from the dictionary, answer the result of
     evaluating aBlock if it is not found



File: gst-base.info,  Node: Dictionary-dictionary testing,  Next: Dictionary-polymorphism hacks,  Prev: Dictionary-dictionary removing,  Up: Dictionary

1.61.6 Dictionary: dictionary testing
-------------------------------------

includes: anObject
     Answer whether the receiver contains anObject as one of its values

includesAssociation: anAssociation
     Answer whether the receiver contains the key which is
     anAssociation's key and its value is anAssociation's value

includesKey: key
     Answer whether the receiver contains the given key

occurrencesOf: aValue
     Answer whether the number of occurrences of aValue as one of the
     receiver's values



File: gst-base.info,  Node: Dictionary-polymorphism hacks,  Next: Dictionary-printing,  Prev: Dictionary-dictionary testing,  Up: Dictionary

1.61.7 Dictionary: polymorphism hacks
-------------------------------------

withAllSuperspaces
     This method is needed by the compiler



File: gst-base.info,  Node: Dictionary-printing,  Next: Dictionary-rehashing,  Prev: Dictionary-polymorphism hacks,  Up: Dictionary

1.61.8 Dictionary: printing
---------------------------

inspect
     Print all the instance variables and objects in the receiver on the
     Transcript

printOn: aStream
     Print a representation of the receiver on aStream



File: gst-base.info,  Node: Dictionary-rehashing,  Next: Dictionary-storing,  Prev: Dictionary-printing,  Up: Dictionary

1.61.9 Dictionary: rehashing
----------------------------

rehash
     Rehash the receiver



File: gst-base.info,  Node: Dictionary-storing,  Next: Dictionary-testing,  Prev: Dictionary-rehashing,  Up: Dictionary

1.61.10 Dictionary: storing
---------------------------

storeOn: aStream
     Print Smalltalk code compiling to the receiver on aStream



File: gst-base.info,  Node: Dictionary-testing,  Prev: Dictionary-storing,  Up: Dictionary

1.61.11 Dictionary: testing
---------------------------

= aDictionary
     Answer whether the receiver and aDictionary are equal

hash
     Answer the hash value for the receiver



File: gst-base.info,  Node: DirectedMessage,  Next: Directory,  Prev: Dictionary,  Up: Base classes

1.62 DirectedMessage
====================

Defined in namespace Smalltalk
Superclass: Message
Category: Language-Implementation
     I represent a message send: I contain the receiver, selector and
     arguments for a message.

* Menu:

* DirectedMessage class-creating instances::  (class)
* DirectedMessage-accessing::  (instance)
* DirectedMessage-basic::  (instance)
* DirectedMessage-multiple process::  (instance)
* DirectedMessage-saving and loading::  (instance)


File: gst-base.info,  Node: DirectedMessage class-creating instances,  Next: DirectedMessage-accessing,  Up: DirectedMessage

1.62.1 DirectedMessage class: creating instances
------------------------------------------------

selector: aSymbol arguments: anArray
     This method should not be called for instances of this class.

selector: aSymbol arguments: anArray receiver: anObject
     Create a new instance of the receiver



File: gst-base.info,  Node: DirectedMessage-accessing,  Next: DirectedMessage-basic,  Prev: DirectedMessage class-creating instances,  Up: DirectedMessage

1.62.2 DirectedMessage: accessing
---------------------------------

receiver
     Answer the receiver

receiver: anObject
     Change the receiver



File: gst-base.info,  Node: DirectedMessage-basic,  Next: DirectedMessage-multiple process,  Prev: DirectedMessage-accessing,  Up: DirectedMessage

1.62.3 DirectedMessage: basic
-----------------------------

printOn: aStream
     Print a representation of the receiver on aStream

send
     Send the message

value
     Send the message (this message provides interoperability between
     DirectedMessages and blocks)



File: gst-base.info,  Node: DirectedMessage-multiple process,  Next: DirectedMessage-saving and loading,  Prev: DirectedMessage-basic,  Up: DirectedMessage

1.62.4 DirectedMessage: multiple process
----------------------------------------

fork
     Create a new process executing the receiver and start it

forkAt: priority
     Create a new process executing the receiver with given priority
     and start it

newProcess
     Create a new process executing the receiver in suspended state.
     The priority is the same as for the calling process. The receiver
     must not contain returns



File: gst-base.info,  Node: DirectedMessage-saving and loading,  Prev: DirectedMessage-multiple process,  Up: DirectedMessage

1.62.5 DirectedMessage: saving and loading
------------------------------------------

reconstructOriginalObject
     This method is used when DirectedMessages are used together with
     PluggableProxies (see ObjectDumper).  It sends the receiver to
     reconstruct the object that was originally stored.



File: gst-base.info,  Node: Directory,  Next: DLD,  Prev: DirectedMessage,  Up: Base classes

1.63 Directory
==============

Defined in namespace Smalltalk
Superclass: File
Category: Streams-Files
     I am the counterpart of File in a tree-structured file system: I
     can iterate through the file that I contain and construct new
     instances of File and Directory.  In addition I have the notion of
     a current working directory (which alas must be a real directory
     and not a virtual one).

* Menu:

* Directory class-C call-outs::  (class)
* Directory class-file name management::  (class)
* Directory class-file operations::  (class)
* Directory class-reading system defaults::  (class)
* Directory-accessing::  (instance)
* Directory-enumerating::  (instance)


File: gst-base.info,  Node: Directory class-C call-outs,  Next: Directory class-file name management,  Up: Directory

1.63.1 Directory class: C call-outs
-----------------------------------

primWorking: dirName
     Not commented.



File: gst-base.info,  Node: Directory class-file name management,  Next: Directory class-file operations,  Prev: Directory class-C call-outs,  Up: Directory

1.63.2 Directory class: file name management
--------------------------------------------

append: fileName to: directory
     Answer the name of a file named `fileName' which resides in a
     directory named `directory'.

pathSeparator
     Answer (as a Character) the character used to separate directory
     names

pathSeparatorString
     Answer (in a String) the character used to separate directory names



File: gst-base.info,  Node: Directory class-file operations,  Next: Directory class-reading system defaults,  Prev: Directory class-file name management,  Up: Directory

1.63.3 Directory class: file operations
---------------------------------------

allFilesMatching: aPattern do: aBlock
     Not commented.

create: dirName
     Create a directory named dirName.

working
     Not commented.

working: dirName
     Change the current working directory to dirName.



File: gst-base.info,  Node: Directory class-reading system defaults,  Next: Directory-accessing,  Prev: Directory class-file operations,  Up: Directory

1.63.4 Directory class: reading system defaults
-----------------------------------------------

home
     Answer the path to the user's home directory

image
     Answer the path to GNU Smalltalk's image file

kernel
     Answer the path in which a local version of the GNU Smalltalk
     kernel's Smalltalk source files were searched when the image was
     created

localKernel
     Answer the path in which a local version of the GNU Smalltalk
     kernel's Smalltalk source files were found

module
     Answer the path to GNU Smalltalk's dynamically loaded modules

systemKernel
     Answer the path to the GNU Smalltalk kernel's Smalltalk source
     files

temporary
     Answer the path in which temporary files can be created.  This is
     read from the environment, and guessed if that fails.



File: gst-base.info,  Node: Directory-accessing,  Next: Directory-enumerating,  Prev: Directory class-reading system defaults,  Up: Directory

1.63.5 Directory: accessing
---------------------------

at: aName
     Answer a File or Directory object as appropriate for a file named
     'aName' in the directory represented by the receiver.

directoryAt: aName
     Answer a Directory object for a file named `aName' residing in the
     directory represented by the receiver.

fileAt: aName
     Answer a File object for a file named `aName' residing in the
     directory represented by the receiver.

fullNameAt: aName
     Answer a String containing the full path to a file named `aName'
     which resides in the directory represented by the receiver.

includes: aName
     Answer whether a file named `aName' exists in the directory
     represented by the receiver.

nameAt: aName
     Answer a String containing the path to a file named `aName' which
     resides in the directory represented by the receiver.



File: gst-base.info,  Node: Directory-enumerating,  Prev: Directory-accessing,  Up: Directory

1.63.6 Directory: enumerating
-----------------------------

allFilesMatching: aPattern do: aBlock
     Evaluate aBlock on the File objects that match aPattern (according
     to String>>#match:) in the directory named by the receiver.
     Recursively descend into directories.

contents
     Answer an Array with the names of the files in the directory
     represented by the receiver.

do: aBlock
     Evaluate aBlock once for each file in the directory represented by
     the receiver, passing its name. aBlock should not return.

filesMatching: aPattern do: block
     Evaluate block on the File objects that match aPattern (according
     to String>>#match:) in the directory named by the receiver.

namesMatching: aPattern do: block
     Evaluate block on the file names that match aPattern (according to
     String>>#match:) in the directory named by the receiver.



File: gst-base.info,  Node: DLD,  Next: DumperProxy,  Prev: Directory,  Up: Base classes

1.64 DLD
========

Defined in namespace Smalltalk
Superclass: Object
Category: Language-C interface
     ...and Gandalf said: "Many folk like to know beforehand what is to
     be set on the table; but those who have laboured to prepare the
     feast like to keep their secret; for wonder makes the words of
     praise louder."

     I am just an ancillary class used to reference some C functions.
     Most of my actual functionality is used by redefinitions of methods
     in CFunctionDescriptor.

* Menu:

* DLD class-C call-outs::  (class)
* DLD class-dynamic linking::  (class)


File: gst-base.info,  Node: DLD class-C call-outs,  Next: DLD class-dynamic linking,  Up: DLD

1.64.1 DLD class: C call-outs
-----------------------------

defineCFunc: aName as: aFuncAddr
     Not commented.

library: libHandle getFunc: aFuncString
     Not commented.

linkFile: aFileName
     Not commented.



File: gst-base.info,  Node: DLD class-dynamic linking,  Prev: DLD class-C call-outs,  Up: DLD

1.64.2 DLD class: dynamic linking
---------------------------------

addLibrary: library
     Add library to the search path of libraries to be used by DLD.

addModule: library
     Add library to the list of modules to be loaded when the image is
     started.  The gst_initModule function in the library is called,
     but the library will not be put in the search path used whenever a
     C function is requested but not registered.

defineExternFunc: aFuncName
     This method calls #primDefineExternFunc: to try to link to a
     function with the given name, and answers whether the linkage was
     successful. You can redefine this method to restrict the ability
     to do dynamic linking.

initialize
     Private - Initialize the receiver's class variables

libraryList
     Answer a copy of the search path of libraries to be used by DLD

moduleList
     Answer a copy of the modules reloaded when the image is started

primDefineExternFunc: aFuncName
     This method tries to link to a function with the given name, and
     answers whether the linkage was successful. It should not be
     overridden.

update: aspect
     Called on startup - Make DLD re-link and reset the addresses of
     all the externally defined functions



File: gst-base.info,  Node: DumperProxy,  Next: Duration,  Prev: DLD,  Up: Base classes

1.65 DumperProxy
================

Defined in namespace Smalltalk
Superclass: Object
Category: Streams-Files
     I am an helper class for ObjectDumper. When an object cannot be
     saved in the standard way, you can register a subclass of me to
     provide special means to save that object.

* Menu:

* DumperProxy class-accessing::  (class)
* DumperProxy class-instance creation::  (class)
* DumperProxy-saving and restoring::  (instance)


File: gst-base.info,  Node: DumperProxy class-accessing,  Next: DumperProxy class-instance creation,  Up: DumperProxy

1.65.1 DumperProxy class: accessing
-----------------------------------

acceptUsageForClass: aClass
     The receiver was asked to be used as a proxy for the class aClass.
     Answer whether the registration is fine.  By default, answer true

loadFrom: anObjectDumper
     Reload a proxy stored in anObjectDumper and reconstruct the object



File: gst-base.info,  Node: DumperProxy class-instance creation,  Next: DumperProxy-saving and restoring,  Prev: DumperProxy class-accessing,  Up: DumperProxy

1.65.2 DumperProxy class: instance creation
-------------------------------------------

on: anObject
     Answer a proxy to be used to save anObject. This method MUST be
     overridden and anObject must NOT be stored in the object's
     instance variables unless you override #dumpTo:, because that
     would result in an infinite loop!



File: gst-base.info,  Node: DumperProxy-saving and restoring,  Prev: DumperProxy class-instance creation,  Up: DumperProxy

1.65.3 DumperProxy: saving and restoring
----------------------------------------

dumpTo: anObjectDumper
     Dump the proxy to anObjectDumper - the #loadFrom: class method
     will reconstruct the original object.

object
     Reconstruct the object stored in the proxy and answer it



File: gst-base.info,  Node: Duration,  Next: Error,  Prev: DumperProxy,  Up: Base classes

1.66 Duration
=============

Defined in namespace Smalltalk
Superclass: Time
Category: Language-Data types
     My instances represent differences between timestamps.

* Menu:

* Duration class-instance creation::  (class)
* Duration class-instance creation (non ANSI)::  (class)
* Duration-arithmetics::  (instance)


File: gst-base.info,  Node: Duration class-instance creation,  Next: Duration class-instance creation (non ANSI),  Up: Duration

1.66.1 Duration class: instance creation
----------------------------------------

days: d
     Answer a duration of `d' days

days: d hours: h minutes: m seconds: s
     Answer a duration of `d' days and the given number of hours,
     minutes, and seconds.

initialize
     Initialize the receiver's instance variables

zero
     Answer a duration of zero seconds.



File: gst-base.info,  Node: Duration class-instance creation (non ANSI),  Next: Duration-arithmetics,  Prev: Duration class-instance creation,  Up: Duration

1.66.2 Duration class: instance creation (non ANSI)
---------------------------------------------------

fromDays: days seconds: secs offset: unused
     Answer a duration of `d' days and `secs' seconds.  The last
     parameter is unused; this message is available for interoperability
     with the DateTime class.



File: gst-base.info,  Node: Duration-arithmetics,  Prev: Duration class-instance creation (non ANSI),  Up: Duration

1.66.3 Duration: arithmetics
----------------------------

* factor
     Answer a Duration that is `factor' times longer than the receiver

+ aDuration
     Answer a Duration that is the sum of the receiver and aDuration's
     lengths.

- aDuration
     Answer a Duration that is the difference of the receiver and
     aDuration's lengths.

/ factorOrDuration
     If the parameter is a Duration, answer the ratio between the
     receiver and factorOrDuration.  Else divide the receiver by
     factorOrDuration (a Number) and answer a new Duration that is
     correspondingly shorter.

abs
     Answer a Duration that is as long as the receiver, but always in
     the future.

days
     Answer the number of days in the receiver

negated
     Answer a Duration that is as long as the receiver, but with past
     and future exchanged.

negative
     Answer whether the receiver is in the past.

positive
     Answer whether the receiver is a zero-second duration or is in the
     future.

printOn: aStream
     Print a represention of the receiver on aStream.



File: gst-base.info,  Node: Error,  Next: Exception,  Prev: Duration,  Up: Base classes

1.67 Error
==========

Defined in namespace Smalltalk
Superclass: Exception
Category: Language-Exceptions
     Error represents a fatal error.  Instances of it are not resumable.

* Menu:

* Error-exception description::  (instance)


File: gst-base.info,  Node: Error-exception description,  Up: Error

1.67.1 Error: exception description
-----------------------------------

description
     Answer a textual description of the exception.

isResumable
     Answer false.  Error exceptions are by default unresumable;
     subclasses can override this method if desired.



File: gst-base.info,  Node: Exception,  Next: ExceptionSet,  Prev: Error,  Up: Base classes

1.68 Exception
==============

Defined in namespace Smalltalk
Superclass: Signal
Category: Language-Exceptions
     An Exception defines the characteristics of an exceptional event
     in a different way than CoreExceptions.  Instead of creating an
     hierarchy of objects and setting attributes of the objects, you
     create an hierarchy of classes and override methods in those
     classes; instances of those classes are passed to the handlers
     instead of instances of the common class Signal.

     Internally, Exception and every subclass of it hold onto a
     CoreException, so the two mechanisms are actually interchangeable.

* Menu:

* Exception class-comparison::  (class)
* Exception class-creating ExceptionCollections::  (class)
* Exception class-initialization::  (class)
* Exception class-instance creation::  (class)
* Exception class-interoperability with TrappableEvents::  (class)
* Exception-comparison::  (instance)
* Exception-exception description::  (instance)
* Exception-exception signaling::  (instance)


File: gst-base.info,  Node: Exception class-comparison,  Next: Exception class-creating ExceptionCollections,  Up: Exception

1.68.1 Exception class: comparison
----------------------------------

goodness: anException
     Answer how good the receiver is at handling the given exception.  A
     negative value indicates that the receiver is not able to handle
     the exception.

handles: anException
     Answer whether the receiver handles `anException'.



File: gst-base.info,  Node: Exception class-creating ExceptionCollections,  Next: Exception class-initialization,  Prev: Exception class-comparison,  Up: Exception

1.68.2 Exception class: creating ExceptionCollections
-----------------------------------------------------

, aTrappableEvent
     Answer an ExceptionCollection containing all the exceptions in the
     receiver and all the exceptions in aTrappableEvent



File: gst-base.info,  Node: Exception class-initialization,  Next: Exception class-instance creation,  Prev: Exception class-creating ExceptionCollections,  Up: Exception

1.68.3 Exception class: initialization
--------------------------------------

initialize
     Initialize the `links' between the core exception handling system
     and the ANSI exception handling system.



File: gst-base.info,  Node: Exception class-instance creation,  Next: Exception class-interoperability with TrappableEvents,  Prev: Exception class-initialization,  Up: Exception

1.68.4 Exception class: instance creation
-----------------------------------------

new
     Create an instance of the receiver, which you will be able to
     signal later.

signal
     Create an instance of the receiver, give it default attributes,
     and signal it immediately.

signal: messageText
     Create an instance of the receiver, set its message text, and
     signal it immediately.



File: gst-base.info,  Node: Exception class-interoperability with TrappableEvents,  Next: Exception-comparison,  Prev: Exception class-instance creation,  Up: Exception

1.68.5 Exception class: interoperability with TrappableEvents
-------------------------------------------------------------

allExceptionsDo: aBlock
     Private - Pass the coreException to aBlock

coreException
     Private - Answer the coreException which represents instances of
     the receiver

whenSignalledIn: onDoBlock do: handlerBlock exitBlock: exitBlock
     Private - Create an ExceptionHandler from the arguments and
     register it



File: gst-base.info,  Node: Exception-comparison,  Next: Exception-exception description,  Prev: Exception class-interoperability with TrappableEvents,  Up: Exception

1.68.6 Exception: comparison
----------------------------

= anObject
     Answer whether the receiver is equal to anObject.  This is true if
     either the receiver or its coreException are the same object as
     anObject.

hash
     Answer an hash value for the receiver.



File: gst-base.info,  Node: Exception-exception description,  Next: Exception-exception signaling,  Prev: Exception-comparison,  Up: Exception

1.68.7 Exception: exception description
---------------------------------------

defaultAction
     Execute the default action that is attached to the receiver.

description
     Answer a textual description of the exception.

isResumable
     Answer true.  Exceptions are by default resumable.



File: gst-base.info,  Node: Exception-exception signaling,  Prev: Exception-exception description,  Up: Exception

1.68.8 Exception: exception signaling
-------------------------------------

signal
     Raise the exceptional event represented by the receiver

signal: messageText
     Raise the exceptional event represented by the receiver, setting
     its message text to messageText.



File: gst-base.info,  Node: ExceptionSet,  Next: False,  Prev: Exception,  Up: Base classes

1.69 ExceptionSet
=================

Defined in namespace Smalltalk
Superclass: TrappableEvent
Category: Language-Exceptions
     My instances are not real exceptions: they can only be used as
     arguments to #on:do:... methods in BlockClosure. They act as
     shortcuts that allows you to use the same handler for many
     exceptions without having to write duplicate code

* Menu:

* ExceptionSet class-instance creation::  (class)
* ExceptionSet-enumerating::  (instance)


File: gst-base.info,  Node: ExceptionSet class-instance creation,  Next: ExceptionSet-enumerating,  Up: ExceptionSet

1.69.1 ExceptionSet class: instance creation
--------------------------------------------

new
     Private - Answer a new, empty ExceptionSet



File: gst-base.info,  Node: ExceptionSet-enumerating,  Prev: ExceptionSet class-instance creation,  Up: ExceptionSet

1.69.2 ExceptionSet: enumerating
--------------------------------

allExceptionsDo: aBlock
     Private - Evaluate aBlock for every exception in the receiver.
     Answer the receiver

goodness: exception
     Answer how good the receiver is at handling the given exception.  A
     negative value indicates that the receiver is not able to handle
     the exception.

handles: exception
     Answer whether the receiver handles `exception'.



File: gst-base.info,  Node: False,  Next: File,  Prev: ExceptionSet,  Up: Base classes

1.70 False
==========

Defined in namespace Smalltalk
Superclass: Boolean
Category: Language-Data types
     I always tell lies.  I have a single instance in the system, which
     represents the value false.

* Menu:

* False-basic::  (instance)
* False-C hacks::  (instance)
* False-printing::  (instance)


File: gst-base.info,  Node: False-basic,  Next: False-C hacks,  Up: False

1.70.1 False: basic
-------------------

& aBoolean
     We are false - anded with anything, we always answer false

and: aBlock
     We are false - anded with anything, we always answer false

eqv: aBoolean
     Answer whether the receiver and aBoolean represent the same
     boolean value

ifFalse: falseBlock
     We are false - evaluate the falseBlock

ifFalse: falseBlock ifTrue: trueBlock
     We are false - evaluate the falseBlock

ifTrue: trueBlock
     We are false - answer nil

ifTrue: trueBlock ifFalse: falseBlock
     We are false - evaluate the falseBlock

not
     We are false - answer true

or: aBlock
     We are false - ored with anything, we always answer the other
     operand, so evaluate aBlock

xor: aBoolean
     Answer whether the receiver and aBoolean represent different
     boolean values

| aBoolean
     We are false - ored with anything, we always answer the other
     operand



File: gst-base.info,  Node: False-C hacks,  Next: False-printing,  Prev: False-basic,  Up: False

1.70.2 False: C hacks
---------------------

asCBooleanValue
     Answer `0'.



File: gst-base.info,  Node: False-printing,  Prev: False-C hacks,  Up: False

1.70.3 False: printing
----------------------

printOn: aStream
     Print a representation of the receiver on aStream



File: gst-base.info,  Node: File,  Next: FileDescriptor,  Prev: False,  Up: Base classes

1.71 File
=========

Defined in namespace Smalltalk
Superclass: Object
Category: Streams-Files
     I expose the syntax of file names, including paths.  I know how to
     manipulate such a path by splitting it into its components.  In
     addition, I expose information about files (both real and virtual)
     such as their size and timestamps.

* Menu:

* File class-C functions::  (class)
* File class-file name management::  (class)
* File class-file operations::  (class)
* File class-instance creation::  (class)
* File class-reading system defaults::  (class)
* File class-testing::  (class)
* File-accessing::  (instance)
* File-file name management::  (instance)
* File-file operations::  (instance)
* File-testing::  (instance)


File: gst-base.info,  Node: File class-C functions,  Next: File class-file name management,  Up: File

1.71.1 File class: C functions
------------------------------

errno
     Not commented.

stringError: errno
     Not commented.



File: gst-base.info,  Node: File class-file name management,  Next: File class-file operations,  Prev: File class-C functions,  Up: File

1.71.2 File class: file name management
---------------------------------------

extensionFor: aString
     Answer the extension of a file named `aString'.  Note: the
     extension includes an initial dot.

fullNameFor: aString
     Answer the full path to a file called `aString', resolving the `.'
     and `..' directory entries, and answer the result.  `/..' is the
     same as '/'.

pathFor: aString
     Determine the path of the name of a file called `aString', and
     answer the result.  With the exception of the root directory, the
     final slash is stripped.

stripExtensionFrom: aString
     Remove the extension from the name of a file called `aString', and
     answer the result.

stripFileNameFor: aString
     Determine the path of the name of a file called `aString', and
     answer the result as a directory name including the final slash.

stripPathFrom: aString
     Remove the path from the name of a file called `aString', and
     answer the file name plus extension.



File: gst-base.info,  Node: File class-file operations,  Next: File class-instance creation,  Prev: File class-file name management,  Up: File

1.71.3 File class: file operations
----------------------------------

checkError
     Return whether an error had been reported or not.  If there had
     been one, raise an exception too

checkError: errno
     The error with the C code `errno' has been reported.  If errno >=
     1, raise an exception

remove: fileName
     Remove the file with the given path name

rename: oldFileName to: newFileName
     Rename the file with the given path name oldFileName to newFileName

touch: fileName
     Update the timestamp of the file with the given path name.



File: gst-base.info,  Node: File class-instance creation,  Next: File class-reading system defaults,  Prev: File class-file operations,  Up: File

1.71.4 File class: instance creation
------------------------------------

name: aName
     Answer a new file with the given path. The path is not validated
     until some of the fields of the newly created objects are accessed

on: aVFSHandler
     Answer a new file with the given path. The handler that returns
     the information is aVFSHandler



File: gst-base.info,  Node: File class-reading system defaults,  Next: File class-testing,  Prev: File class-instance creation,  Up: File

1.71.5 File class: reading system defaults
------------------------------------------

image
     Answer the full path to the image being used.



File: gst-base.info,  Node: File class-testing,  Next: File-accessing,  Prev: File class-reading system defaults,  Up: File

1.71.6 File class: testing
--------------------------

exists: fileName
     Answer whether a file with the given name exists

isAccessible: fileName
     Answer whether a directory with the given name exists and can be
     accessed

isExecutable: fileName
     Answer whether a file with the given name exists and can be
     executed

isReadable: fileName
     Answer whether a file with the given name exists and is readable

isWriteable: fileName
     Answer whether a file with the given name exists and is writeable



File: gst-base.info,  Node: File-accessing,  Next: File-file name management,  Prev: File class-testing,  Up: File

1.71.7 File: accessing
----------------------

creationTime
     Answer the creation time of the file identified by the receiver.
     On some operating systems, this could actually be the last change
     time (the `last change time' has to do with permissions, ownership
     and the like).

lastAccessTime
     Answer the last access time of the file identified by the receiver

lastChangeTime
     Answer the last change time of the file identified by the receiver
     (the `last change time' has to do with permissions, ownership and
     the like). On some operating systems, this could actually be the
     file creation time.

lastModifyTime
     Answer the last modify time of the file identified by the receiver
     (the `last modify time' has to do with the actual file contents).

name
     Answer the name of the file identified by the receiver

refresh
     Refresh the statistics for the receiver

size
     Answer the size of the file identified by the receiver



File: gst-base.info,  Node: File-file name management,  Next: File-file operations,  Prev: File-accessing,  Up: File

1.71.8 File: file name management
---------------------------------

extension
     Answer the extension of the receiver

fullName
     Answer the full name of the receiver, resolving the `.' and `..'
     directory entries, and answer the result.  Answer nil if the name
     is invalid (such as '/usr/../../badname')

path
     Answer the path (if any) of the receiver

stripExtension
     Answer the path (if any) and file name of the receiver

stripFileName
     Answer the path of the receiver, always including a directory name
     (possibly `.') and the final directory separator

stripPath
     Answer the file name and extension (if any) of the receiver



File: gst-base.info,  Node: File-file operations,  Next: File-testing,  Prev: File-file name management,  Up: File

1.71.9 File: file operations
----------------------------

contents
     Open a read-only FileStream on the receiver, read its contents,
     close the stream and answer the contents

open: mode
     Open the receiver in the given mode (as answered by FileStream's
     class constant methods)

open: mode ifFail: aBlock
     Open the receiver in the given mode (as answered by FileStream's
     class constant methods). Upon failure, evaluate aBlock.

openDescriptor: mode
     Open the receiver in the given mode (as answered by FileStream's
     class constant methods). Upon failure, evaluate aBlock.

readStream
     Open a read-only FileStream on the receiver

remove
     Remove the file identified by the receiver

renameTo: newName
     Remove the file identified by the receiver

touch
     Update the timestamp of the file with the given path name.

writeStream
     Open a write-only FileStream on the receiver



File: gst-base.info,  Node: File-testing,  Prev: File-file operations,  Up: File

1.71.10 File: testing
---------------------

exists
     Answer whether a file with the name contained in the receiver does
     exist.

isAccessible
     Answer whether a directory with the name contained in the receiver
     does exist and can be accessed

isDirectory
     Answer whether a file with the name contained in the receiver does
     exist and identifies a directory.

isExecutable
     Answer whether a file with the name contained in the receiver does
     exist and is executable

isFile
     Answer whether a file with the name contained in the receiver does
     exist and does not identify a directory.

isReadable
     Answer whether a file with the name contained in the receiver does
     exist and is readable

isSymbolicLink
     Answer whether a file with the name contained in the receiver does
     exist and does not identify a directory.

isWriteable
     Answer whether a file with the name contained in the receiver does
     exist and is writeable



File: gst-base.info,  Node: FileDescriptor,  Next: FileSegment,  Prev: File,  Up: Base classes

1.72 FileDescriptor
===================

Defined in namespace Smalltalk
Superclass: ByteStream
Category: Streams-Files
     My instances are what conventional programmers think of as files.
     My instance creation methods accept the name of a disk file (or
     any named file object, such as /dev/rmt0 on UNIX or MTA0: on VMS).
     In addition, they accept a virtual filesystem path like
     `configure.gz#ugz' which can be used to transparently extract or
     decompress files from archives, or do arbitrary processing on the
     files.

* Menu:

* FileDescriptor class-initialization::  (class)
* FileDescriptor class-instance creation::  (class)
* FileDescriptor-accessing::  (instance)
* FileDescriptor-basic::  (instance)
* FileDescriptor-built ins::  (instance)
* FileDescriptor-class type methods::  (instance)
* FileDescriptor-initialize-release::  (instance)
* FileDescriptor-low-level access::  (instance)
* FileDescriptor-overriding inherited methods::  (instance)
* FileDescriptor-printing::  (instance)
* FileDescriptor-testing::  (instance)


File: gst-base.info,  Node: FileDescriptor class-initialization,  Next: FileDescriptor class-instance creation,  Up: FileDescriptor

1.72.1 FileDescriptor class: initialization
-------------------------------------------

initialize
     Initialize the receiver's class variables

update: aspect
     Close open files before quitting



File: gst-base.info,  Node: FileDescriptor class-instance creation,  Next: FileDescriptor-accessing,  Prev: FileDescriptor class-initialization,  Up: FileDescriptor

1.72.2 FileDescriptor class: instance creation
----------------------------------------------

append
     Open for writing.  The file is created if it does not exist.  The
     stream is positioned at the end of the file.

create
     Open for reading and writing.  The file is created if it does not
     exist, otherwise it is truncated.  The stream is positioned at the
     beginning of the file.

fopen: fileName mode: fileMode
     Open fileName in the required mode - answered by #append, #create,
     #readWrite, #read or #write - and fail if the file cannot be
     opened.  Else answer a new FileStream. For mode anyway you can use
     any standard C non-binary fopen mode.  The file will be
     automatically closed upon GC if the object is not referenced
     anymore, but it is better to close it as soon as you're finished
     with it anyway, using #close. To keep a file open even when no
     references exist anymore, send it #removeToBeFinalized

fopen: fileName mode: fileMode ifFail: aBlock
     Open fileName in the required mode - answered by #append, #create,
     #readWrite, #read or #write - and evaluate aBlock if the file
     cannot be opened. Else answer a new FileStream. For mode anyway
     you can use any The file will be automatically closed upon GC if
     the object is not referenced anymore, but it is better to close it
     as soon as you're finished with it anyway, using #close. To keep a
     file open even when no references exist anymore, send it
     #removeToBeFinalized

on: fd
     Open a FileDescriptor on the given file descriptor.  Read-write
     access is assumed.

open: fileName
     Open fileName in read-write mode - fail if the file cannot be
     opened.  Else answer a new FileStream.  The file will be
     automatically closed upon GC if the object is not referenced
     anymore, but you should close it with #close anyway.  To keep a
     file open, send it #removeToBeFinalized

open: fileName mode: fileMode
     Open fileName in the required mode - answered by #append, #create,
     #readWrite, #read or #write - and fail if the file cannot be
     opened.  Else answer a new FileStream. For mode anyway you can use
     any standard C non-binary fopen mode.  fileName can be a `virtual
     filesystem' path, including URLs and '#' suffixes that are
     inspected by the virtual filesystem layers and replaced with tasks
     such as un-gzipping a file or extracting a file from an archive.
     The file will be automatically closed upon GC if the object is not
     referenced anymore, but it is better to close it as soon as you're
     finished with it anyway, using #close. To keep a file open even
     when no references exist anymore, send it #removeToBeFinalized

open: fileName mode: fileMode ifFail: aBlock
     Open fileName in the required mode - answered by #append, #create,
     #readWrite, #read or #write - and evaluate aBlock if the file
     cannot be opened. Else answer a new instance of the receiver. For
     mode anyway you can use any standard C non-binary fopen mode.
     fileName can be a `virtual filesystem' path, including URLs and
     '#' suffixes that are inspected by the virtual filesystem layers
     and replaced with tasks such as un-gzipping a file or extracting a
     file from an archive.  The file will be automatically closed upon
     GC if the object is not referenced anymore, but it is better to
     close it as soon as you're finished with it anyway, using #close.
     To keep a file open even when no references exist anymore, send it
     #removeToBeFinalized

openTemporaryFile: baseName
     Open for writing a file whose name starts with baseName, followed
     by six random alphanumeric characters.  The file is created with
     mode read/write and permissions 0666 or 0600 on most recent
     operating systems (beware, the former behavior might constitute a
     security problem).  The file is opened with the O_EXCL flag,
     guaranteeing that when the method returns successfully we are the
     only user.

popen: commandName dir: direction
     Open a pipe on the given command and fail if the file cannot be
     opened.  Else answer a new FileStream.  The pipe will not be
     automatically closed upon GC, even if the object is not referenced
     anymore, because when you close a pipe you have to wait for the
     associated process to terminate. To enforce automatic closing of
     the pipe, send it #addToBeFinalized.  direction is returned by
     #read or #write ('r' or 'w') and is interpreted from the point of
     view of Smalltalk: reading means Smalltalk reads the standard
     output of the command, writing means Smalltalk writes the standard
     input of the command. The other channel (stdin when reading,
     stdout when writing) is the same as GST's, unless commandName
     alters it.

popen: commandName dir: direction ifFail: aBlock
     Open a pipe on the given command and evaluate aBlock file cannot
     be opened. Else answer a new FileStream.  The pipe will not be
     automatically closed upon GC, even if the object is not referenced
     anymore, because when you close a pipe you have to wait for the
     associated process to terminate. To enforce automatic closing of
     the pipe, send it #addToBeFinalized.  direction is interpreted
     from the point of view of Smalltalk: reading means that Smalltalk
     reads the standard output of the command, writing means that
     Smalltalk writes the standard input of the command

read
     Open text file for reading.  The stream is positioned at the
     beginning of the file.

readWrite
     Open for reading and writing.  The stream is positioned at the
     beginning of the file.

write
     Truncate file to zero length or create text file for writing.  The
     stream is positioned at the beginning of the file.



File: gst-base.info,  Node: FileDescriptor-accessing,  Next: FileDescriptor-basic,  Prev: FileDescriptor class-instance creation,  Up: FileDescriptor

1.72.3 FileDescriptor: accessing
--------------------------------

canRead
     Answer whether the file is open and we can read from it

canWrite
     Answer whether the file is open and we can write from it

ensureReadable
     If the file is open, wait until data can be read from it.  The wait
     allows other Processes to run.

ensureWriteable
     If the file is open, wait until we can write to it.  The wait
     allows other Processes to run.

exceptionalCondition
     Answer whether the file is open and an exceptional condition (such
     as presence of out of band data) has occurred on it

fd
     Return the OS file descriptor of the file

isOpen
     Answer whether the file is still open

isPipe
     Answer whether the file is a pipe or an actual disk file

name
     Return the name of the file

waitForException
     If the file is open, wait until an exceptional condition (such as
     presence of out of band data) has occurred on it.  The wait allows
     other Processes to run.



File: gst-base.info,  Node: FileDescriptor-basic,  Next: FileDescriptor-built ins,  Prev: FileDescriptor-accessing,  Up: FileDescriptor

1.72.4 FileDescriptor: basic
----------------------------

checkError
     Perform error checking.  By default, we call File
     class>>#checkError.

close
     Close the file

contents
     Answer the whole contents of the file

copyFrom: from to: to
     Answer the contents of the file between the two given positions

finalize
     Close the file if it is still open by the time the object becomes
     garbage.

invalidate
     Invalidate a file descriptor

next
     Return the next character in the file, or nil at eof

nextByte
     Return the next byte in the file, or nil at eof

nextPut: aCharacter
     Store aCharacter on the file

nextPutByte: anInteger
     Store the byte, anInteger, on the file

nextPutByteArray: aByteArray
     Store aByteArray on the file

peek
     Returns the next element of the stream without moving the pointer.
     Returns nil when at end of stream.

position
     Answer the zero-based position from the start of the file

position: n
     Set the file pointer to the zero-based position n

reset
     Reset the stream to its beginning

size
     Return the current size of the file, in bytes

truncate
     Truncate the file at the current position



File: gst-base.info,  Node: FileDescriptor-built ins,  Next: FileDescriptor-class type methods,  Prev: FileDescriptor-basic,  Up: FileDescriptor

1.72.5 FileDescriptor: built ins
--------------------------------

fileOp: ioFuncIndex
     Private - Used to limit the number of primitives used by
     FileStreams

fileOp: ioFuncIndex ifFail: aBlock
     Private - Used to limit the number of primitives used by
     FileStreams.

fileOp: ioFuncIndex with: arg1
     Private - Used to limit the number of primitives used by
     FileStreams

fileOp: ioFuncIndex with: arg1 ifFail: aBlock
     Private - Used to limit the number of primitives used by
     FileStreams.

fileOp: ioFuncIndex with: arg1 with: arg2
     Private - Used to limit the number of primitives used by
     FileStreams

fileOp: ioFuncIndex with: arg1 with: arg2 ifFail: aBlock
     Private - Used to limit the number of primitives used by
     FileStreams.

fileOp: ioFuncIndex with: arg1 with: arg2 with: arg3
     Private - Used to limit the number of primitives used by
     FileStreams

fileOp: ioFuncIndex with: arg1 with: arg2 with: arg3 ifFail: aBlock
     Private - Used to limit the number of primitives used by
     FileStreams.



File: gst-base.info,  Node: FileDescriptor-class type methods,  Next: FileDescriptor-initialize-release,  Prev: FileDescriptor-built ins,  Up: FileDescriptor

1.72.6 FileDescriptor: class type methods
-----------------------------------------

isBinary
     We answer characters, so answer false

isExternalStream
     We stream on an external entity (a file), so answer true

isText
     We answer characters, so answer true



File: gst-base.info,  Node: FileDescriptor-initialize-release,  Next: FileDescriptor-low-level access,  Prev: FileDescriptor-class type methods,  Up: FileDescriptor

1.72.7 FileDescriptor: initialize-release
-----------------------------------------

initialize
     Initialize the receiver's instance variables

newBuffer
     Private - Answer a String to be used as the receiver's buffer



File: gst-base.info,  Node: FileDescriptor-low-level access,  Next: FileDescriptor-overriding inherited methods,  Prev: FileDescriptor-initialize-release,  Up: FileDescriptor

1.72.8 FileDescriptor: low-level access
---------------------------------------

nextHunk
     Answer the next buffers worth of stuff in the Stream represented
     by the receiver.  Do at most one actual input operation.

read: byteArray
     Ignoring any buffering, try to fill byteArray with the contents of
     the file

read: byteArray from: position to: end
     Ignoring any buffering, try to fill the given range of byteArray
     with the contents of the file

read: byteArray numBytes: anInteger
     Ignoring any buffering, try to fill anInteger bytes of byteArray
     with the contents of the file

write: byteArray
     Ignoring any buffering, try to write the contents of byteArray in
     the file

write: byteArray from: position to: end
     Ignoring any buffering, try to write to the file the given range
     of byteArray, starting at the position-th element and ending at
     the end-th.

write: byteArray numBytes: anInteger
     Ignoring any buffering, try to write to the file the first
     anInteger bytes of byteArray



File: gst-base.info,  Node: FileDescriptor-overriding inherited methods,  Next: FileDescriptor-printing,  Prev: FileDescriptor-low-level access,  Up: FileDescriptor

1.72.9 FileDescriptor: overriding inherited methods
---------------------------------------------------

isEmpty
     Answer whether the receiver is empty

next: anInteger
     Return the next 'anInteger' characters from the stream, as a
     String.

nextByteArray: anInteger
     Return the next 'anInteger' bytes from the stream, as a ByteArray.

nextPutAll: aCollection
     Put all the characters in aCollection in the file

nextPutAllFlush: aCollection
     Put all the characters in aCollection in the file.  For
     compatibility with FileStream (FileDescriptor is not buffered,
     thus this method is equivalent to nextPutAll:

reverseContents
     Return the contents of the file from the last byte to the first

setToEnd
     Reset the file pointer to the end of the file

skip: anInteger
     Skip anInteger bytes in the file



File: gst-base.info,  Node: FileDescriptor-printing,  Next: FileDescriptor-testing,  Prev: FileDescriptor-overriding inherited methods,  Up: FileDescriptor

1.72.10 FileDescriptor: printing
--------------------------------

printOn: aStream
     Print a representation of the receiver on aStream



File: gst-base.info,  Node: FileDescriptor-testing,  Prev: FileDescriptor-printing,  Up: FileDescriptor

1.72.11 FileDescriptor: testing
-------------------------------

atEnd
     Answer whether data has come to an end



File: gst-base.info,  Node: FileSegment,  Next: FileStream,  Prev: FileDescriptor,  Up: Base classes

1.73 FileSegment
================

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Implementation
     My instances represent sections of files.  I am primarily used by
     the compiler to record source code locations.  I am not a part of
     the normal Smalltalk-80 kernel; I am specific to the GNU Smalltalk
     implementation.

* Menu:

* FileSegment class-basic::  (class)
* FileSegment class-installing::  (class)
* FileSegment-basic::  (instance)
* FileSegment-equality::  (instance)


File: gst-base.info,  Node: FileSegment class-basic,  Next: FileSegment class-installing,  Up: FileSegment

1.73.1 FileSegment class: basic
-------------------------------

on: aFile startingAt: startPos for: sizeInteger
     Create a new FileSegment referring to the contents of the given
     file, from the startPos-th byte and for sizeInteger bytes



File: gst-base.info,  Node: FileSegment class-installing,  Next: FileSegment-basic,  Prev: FileSegment class-basic,  Up: FileSegment

1.73.2 FileSegment class: installing
------------------------------------

relocateFrom: startPath to: endPath
     Remove startPath from all paths that start with it, and replace it
     with endPath.  Needed to support $(DESTDIR) when installing



File: gst-base.info,  Node: FileSegment-basic,  Next: FileSegment-equality,  Prev: FileSegment class-installing,  Up: FileSegment

1.73.3 FileSegment: basic
-------------------------

asString
     Answer a String containing the required segment of the file

fileName
     Answer the name of the file containing the segment

filePos
     Answer the position in the file where the segment starts

relocateFrom: startPath to: endPath map: map
     If the path starts with startPath, remove that part of the path
     and replace it with endPath.  map is a Dictionary that is used so
     that equal filenames stay equal, without increasing the amount of
     memory that the image uses.

size
     Answer the length of the segment

withFileDo: aBlock
     Evaluate aBlock passing it the FileStream in which the segment
     identified by the receiver is stored



File: gst-base.info,  Node: FileSegment-equality,  Prev: FileSegment-basic,  Up: FileSegment

1.73.4 FileSegment: equality
----------------------------

= aFileSegment
     Answer whether the receiver and aFileSegment are equal.

hash
     Answer an hash value for the receiver.



File: gst-base.info,  Node: FileStream,  Next: Float,  Prev: FileSegment,  Up: Base classes

1.74 FileStream
===============

Defined in namespace Smalltalk
Superclass: FileDescriptor
Category: Streams-Files
     My instances are what conventional programmers think of as files.
     My instance creation methods accept the name of a disk file (or
     any named file object, such as /dev/rmt0 on UNIX or MTA0: on VMS).

* Menu:

* FileStream class-file-in::  (class)
* FileStream class-standard streams::  (class)
* FileStream-basic::  (instance)
* FileStream-buffering::  (instance)
* FileStream-filing in::  (instance)
* FileStream-overriding inherited methods::  (instance)
* FileStream-testing::  (instance)


File: gst-base.info,  Node: FileStream class-file-in,  Next: FileStream class-standard streams,  Up: FileStream

1.74.1 FileStream class: file-in
--------------------------------

fileIn: aFileName
     File in the aFileName file. During a file in operation, global
     variables (starting with an uppercase letter) that are not
     declared yet don't yield an `unknown variable' error. Instead,
     they are defined as nil in the `Undeclared' dictionary (a global
     variable residing in Smalltalk).  As soon as you add the variable
     to a namespace (for example by creating a class) the Association
     will be removed from Undeclared and reused in the namespace, so
     that the old references will automagically point to the new value.

fileIn: aFileName ifMissing: aSymbol
     Conditionally do a file in, only if the key (often a class)
     specified by 'aSymbol' is not present in the Smalltalk system
     dictionary already.  During a file in operation, global variables
     (starting with an uppercase letter) that are not declared don't
     yield an `unknown variable' error. Instead, they are defined as
     nil in the `Undeclared' dictionary (a global variable residing in
     Smalltalk).  As soon as you add the variable to a namespace (for
     example by creating a class) the Association will be removed from
     Undeclared and reused in the namespace, so that the old references
     will automagically point to the new value.

fileIn: aFileName ifTrue: aBoolean
     Conditionally do a file in, only if the supplied boolean is true.
     During a file in operation, global variables (starting with an
     uppercase letter) that are not declared don't yield an `unknown
     variable' error. Instead, they are defined as nil in the
     `Undeclared' dictionary (a global variable residing in Smalltalk).
     As soon as you add the variable to a namespace (for example by
     creating a class) the Association will be removed from Undeclared
     and reused in the namespace, so that the old references will
     automagically point to the new value.

fileIn: aFileName line: lineInteger from: realFileName at: aCharPos
     File in the aFileName file giving errors such as if it was loaded
     from the given line, file name and starting position (instead of
     1).

generateMakefileOnto: aStream
     Generate a make file for the file-ins since record was last set to
     true.  Store it on aStream

initialize
     Private - Initialize the receiver's class variables

record: recordFlag
     Set whether Smalltalk should record information aboutnested
     file-ins.  When recording is enabled, use #generateMakefileOnto:
     to automatically generate a valid makefile for the intervening
     file-ins.

require: assoc
     Conditionally do a file in from the value of assoc, only if the
     key of assoc is not present in the Smalltalk system dictionary
     already.  During a file in operation, global variables (starting
     with an uppercase letter) that are not declared don't yield an
     `unknown variable' error. Instead, they are defined as nil in the
     `Undeclared' dictionary (a global variable residing in Smalltalk).
     As soon as you add the variable to a namespace (for example by
     creating a class) the Association will be removed from Undeclared
     and reused in the namespace, so that the old references will
     automagically point to the new value.

verbose: verboseFlag
     Set whether Smalltalk should output debugging messages when filing
     in



File: gst-base.info,  Node: FileStream class-standard streams,  Next: FileStream-basic,  Prev: FileStream class-file-in,  Up: FileStream

1.74.2 FileStream class: standard streams
-----------------------------------------

stderr
     Answer a FileStream that is attached the Smalltalk program's
     standard error file handle, which can be used for error messages
     and diagnostics issued by the program.

stdin
     Answer a FileStream that is attached the Smalltalk program's
     standard input file handle, which is the normal source of input
     for the program.

stdout
     Answer a FileStream that is attached the Smalltalk program's
     standard output file handle; this is used for normal output from
     the program.



File: gst-base.info,  Node: FileStream-basic,  Next: FileStream-buffering,  Prev: FileStream class-standard streams,  Up: FileStream

1.74.3 FileStream: basic
------------------------

copyFrom: from to: to
     Answer the contents of the file between the two given positions

next
     Return the next character in the file, or nil at eof

nextByte
     Return the next byte in the file, or nil at eof

nextPut: aCharacter
     Store aCharacter on the file

nextPutByte: anInteger
     Store the byte, anInteger, on the file

nextPutByteArray: aByteArray
     Store aByteArray on the file

peek
     Return the next character in the file, or nil at eof.  Don't
     advance the file pointer.

position
     Answer the zero-based position from the start of the file

position: n
     Set the file pointer to the zero-based position n

size
     Return the current size of the file, in bytes

truncate
     Truncate the file at the current position



File: gst-base.info,  Node: FileStream-buffering,  Next: FileStream-filing in,  Prev: FileStream-basic,  Up: FileStream

1.74.4 FileStream: buffering
----------------------------

basicFlush
     Private - Flush the output buffer, fail if it is empty

bufferSize
     Answer the file's current buffer

bufferSize: bufSize
     Flush the file and set the buffer's size to bufSize

clean
     Synchronize the file descriptor's state with the object's state.

fill
     Private - Fill the input buffer

flush
     Flush the output buffer

newBuffer
     Private - Answer a String to be used as the receiver's buffer

nextHunk
     Answer the next buffers worth of stuff in the Stream represented
     by the receiver.  Do at most one actual input operation.

pendingWrite
     Answer whether the output buffer is full



File: gst-base.info,  Node: FileStream-filing in,  Next: FileStream-overriding inherited methods,  Prev: FileStream-buffering,  Up: FileStream

1.74.5 FileStream: filing in
----------------------------

fileIn
     File in the contents of the receiver.  During a file in operation,
     global variables (starting with an uppercase letter) that are not
     declared don't yield an `unknown variable' error. Instead, they
     are defined as nil in the `Undeclared' dictionary (a global
     variable residing in Smalltalk).  As soon as you add the variable
     to a namespace (for example by creating a class) the Association
     will be removed from Undeclared and reused in the namespace, so
     that the old references will automagically point to the new value.

fileInLine: lineNum fileName: aString at: charPosInt
     Private - Much like a preprocessor #line directive; it is used by
     the Emacs Smalltalk mode.



File: gst-base.info,  Node: FileStream-overriding inherited methods,  Next: FileStream-testing,  Prev: FileStream-filing in,  Up: FileStream

1.74.6 FileStream: overriding inherited methods
-----------------------------------------------

next: anInteger
     Return the next 'anInteger' characters from the stream, as a
     String.

nextByteArray: anInteger
     Return the next 'anInteger' bytes from the stream, as a ByteArray.

nextLine
     Returns a collection of the same type that the stream accesses,
     containing the next line up to the next new-line character.
     Returns the entire rest of the stream's contents if no new-line
     character is found.

nextPutAll: aCollection
     Put all the characters in aCollection in the file

nextPutAllFlush: aCollection
     Put all the characters in aCollection in the file, then flush the
     file buffers



File: gst-base.info,  Node: FileStream-testing,  Prev: FileStream-overriding inherited methods,  Up: FileStream

1.74.7 FileStream: testing
--------------------------

atEnd
     Answer whether data has come to an end



File: gst-base.info,  Node: Float,  Next: FloatD,  Prev: FileStream,  Up: Base classes

1.75 Float
==========

Defined in namespace Smalltalk
Superclass: Number
Category: Language-Data types
     My instances represent floating point numbers that have arbitrary
     precision.  Besides the standard numerical operations, they provide
     transcendental operations too.  They implement IEEE-754 correctly
     if the hardware supports it.

* Menu:

* Float class-byte-order dependancies::  (class)
* Float class-characterization::  (class)
* Float-arithmetic::  (instance)
* Float-basic::  (instance)
* Float-built ins::  (instance)
* Float-coercing::  (instance)
* Float-comparing::  (instance)
* Float-printing::  (instance)
* Float-storing::  (instance)
* Float-testing::  (instance)
* Float-testing functionality::  (instance)
* Float-transcendental operations::  (instance)


File: gst-base.info,  Node: Float class-byte-order dependancies,  Next: Float class-characterization,  Up: Float

1.75.1 Float class: byte-order dependancies
-------------------------------------------

signByte
     Answer the byte of the receiver that contains the sign bit



File: gst-base.info,  Node: Float class-characterization,  Next: Float-arithmetic,  Prev: Float class-byte-order dependancies,  Up: Float

1.75.2 Float class: characterization
------------------------------------

denormalized
     Answer whether instances of the receiver can be in denormalized
     form.

e
     Returns the value of e. Hope is that it is precise enough

epsilon
     Return the smallest Float x for which is 1 + x ~= 1

fmin
     Return the smallest Float that is > 0.

fminDenormalized
     Return the smallest Float that is > 0 if denormalized values are
     supported, else return 0.

ln10
     Returns the value of ln 10. Hope is that it is precise enough

log10Base2
     Returns the value of log2 10. Hope is that it is precise enough

pi
     Returns the value of pi. Hope is that it is precise enough

radix
     Answer the base in which computations between instances of the
     receiver are made.  This should be 2 on about every known
     computer, so GNU Smalltalk always answers 2.



File: gst-base.info,  Node: Float-arithmetic,  Next: Float-basic,  Prev: Float class-characterization,  Up: Float

1.75.3 Float: arithmetic
------------------------

integerPart
     Return the receiver's integer part

negated
     Return the negation of the receiver.  Unlike 0-self, this converts
     correctly signed zeros.



File: gst-base.info,  Node: Float-basic,  Next: Float-built ins,  Prev: Float-arithmetic,  Up: Float

1.75.4 Float: basic
-------------------

hash
     Answer an hash value for the receiver


