From: Carl Evans
Subject: CLOS question
Date: 
Message-ID: <2365@ucl-cs.uucp>
Is there a built in function/method that
returns a list of all the defined slots
for an object of a given class ?

Carl

From: Ethan Brown
Subject: Re: CLOS question
Date: 
Message-ID: <918@esosun.UUCP>
In article <····@ucl-cs.uucp>, ·······@cs (Carl Evans) writes:
>
>Is there a built in function/method that
>returns a list of all the defined slots
>for an object of a given class ?
>
>Carl

Here's a quick one I wrote for Harliquin's lispworks:

(defun make-slot-list (object)

  "Create a list of an object's slot names."

  (let ((slots (clos::class-instance-slots (class-of object))))
    (mapcar #'clos::slot-definition-name slots)
    )
  )

--
--Ethan Brown			
--Science Applications International Corp.
--Geophysics Division  (·····@esosun.css.gov)
--San Diego, CA 92121 (619) 458-2676
From: Barry Margolin
Subject: Re: CLOS question
Date: 
Message-ID: <kqqsioINNav7@early-bird.think.com>
In article <····@ucl-cs.uucp> ·······@cs.ucl.ac.uk (Carl Evans) writes:
>Is there a built in function/method that
>returns a list of all the defined slots
>for an object of a given class ?

If your CLOS implementation supports the MOP as described in "The Art of
the Metaobject Protocol", you can do this with the CLASS-SLOTS generic
function.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

······@think.com          {uunet,harvard}!think!barmar