All Manuals > KnowledgeWorks and Prolog User Guide > 7 Reference Guide

NextPrevUpTopContentsIndex

def-named-kb-class

Macro
Summary

Defines a class of named objects for use in the object base.

Signature

def-named-kb-class class-name superclass-list slot-descriptions &rest options => class

Arguments

The arguments are identical to those for defclass.

Values

class

the named class object

Description

Defines a new CLOS class as defclass does. However, if none of the given superclasses is a subclass of named-kb-object, then named-kb-object is added to the list of superclasses. The class inherits a name slot kb-name of which the initialization form (:initform) generates a symbol from the class name using (gentemp class-name).

Examples
(def-named-kb-class vehicle ()
  ((driver :initarg :driver)))
(def-named-kb-class truck (vehicle)
  ((load :accessor truck-load)))
See also

def-kb-class
def-kb-struct
get-kb-object
kb-name
named-kb-object


KnowledgeWorks and Prolog User Guide (Macintosh version) - 24 Mar 2017

NextPrevUpTopContentsIndex