moved subclass creation methods up to ClassDescription
authorClaus Gittinger <cg@exept.de>
Sat, 12 Oct 1996 20:19:30 +0200
changeset 1714 35b39ee74145
parent 1713 958bcefc53b3
child 1715 8bd2a2d8fbb4
moved subclass creation methods up to ClassDescription
Class.st
--- a/Class.st	Sat Oct 12 18:32:50 1996 +0200
+++ b/Class.st	Sat Oct 12 20:19:30 1996 +0200
@@ -11,8 +11,7 @@
 "
 
 ClassDescription subclass:#Class
-	instanceVariableNames:'classvars comment subclasses classFilename package revision
-		hook'
+	instanceVariableNames:'classvars comment subclasses classFilename package revision hook'
 	classVariableNames:'UpdatingChanges LockChangesFile FileOutErrorSignal
 		CatchMethodRedefinitions MethodRedefinitionSignal
 		UpdateChangeFileQuerySignal TryLocalSourceFirst
@@ -3757,323 +3756,9 @@
     "Modified: 7.12.1995 / 23:34:43 / cg"
 ! !
 
-!Class methodsFor:'subclass creation'!
-
-subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver).
-     The subclass will have indexed variables if the receiving-class has."
-
-    self isVariable ifFalse:[
-        ^ self class
-            name:nameSymbol
-            inEnvironment:(Smalltalk currentNameSpace)
-            subclassOf:self
-            instanceVariableNames:instVarNameString
-            variable:false
-            words:true
-            pointers:true
-            classVariableNames:classVarString
-            poolDictionaries:pool
-            category:cat
-            comment:nil
-            changed:true 
-    ].
-    self isBytes ifTrue:[
-        ^ self
-            variableByteSubclass:nameSymbol
-            instanceVariableNames:instVarNameString
-            classVariableNames:classVarString
-            poolDictionaries:pool
-            category:cat
-    ].
-    self isLongs ifTrue:[
-        ^ self
-            variableLongSubclass:nameSymbol
-            instanceVariableNames:instVarNameString
-            classVariableNames:classVarString
-            poolDictionaries:pool
-            category:cat
-    ].
-    self isFloats ifTrue:[
-        ^ self
-            variableFloatSubclass:nameSymbol
-            instanceVariableNames:instVarNameString
-            classVariableNames:classVarString
-            poolDictionaries:pool
-            category:cat
-    ].
-    self isDoubles ifTrue:[
-        ^ self
-            variableDoubleSubclass:nameSymbol
-            instanceVariableNames:instVarNameString
-            classVariableNames:classVarString
-            poolDictionaries:pool
-            category:cat
-    ].
-    self isWords ifTrue:[
-        ^ self
-            variableWordSubclass:nameSymbol
-            instanceVariableNames:instVarNameString
-            classVariableNames:classVarString
-            poolDictionaries:pool
-            category:cat
-    ].
-    self isSignedWords ifTrue:[
-        ^ self
-            variableSignedWordSubclass:nameSymbol
-            instanceVariableNames:instVarNameString
-            classVariableNames:classVarString
-            poolDictionaries:pool
-            category:cat
-    ].
-    self isSignedLongs ifTrue:[
-        ^ self
-            variableSignedLongSubclass:nameSymbol
-            instanceVariableNames:instVarNameString
-            classVariableNames:classVarString
-            poolDictionaries:pool
-            category:cat
-    ].
-
-    ^ self
-        variableSubclass:nameSymbol
-        instanceVariableNames:instVarNameString
-        classVariableNames:classVarString
-        poolDictionaries:pool
-        category:cat
-
-    "Modified: 18.9.1996 / 15:22:08 / cg"
-!
-
-variableByteSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable byte-sized nonpointer variables"
-
-    self isVariable ifTrue:[
-        self isBytes ifFalse:[
-            ^ self error:
-                'cannot make a variable byte subclass of a variable non-byte class'
-        ].
-    ].
-
-    ^ self class
-        name:nameSymbol
-        inEnvironment:(Smalltalk currentNameSpace)
-        subclassOf:self
-        instanceVariableNames:instVarNameString
-        variable:true
-        words:false
-        pointers:false
-        classVariableNames:classVarString
-        poolDictionaries:pool
-        category:cat
-        comment:nil
-        changed:true
-
-    "Modified: 18.9.1996 / 15:24:54 / cg"
-!
-
-variableDoubleSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable double-sized nonpointer variables"
-
-    self isVariable ifTrue:[
-        self isDoubles ifFalse:[
-            ^ self error:
-                'cannot make a variable double subclass of a variable non-double class'
-        ].
-    ].
-
-    ^ self class
-        name:nameSymbol
-        inEnvironment:(Smalltalk currentNameSpace)
-        subclassOf:self
-        instanceVariableNames:instVarNameString
-        variable:#double 
-        words:false
-        pointers:false
-        classVariableNames:classVarString
-        poolDictionaries:pool
-        category:cat
-        comment:nil
-        changed:true
-
-    "Modified: 18.9.1996 / 15:25:03 / cg"
-!
-
-variableFloatSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable float-sized nonpointer variables"
-
-    self isVariable ifTrue:[
-        self isFloats ifFalse:[
-            ^ self error:
-                'cannot make a variable float subclass of a variable non-float class'
-        ].
-    ].
-
-    ^ self class
-        name:nameSymbol
-        inEnvironment:(Smalltalk currentNameSpace)
-        subclassOf:self
-        instanceVariableNames:instVarNameString
-        variable:#float 
-        words:false
-        pointers:false
-        classVariableNames:classVarString
-        poolDictionaries:pool
-        category:cat
-        comment:nil
-        changed:true
-
-    "Modified: 18.9.1996 / 15:25:14 / cg"
-!
-
-variableLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable long-sized nonpointer variables"
-
-    self isVariable ifTrue:[
-        self isLongs ifFalse:[
-            ^ self error:
-                'cannot make a variable long subclass of a variable non-long class'
-        ].
-    ].
-
-    ^ self class
-        name:nameSymbol
-        inEnvironment:(Smalltalk currentNameSpace)
-        subclassOf:self
-        instanceVariableNames:instVarNameString
-        variable:#long 
-        words:false
-        pointers:false
-        classVariableNames:classVarString
-        poolDictionaries:pool
-        category:cat
-        comment:nil
-        changed:true
-
-    "Modified: 18.9.1996 / 15:25:22 / cg"
-!
-
-variableSignedLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable signed long-sized nonpointer variables"
-
-    self isVariable ifTrue:[
-        self isSignedLongs ifFalse:[
-            ^ self error:
-                'cannot make a variable signed long subclass of a variable non-long class'
-        ].
-    ].
-
-    ^ self class
-        name:nameSymbol
-        inEnvironment:(Smalltalk currentNameSpace)
-        subclassOf:self
-        instanceVariableNames:instVarNameString
-        variable:#signedLong
-        words:false
-        pointers:false
-        classVariableNames:classVarString
-        poolDictionaries:pool
-        category:cat
-        comment:nil
-        changed:true
-
-    "Modified: 18.9.1996 / 15:25:31 / cg"
-!
-
-variableSignedWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable word-sized signed nonpointer variables"
-
-    self isVariable ifTrue:[
-        self isSignedWords ifFalse:[
-            ^ self error:
-                'cannot make a variable signed word subclass of a variable non-word class'
-        ].
-    ].
-
-    ^ self class
-        name:nameSymbol
-        inEnvironment:(Smalltalk currentNameSpace)
-        subclassOf:self
-        instanceVariableNames:instVarNameString
-        variable:#signedWord
-        words:false
-        pointers:false
-        classVariableNames:classVarString
-        poolDictionaries:pool
-        category:cat
-        comment:nil
-        changed:true
-
-    "Modified: 18.9.1996 / 15:25:40 / cg"
-!
-
-variableSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable pointer variables"
-
-    self isVariable ifTrue:[
-        self isPointers ifFalse:[
-            ^ self error:
-                'cannot make a variable pointer subclass of a variable non-pointer class'
-        ]
-    ].
-
-    ^ self class
-        name:nameSymbol
-        inEnvironment:(Smalltalk currentNameSpace)
-        subclassOf:self
-        instanceVariableNames:instVarNameString
-        variable:true
-        words:false
-        pointers:true
-        classVariableNames:classVarString
-        poolDictionaries:pool
-        category:cat
-        comment:nil
-        changed:true
-
-    "Modified: 18.9.1996 / 15:25:46 / cg"
-!
-
-variableWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
-    "create a new class as a subclass of an existing class (the receiver) 
-     in which the subclass has indexable word-sized nonpointer variables"
-
-    self isVariable ifTrue:[
-        self isWords ifFalse:[
-            ^ self error:
-                'cannot make a variable word subclass of a variable non-word class'
-        ].
-    ].
-
-    ^ self class
-        name:nameSymbol
-        inEnvironment:(Smalltalk currentNameSpace)
-        subclassOf:self
-        instanceVariableNames:instVarNameString
-        variable:true
-        words:true
-        pointers:false
-        classVariableNames:classVarString
-        poolDictionaries:pool
-        category:cat
-        comment:nil
-        changed:true
-
-    "Modified: 18.9.1996 / 15:25:53 / cg"
-! !
-
 !Class  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.176 1996-10-12 16:25:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.177 1996-10-12 18:19:30 cg Exp $'
 ! !
 Class initialize!