I add a number of facilities to those in ClassDescription:
A set of all my subclasses (defined in ClassDescription, but only used here and below)
A name by which I can be found in a SystemDictionary
A classPool for class variables shared between this class and its metaclass
A list of sharedPools which probably should be supplanted by some better mechanism.
My instances describe the representation and behavior of objects. I add more comprehensive programming support facilities to the basic attributes of Behavior and the descriptive facilities of ClassDescription.
The slot 'subclasses' is a redundant structure. It is never used during execution, but is used by the development system to simplify or speed certain operations.
Add the argument, aString, as a class variable of the receiver.
Signal an error if the first character of aString is not capitalized,
or if it is already a variable named in the class.
Remove the class variable whose name is the argument, aString, from
the names defined in the receiver, a class. Create an error notification if
aString is not a class variable or if it is still being used in the code of
the class.
Look up the first argument, varName, in the context of the receiver. If it is there,
pass the association to the second argument, assocBlock, and answer true.
File a description of the receiver on aFileStream. If the boolean argument,
moveSource, is true, then set the trailing bytes to the position of aFileStream and
to fileIndex in order to indicate where to find the source code.
File a description of the receiver on aFileStream. If the boolean argument,
moveSource, is true, then set the trailing bytes to the position of aFileStream and
to fileIndex in order to indicate where to find the source code.
References to the receiver, a class, and its metaclass should no longer be included in the system ChangeSet.
7/18/96 sw: call removeClassAndMetaClassChanges:
Forget the receiver from the Smalltalk global dictionary. Any existing instances will refer to an obsolete version of the receiver. Do not log the removal either to the current change set nor to the system changes log
Answer an instance of me, a new class, using the arguments of the
message as the needed information.
Must only be sent to a new instance; else we would need Object flushCache.
Remove the pool dictionary, aDictionary, as one of the receiver's pool
dictionaries. Create an error notification if the dictionary is not one of
the pools.
: Note that it removes the wrong one if there are two empty Dictionaries in the list.
This is the standard initialization message for creating a new class as a
subclass of an existing class (the receiver) in which the subclass is to
have indexable byte-sized nonpointer variables.
This is the standard initialization message for creating a new class as a
subclass of an existing class (the receiver) in which the subclass is to
have indexable pointer variables.
This is the standard initialization message for creating a new class as a
subclass of an existing class (the receiver) in which the subclass is to
have indexable word-sized nonpointer variables.
This is the standard initialization message for creating a new class as a
subclass of an existing class (the receiver) in which the subclass is to
have weak indexable pointer variables.
Answer a Boolean according to whether any methods are defined for the
receiver (includes whether there are methods defined in the receiver's
metaclass).