NameSpace.st
author Claus Gittinger <cg@exept.de>
Sun, 27 Oct 1996 15:33:55 +0100
changeset 1827 fa0017393e3b
parent 1816 b063c5b47433
child 1828 92e8ede212e7
permissions -rw-r--r--
checkin from browser

"
 COPYRIGHT (c) 1996 by Claus Gittinger
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"


Object subclass:#Namespace
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Classes'
!

!Namespace class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1996 by Claus Gittinger
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

!

documentation
"
    A Namespace is actually a dummy class, providing a home
    for its private classes.

    [author:]
        Claus Gittinger

    [see also:]
        Behavior ClassDescription Class Metaclass
        PrivateMetaclass
"

! !

!Namespace methodsFor:'accessing'!

at:classNameSymbol
    ^ self class privateClassesAt:classNameSymbol
!

at:classNameSymbol ifAbsent:exceptionBlock
    |cls|

    cls := self class privateClassesAt:classNameSymbol.
    cls isNil ifTrue:[
        ^ exceptionBlock value
    ].
    ^ cls
!

at:classNameSymbol put:aClass
    ^ self class privateClassesAt:classNameSymbol put:aClass
! !

!Namespace methodsFor:'enumerating'!

allBehaviorsDo:aBlock
    self class privateClassesDo:aBlock

    "Created: 26.10.1996 / 12:29:01 / cg"
! !

!Namespace methodsFor:'queries'!

isNamespace
    ^ true

    "Created: 26.10.1996 / 11:13:36 / cg"
! !

!Namespace class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.2 1996-10-27 14:33:55 cg Exp $'
! !