added namespace query
authorClaus Gittinger <cg@exept.de>
Thu, 07 Nov 1996 13:52:48 +0100
changeset 1920 6178e0048794
parent 1919 cb189a5dcac8
child 1921 bfaa8f683985
added namespace query
Metaclass.st
PMetaclass.st
PrivateMetaclass.st
--- a/Metaclass.st	Thu Nov 07 13:51:20 1996 +0100
+++ b/Metaclass.st	Thu Nov 07 13:52:48 1996 +0100
@@ -827,7 +827,6 @@
         commentString notNil ifTrue:[
             newClass comment:commentString
         ].
-
         namespace notNil ifTrue:[
             thisIsPrivate ifTrue:[
                 namespace privateClassesAt:classSymbol put:newClass.
@@ -850,7 +849,6 @@
         ^ newClass
     ].
 
-
     "
      here comes the hard part - we are actually changing the
      definition of an existing class ....
@@ -1255,7 +1253,7 @@
 
     "Created: 26.5.1996 / 11:55:26 / cg"
     "Modified: 18.6.1996 / 14:19:39 / stefan"
-    "Modified: 7.11.1996 / 12:57:09 / cg"
+    "Modified: 7.11.1996 / 13:48:49 / cg"
 !
 
 name:newName inEnvironment:aSystemDictionary
@@ -1592,6 +1590,18 @@
     ^ true
 !
 
+nameSpace
+    "return the nameSpace I am contained in.
+     Due to the implementation of nameSpaces (as classVariables),
+     a class can only be contained in one nameSpace (which is the desired)"
+
+    "/ this information is in the class
+
+    ^ myClass nameSpace
+
+    "Created: 7.11.1996 / 13:18:52 / cg"
+!
+
 owningClass
     "return nil here - regular metaclasses are never private"
 
@@ -1617,5 +1627,5 @@
 !Metaclass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.87 1996-11-07 11:58:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.88 1996-11-07 12:52:27 cg Exp $'
 ! !
--- a/PMetaclass.st	Thu Nov 07 13:51:20 1996 +0100
+++ b/PMetaclass.st	Thu Nov 07 13:52:48 1996 +0100
@@ -31,6 +31,15 @@
 
 !PrivateMetaclass methodsFor:'accessing'!
 
+nameSpace
+    "return the nameSpace I am contained in.
+     For private classes, this is always nil"
+
+    ^ nil
+
+    "Created: 7.11.1996 / 13:19:18 / cg"
+!
+
 owningClass
     "return my owningClass"
 
@@ -66,5 +75,5 @@
 !PrivateMetaclass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/PMetaclass.st,v 1.8 1996-10-22 22:08:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/PMetaclass.st,v 1.9 1996-11-07 12:52:48 cg Exp $'
 ! !
--- a/PrivateMetaclass.st	Thu Nov 07 13:51:20 1996 +0100
+++ b/PrivateMetaclass.st	Thu Nov 07 13:52:48 1996 +0100
@@ -31,6 +31,15 @@
 
 !PrivateMetaclass methodsFor:'accessing'!
 
+nameSpace
+    "return the nameSpace I am contained in.
+     For private classes, this is always nil"
+
+    ^ nil
+
+    "Created: 7.11.1996 / 13:19:18 / cg"
+!
+
 owningClass
     "return my owningClass"
 
@@ -66,5 +75,5 @@
 !PrivateMetaclass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/PrivateMetaclass.st,v 1.8 1996-10-22 22:08:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/PrivateMetaclass.st,v 1.9 1996-11-07 12:52:48 cg Exp $'
 ! !