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

def-kb-class Macro

Summary

Defines a class for use in the object base.

Package

kw

Signature

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

Arguments
class-name
A symbol.
superclass-list
A list of symbols.
slot-descriptions
A list of defclass slot descriptions.
options
defclass options.
Values
class
The named class object.
Description

The macro def-kb-class defines a new CLOS class name class-name, as defclass does. However, if none of the superclasses in superclass-list is a subclass of standard-kb-object, then standard-kb-object is added to the list of superclasses.

slot-descriptions and options are used as in the standard defclass macro.

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

def-named-kb-class
def-kb-struct


KnowledgeWorks and Prolog User Guide (Unix version) - 01 Dec 2021 19:35:49