--- a/Class.st Tue Oct 29 22:29:24 1996 +0100
+++ b/Class.st Wed Oct 30 00:37:41 1996 +0100
@@ -308,6 +308,8 @@
!Class class methodsFor:'helpers'!
revisionInfoFromString:aString
+ "{ Pragma: +optSpace }"
+
"return a dictionary filled with revision info.
This extracts the relevant info from aString.
For now, this is a bad design - should always ask the
@@ -372,6 +374,8 @@
!
revisionStringFromSource:aMethodSourceString
+ "{ Pragma: +optSpace }"
+
"extract a revision string from a methods source string"
|lines line|
@@ -599,6 +603,8 @@
!
comment:aString
+ "{ Pragma: +optSpace }"
+
"set the comment of the class to be the argument, aString;
create a change record and notify dependents."
@@ -653,6 +659,8 @@
!
primitiveDefinitions:aString
+ "{ Pragma: +optSpace }"
+
"set the primitiveDefinition string"
self setPrimitiveSpecsAt:1 to:aString.
@@ -662,6 +670,8 @@
!
primitiveDefinitionsString
+ "{ Pragma: +optSpace }"
+
"return the primitiveDefinition string or nil"
^ self getPrimitiveSpecsAt:1
@@ -673,6 +683,8 @@
!
primitiveFunctions:aString
+ "{ Pragma: +optSpace }"
+
"set the primitiveFunction string"
self setPrimitiveSpecsAt:3 to:aString.
@@ -682,24 +694,32 @@
!
primitiveFunctionsString
+ "{ Pragma: +optSpace }"
+
"return the primitiveFunctions string or nil"
^ self getPrimitiveSpecsAt:3
!
primitiveSpec
+ "{ Pragma: +optSpace }"
+
"return the primitiveSpec or nil"
^ primitiveSpec
!
primitiveSpec:anArrayOf3ElementsOrNil
+ "{ Pragma: +optSpace }"
+
"set the primitiveSpec or nil"
primitiveSpec := anArrayOf3ElementsOrNil
!
primitiveVariables:aString
+ "{ Pragma: +optSpace }"
+
"set the primitiveVariable string"
self setPrimitiveSpecsAt:2 to:aString.
@@ -709,12 +729,16 @@
!
primitiveVariablesString
+ "{ Pragma: +optSpace }"
+
"return the primitiveVariables string or nil"
^ self getPrimitiveSpecsAt:2
!
privateClasses
+ "{ Pragma: +optSpace }"
+
"return a collection of my private classes (if any); nil otherwise"
|classes myName|
@@ -742,6 +766,8 @@
!
privateClassesAt:aClassNameSymbol
+ "{ Pragma: +optSpace }"
+
"return a private class if present; nil otherwise"
|class|
@@ -754,6 +780,8 @@
!
privateClassesAt:aClassNameSymbol put:aClass
+ "{ Pragma: +optSpace }"
+
"return a private class if present"
self classVarAt:(':' , aClassNameSymbol) asSymbol put:aClass
@@ -763,6 +791,8 @@
!
removeClassVarName:aString
+ "{ Pragma: +optSpace }"
+
"remove a class variable if not already there.
Also writes a change record and notifies dependents.
BUG: Currently, no recompilation is done - this will change."
@@ -782,6 +812,8 @@
!
renameCategory:oldCategory to:newCategory
+ "{ Pragma: +optSpace }"
+
"rename a category (changes category of those methods).
Appends a change record and notifies dependents."
@@ -959,6 +991,8 @@
!
unload
+ "{ Pragma: +optSpace }"
+
"if the receiver was autoloaded, unload and reinstall it as
autoloaded. Can be used to get rid of no longer needed autoloaded
classes.
@@ -1424,18 +1458,24 @@
!Class methodsFor:'changes management'!
addChangeRecordForChangeCategory
+ "{ Pragma: +optSpace }"
+
"add a category change record to the changes file"
self writingChangePerform:#addChangeRecordForChangeCategory:to: with:category.
!
addChangeRecordForClass:aClass
+ "{ Pragma: +optSpace }"
+
"add a class-definition-record to the changes file"
self writingChangePerform:#addChangeRecordForClass:to: with:aClass.
!
addChangeRecordForClassCheckIn:aClass
+ "{ Pragma: +optSpace }"
+
"append a class-was-checkedIn-record to the changes file"
self addInfoRecord:('checkin ' , aClass name , ' (' , aClass revision , ')')
@@ -1445,12 +1485,16 @@
!
addChangeRecordForClassComment:aClass
+ "{ Pragma: +optSpace }"
+
"add a class-comment-record to the changes file"
self writingChangePerform:#addChangeRecordForClassComment:to: with:aClass.
!
addChangeRecordForClassContainerRemove:aClass
+ "{ Pragma: +optSpace }"
+
"append a container-was-removed-record to the changes file"
self addInfoRecord:('removed source container of ' , aClass name)
@@ -1460,24 +1504,32 @@
!
addChangeRecordForClassFileOut:aClass
+ "{ Pragma: +optSpace }"
+
"append a class-was-filedOut-record to the changes file"
self addInfoRecord:('fileOut ' , aClass name)
!
addChangeRecordForClassInstvars:aClass
+ "{ Pragma: +optSpace }"
+
"add a class-instvars-record to the changes file"
self writingChangePerform:#addChangeRecordForClassInstvars:to: with:aClass.
!
addChangeRecordForClassRemove:oldName
+ "{ Pragma: +optSpace }"
+
"add a class-remove-record to the changes file"
self writingChangePerform:#addChangeRecordForClassRemove:to: with:oldName.
!
addChangeRecordForClassRename:oldName to:newName
+ "{ Pragma: +optSpace }"
+
"add a class-rename-record to the changes file"
self writingChangeDo:[:aStream |
@@ -1486,6 +1538,8 @@
!
addChangeRecordForMethod:aMethod
+ "{ Pragma: +optSpace }"
+
"add a method-change-record to the changes file"
self askIfUpdatingChanges ifTrue:[
@@ -1498,6 +1552,8 @@
!
addChangeRecordForMethodCategory:aMethod category:aString
+ "{ Pragma: +optSpace }"
+
"add a methodCategory-change-record to the changes file"
self askIfUpdatingChanges ifTrue:[
@@ -1513,6 +1569,8 @@
!
addChangeRecordForMethodPrivacy:aMethod
+ "{ Pragma: +optSpace }"
+
"add a method-privacy-change-record to the changes file"
self askIfUpdatingChanges ifTrue:[
@@ -1527,6 +1585,8 @@
!
addChangeRecordForPrimitiveDefinitions:aClass
+ "{ Pragma: +optSpace }"
+
"add a primitiveDefinitions-record to the changes file"
self askIfUpdatingChanges ifTrue:[
@@ -1538,6 +1598,8 @@
!
addChangeRecordForPrimitiveFunctions:aClass
+ "{ Pragma: +optSpace }"
+
"add a primitiveFunctions-record to the changes file"
self askIfUpdatingChanges ifTrue:[
@@ -1549,6 +1611,8 @@
!
addChangeRecordForPrimitiveVariables:aClass
+ "{ Pragma: +optSpace }"
+
"add a primitiveVariables-record to the changes file"
self askIfUpdatingChanges ifTrue:[
@@ -1560,12 +1624,16 @@
!
addChangeRecordForRemoveSelector:aSelector
+ "{ Pragma: +optSpace }"
+
"add a method-remove-record to the changes file"
self writingChangePerform:#addChangeRecordForRemoveSelector:to: with:aSelector.
!
addChangeRecordForRenameCategory:oldCategory to:newCategory
+ "{ Pragma: +optSpace }"
+
"add a category-rename record to the changes file"
self writingChangeDo:[:aStream |
@@ -1574,18 +1642,24 @@
!
addChangeRecordForSnapshot:aFileName
+ "{ Pragma: +optSpace }"
+
"add a snapshot-record to the changes file"
self addInfoRecord:('snapshot ' , aFileName)
!
addChangeRecordForSnapshot:aFileName to:aStream
+ "{ Pragma: +optSpace }"
+
"add a snapshot-record to aStream"
self addInfoRecord:('snapshot ' , aFileName) to:aStream
!
addChangeTimeStampTo:aStream
+ "{ Pragma: +optSpace }"
+
"a timestamp - prepended to any change, except infoRecords"
|info|
@@ -3048,6 +3122,8 @@
!Class methodsFor:'private changes management'!
addChangeRecordForChangeCategory:category to:aStream
+ "{ Pragma: +optSpace }"
+
"append a category change record to aStream"
self printClassNameOn:aStream.
@@ -3064,6 +3140,8 @@
!
addChangeRecordForClass:aClass to:aStream
+ "{ Pragma: +optSpace }"
+
"append a class-definition-record to aStream"
aClass isLoaded ifTrue:[
@@ -3079,6 +3157,8 @@
!
addChangeRecordForClassComment:aClass to:aStream
+ "{ Pragma: +optSpace }"
+
"append a class-comment-record to aStream"
aClass fileOutCommentOn:aStream.
@@ -3087,6 +3167,8 @@
!
addChangeRecordForClassInstvars:aClass to:aStream
+ "{ Pragma: +optSpace }"
+
"append a class-instvars-record to aStream"
aClass fileOutClassInstVarDefinitionOn:aStream.
@@ -3094,6 +3176,8 @@
!
addChangeRecordForClassRemove:oldName to:aStream
+ "{ Pragma: +optSpace }"
+
"append a class-remove-record to aStream"
aStream nextPutAll:('Smalltalk removeClass:' , oldName).
@@ -3101,6 +3185,8 @@
!
addChangeRecordForClassRename:oldName to:newName to:aStream
+ "{ Pragma: +optSpace }"
+
"append a class-rename-record to aStream"
aStream nextPutAll:('Smalltalk renameClass:' , oldName , ' to:''' , newName , '''').
@@ -3108,12 +3194,16 @@
!
addChangeRecordForMethod:aMethod to:aStream
+ "{ Pragma: +optSpace }"
+
"append a method-change-record to aStream"
self fileOutMethod:aMethod on:aStream.
!
addChangeRecordForMethodCategory:aMethod category:newCategory to:aStream
+ "{ Pragma: +optSpace }"
+
"append a methodCategory-change-record to aStream"
|selector|
@@ -3129,6 +3219,8 @@
!
addChangeRecordForMethodPrivacy:aMethod to:aStream
+ "{ Pragma: +optSpace }"
+
"append a method-privacy-change-record to aStream"
|selector|
@@ -3146,6 +3238,8 @@
!
addChangeRecordForPrimitiveDefinitions:aClass to:aStream
+ "{ Pragma: +optSpace }"
+
"append a primitiveDefinitions-record to aStream"
aStream nextPutAll:aClass name; nextPutAll:' primitiveDefinitions:'''; cr;
@@ -3154,6 +3248,8 @@
!
addChangeRecordForPrimitiveFunctions:aClass to:aStream
+ "{ Pragma: +optSpace }"
+
"append a primitiveFunctions-record to aStream"
aStream nextPutAll:aClass name; nextPutAll:' primitiveFunctions:'''; cr;
@@ -3162,6 +3258,8 @@
!
addChangeRecordForPrimitiveVariables:aClass to:aStream
+ "{ Pragma: +optSpace }"
+
"append a primitiveVariables-record to aStream"
aStream nextPutAll:aClass name; nextPutAll:' primitiveVariables:'''; cr;
@@ -3170,6 +3268,8 @@
!
addChangeRecordForRemoveSelector:aSelector to:aStream
+ "{ Pragma: +optSpace }"
+
"append a method-remove-record to aStream"
self printClassNameOn:aStream.
@@ -3180,6 +3280,8 @@
!
addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream
+ "{ Pragma: +optSpace }"
+
"append a category-rename record to aStream"
self printClassNameOn:aStream.
@@ -3189,6 +3291,8 @@
!
addInfoRecord:aMessage to:aStream
+ "{ Pragma: +optSpace }"
+
"append an info-record (snapshot, class fileOut etc.) to aStream"
aStream nextPutAll:('''---- ' , aMessage , ' ',
@@ -3199,6 +3303,8 @@
!
writingChangeDo:aBlock
+ "{ Pragma: +optSpace }"
+
"common helper to write a change record.
Opens the changefile and executes aBlock passing the stream
as argument. WriteErrors are cought and will lead to a warning.
@@ -3212,6 +3318,8 @@
!
writingChangePerform:aSelector with:anArgument
+ "{ Pragma: +optSpace }"
+
self writingChangeWithTimeStamp:true perform:aSelector with:anArgument
"Created: 28.10.1995 / 16:50:48 / cg"
@@ -3219,6 +3327,8 @@
!
writingChangeWithTimeStamp:doStampIt do:aBlock
+ "{ Pragma: +optSpace }"
+
"common helper to write a change record.
Opens the changefile and executes aBlock passing the stream
as argument. WriteErrors are cought and will lead to a warning.
@@ -3248,6 +3358,8 @@
!
writingChangeWithTimeStamp:stampIt perform:aSelector with:anArgument
+ "{ Pragma: +optSpace }"
+
self writingChangeWithTimeStamp:stampIt do:[:stream |
self perform:aSelector with:anArgument with:stream.
]
@@ -3288,6 +3400,8 @@
!
getPrimitiveSpecsAt:index
+ "{ Pragma: +optSpace }"
+
"return a primitiveSpecification component as string or nil"
|pos stream string|
@@ -3315,6 +3429,8 @@
!
setPrimitiveSpecsAt:index to:aString
+ "{ Pragma: +optSpace }"
+
"set a primitiveSpecification component to aString"
primitiveSpec isNil ifTrue:[
@@ -3326,6 +3442,8 @@
!Class methodsFor:'protocol printOut'!
printOutCategoryProtocol:aCategory on:aPrintStream
+ "{ Pragma: +optSpace }"
+
|dict any|
dict := self methodDictionary.
@@ -3356,6 +3474,8 @@
!
printOutMethodProtocol:aMethod on:aPrintStream
+ "{ Pragma: +optSpace }"
+
"given the source in aString, print the methods message specification
and any method comments - without source; used to generate documentation
pages"
@@ -3386,6 +3506,8 @@
!
printOutProtocolOn:aPrintStream
+ "{ Pragma: +optSpace }"
+
|collectionOfCategories|
self printOutDefinitionOn:aPrintStream.
@@ -3565,6 +3687,8 @@
!
packageSourceCodeInfo
+ "{ Pragma: +optSpace }"
+
"return the sourceCodeInfo, which defines the module and the subdirectory
in which the receiver class was built.
This info is extracted from the package id (which is added to stc-compiled classes).
@@ -3752,6 +3876,8 @@
!
revisionString
+ "{ Pragma: +optSpace }"
+
"return my revision string; that one is extracted from the
classes #version method. Either this is a method returning that string,
or its a comment-only method and the comment defines the version.
@@ -3821,6 +3947,8 @@
!
setPackageFromRevision
+ "{ Pragma: +optSpace }"
+
"set my package from the info found in the revisionString if present.
This is used to set some useful packageInfo after autoloading
(otherwise, autoloaded classes/methods would go into your current
@@ -4004,6 +4132,8 @@
!
updateVersionMethodFor:newRevisionString
+ "{ Pragma: +optSpace }"
+
"helper for the checkin procedure.
Update my #version method, to now return newRevisionString."
@@ -4125,6 +4255,6 @@
!Class class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.198 1996-10-27 11:37:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.199 1996-10-29 23:37:41 cg Exp $'
! !
Class initialize!