ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   4 Types and Classes   4.3 Classes

4.3.2 Defining Classes

The macro defclass is used to define a new named class.

The definition of a class includes:

The slot options and class options of the defclass form provide mechanisms for the following:

  • Supplying a default initial value form for a given slot.

  • Requesting that methods for generic functions be automatically generated for reading or writing slots.

  • Controlling whether a given slot is shared by all instances of the class or whether each instance of the class has its own slot.

  • Supplying a set of initialization arguments and initialization argument defaults to be used in instance creation.

  • Indicating that the metaclass is to be other than the default. The :metaclass option is reserved for future use; an implementation can be extended to make use of the :metaclass option.

  • Indicating the expected type for the value stored in the slot.

  • Indicating the documentation string for the slot.


Home Previous Up Next Table of Contents Index
© Franz Inc. 1998-2019 - File last updated 02-07-2019