THE 'Class' CLASS
Class THE CLASS OF ALL OBJECT CLASSES (including itself)
Messages:
CREATE A NEW INSTANCE OF A CLASS
:new
- returns the new class object
INITIALIZE A NEW CLASS
:isnew <ivars> [<cvars> [<super>]]
- <ivars> the list of instance variable symbol
- <cvars> the list of class variable symbols
- <super> the superclass (default is Object)
- returns the new class object
ADD A MESSAGE TO A CLASS
:answer <msg> <fargs> <code>
- <msg> the message symbol
- <fargs> the formal argument list (lambda list)
- <code> a list of executable expressions
- returns the object
GET THE SUPERCLASS OF THE OBJECT
:superclass
- returns the superclass (of the class)
(defined in classes.lsp)
GET THE LIST OF MESSAGES OF THE CLASS
:messages
- returns association list of message selectors and closures for messages.
(defined in classes.lsp)
READ REPRESENTATION
:storeon
- returns a list, that when executed will re-create the class and its methods.
(defined in classes.lsp)
When a new instance of a class is created by sending the message ':new' to an existing class, the message ':isnew' followed by whatever parameters were passed to the ':new' message is sent to the newly created object. Therefore, when a new class is created by sending ':new' to class 'Class' the message ':isnew' is sent to Class automatically. To create a new class, a function of the following format is used:
(setq <newclassname> (send Class :new <ivars> [<cvars> [<super>]]))
When a new class is created, an optional parameter may be specified indicating the superclass of the new class. If this parameter is omitted, the new class will be a subclass of 'Object'. A class inherits all instance variables, and methods from its super-class. Only class variables of a method's class are accessable.
XLISP-PLUS - Version 2.1g - Tom Almy
tom.almy@tek.com - 18 JUL 94
Generated with WebMaker