ClassDescr.st
changeset 1 a27a279701f8
child 3 24d81bf47225
equal deleted inserted replaced
0:aa2498ef6470 1:a27a279701f8
       
     1 "
       
     2  COPYRIGHT (c) 1993 by Claus Gittinger
       
     3               All Rights Reserved
       
     4 
       
     5  This software is furnished under a license and may be used
       
     6  only in accordance with the terms of that license and with the
       
     7  inclusion of the above copyright notice.   This software may not
       
     8  be provided or otherwise made available to, or used by, any
       
     9  other person.  No title to or ownership of the software is
       
    10  hereby transferred.
       
    11 "
       
    12 
       
    13 Behavior subclass:#ClassDescription
       
    14        instanceVariableNames:'name category instvars'
       
    15        classVariableNames:''
       
    16        poolDictionaries:''
       
    17        category:'Kernel-Classes'
       
    18 !
       
    19 
       
    20 ClassDescription comment:'
       
    21 
       
    22 COPYRIGHT (c) 1993 by Claus Gittinger
       
    23               All Rights Reserved
       
    24 
       
    25 this class has been added for ST-80 compatibility only.
       
    26 All class stuff used to be in Behavior and Class - but, to be
       
    27 able to file in some PD code, it became nescessary to add it.
       
    28 
       
    29 Instance variables:
       
    30 
       
    31 name            <String>        the classes name
       
    32 category        <String>        the classes category
       
    33 instvars        <String>        the names of the instance variables
       
    34 
       
    35 %W% %E%
       
    36 '!
       
    37 
       
    38 !ClassDescription methodsFor:'accessing'!
       
    39 
       
    40 instanceVariableString
       
    41     "return a string of the instance variable names"
       
    42 
       
    43     instvars isNil ifTrue:[^ ''].
       
    44     ^ instvars
       
    45 !
       
    46 
       
    47 instanceVariableString:aString
       
    48     "set the classes instvarnames string - notice, that this
       
    49      should be used only during class creation; the number of
       
    50      instance variables is determined by another instance 
       
    51      (see Behavior)."
       
    52 
       
    53     instvars := aString.
       
    54     self changed
       
    55 !
       
    56 
       
    57 setName:aString
       
    58     "set the classes name - be careful, it will be still
       
    59      in the Smalltalk dictionary - under another key"
       
    60 
       
    61     name := aString
       
    62 !
       
    63 
       
    64 name
       
    65     "return the name (aString) of the class"
       
    66 
       
    67     ^ name
       
    68 !
       
    69 
       
    70 category
       
    71     "return the category (aString) of the class"
       
    72 
       
    73     ^ category
       
    74 !
       
    75 
       
    76 category:aStringOrSymbol
       
    77     "set the category of the class to be the argument, aString"
       
    78 
       
    79     category := aStringOrSymbol asSymbol
       
    80 ! !