National Institute of Advanced Industrial Science and Technology (AIST) This page is a page of the former research institute. We stopped updating on March 31.2001.
E-mail to webmaster (Japanese) E-mail to webmaster (English)
next up previous contents index
Next: Arithmetic Functions Up: Object Oriented Programming Previous: Instance Management

Basic Classes

  object [class]

 :super B<>

:slots

  :prin1 &optional stream &rest mesg [method]   :slots [method]   propertied-object [class]
 :super B<>object

:slots plist

  :plist &optional plist [method]   :get indicator [method]   :put indicator value [method]
  • associates value to indicator in the plist.
  :remprop indicator [method]
  • removes indicator and value pair from the plist. Further attempt to :get the value returns nil.
  :name &optional name [method]
  • defines and retrieves the :name property in the plist. This property is used for printing.
  :prin1 &optional stream &rest mesg [method]
  • prints the object in the re-readable form. If the object has :name property, it is printed after the address of the object.
  metaclass [class]
 :super B<>propertied-object

:slots name super cix vars types forwards methods

  • Metaclass defines classes. Classes that have own class variables should be defined with metaclass as their superclass.
  :new [method]
  • creates an instance of this class and returns it after filling all the slots with NIL.
  :super [method]
  • returns the super class object of this class. You cannot alter superclass once defclassed.
  :methods [method]
  • returns a list of all the methods defined in this class. The list is composed of lists each of which describes the name of the method, parameters, and body.
  :method name [method]
  • returns the method definition associated with name. If not found, NIL is returned.
  :method-names subname [method]
  • returns a list of all the method names each of which contains subname in its method name. Methods are searched only in this class.
  :all-methods [method]
  • returns a list of all methods that are defined in this class and its all the super classes. In other words, an instance of this class can execute each of these methods.
  :all-method-names subname [method]
  • returns a list of all the method names each of which matches with subname. The search is made from this class up to object.
  :slots [method]
  • returns the slot-name vector.
  :name [method]
  • returns the name symbol of this class.
  :cid [method]
  • returns an integer that is assigned to every instance of this class to identify its class. This is an index to the system-internal class table, and is changed when a new subclass is defined under this class.
  :subclasses [method]
  • returns a list of the direct subclass of this class.
  :hierarchy [method]
  • returns a list of all the subclasses defined under this class. You can also call the class-hierarchy function to get a comprehensive listing of all the class hierarchy.
  find-method object selector [function]
  • searches for the method identified by selector in object's class and its super classes. This function is useful when object's class is uncertain and you want to know whether the object can handle the message without causing nomethod error.


next up previous contents index
Next: Arithmetic Functions Up: Object Oriented Programming Previous: Instance Management

Hirofumi Nakagaki
Fri Mar 22 12:46:38 JST 1996