ClassDescription.st
author claus
Fri, 16 Jul 1993 11:39:45 +0200
changeset 1 a27a279701f8
child 3 24d81bf47225
permissions -rw-r--r--
Initial revision

"
 COPYRIGHT (c) 1993 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.
"

Behavior subclass:#ClassDescription
       instanceVariableNames:'name category instvars'
       classVariableNames:''
       poolDictionaries:''
       category:'Kernel-Classes'
!

ClassDescription comment:'

COPYRIGHT (c) 1993 by Claus Gittinger
              All Rights Reserved

this class has been added for ST-80 compatibility only.
All class stuff used to be in Behavior and Class - but, to be
able to file in some PD code, it became nescessary to add it.

Instance variables:

name            <String>        the classes name
category        <String>        the classes category
instvars        <String>        the names of the instance variables

%W% %E%
'!

!ClassDescription methodsFor:'accessing'!

instanceVariableString
    "return a string of the instance variable names"

    instvars isNil ifTrue:[^ ''].
    ^ instvars
!

instanceVariableString:aString
    "set the classes instvarnames string - notice, that this
     should be used only during class creation; the number of
     instance variables is determined by another instance 
     (see Behavior)."

    instvars := aString.
    self changed
!

setName:aString
    "set the classes name - be careful, it will be still
     in the Smalltalk dictionary - under another key"

    name := aString
!

name
    "return the name (aString) of the class"

    ^ name
!

category
    "return the category (aString) of the class"

    ^ category
!

category:aStringOrSymbol
    "set the category of the class to be the argument, aString"

    category := aStringOrSymbol asSymbol
! !