next up previous

12.16.1.16 Getting the List of Slots for a Class

This function groups the names of the explicitly defined slots of a class into a multifield variable. If the optional argument ìinheritî is given, inherited slots are also included. A multifield of length zero is returned if an error occurs.

Syntax

(class-slots <class-name> [inherit])

Example

CLIPS> (defclass A (is-a USER) (slot x))
CLIPS> (defclass B (is-a A) (slot y))
CLIPS> (class-slots B)
(y)
CLIPS> (class-slots B inherit)
(x y)
CLIPS>

12.16.1.17 Getting the List of Message-Handlers for a Class

This function groups the class names, message names and message types of the message-handlers attached direct to class into a multifield variable (implicit slot-accessors are not included). If the optional argument ìinheritî is given, inherited message-handlers are also included. A multifield of length zero is returned if an error occurs.

Syntax

(get-defmessage-handler-list <class-name> [inherit])

Example

CLIPS> (clear)
CLIPS> (defclass A (is-a USER))
CLIPS> (defmessage-handler A foo ())
CLIPS> (get-defmessage-handler-list A)
(A foo primary)
CLIPS> (get-defmessage-handler-list A inherit)
(USER init primary USER delete primary USER print primary USER direct-modify primary USER message-modify primary USER direct-duplicate primary USER message-duplicate primary A foo primary)
CLIPS>


next up previous