LISP:从类实例获取所有插槽名称 [英] LISP: Get all slot names from an class instance

查看:105
本文介绍了LISP:从类实例获取所有插槽名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用类的属性(其插槽值)创建一个窗口。

I need to make a window with the properties of a class (its slot-values).

这就像 describe 函数。

我的问题是:如何获取该类的所有插槽名称?

My question is: How do I get all the slots-name for that class?

我什么都找不到,只有 describe 函数。

I wasn't able to find anything about it, only the describe function.

推荐答案

怎么样

(mapcar #'slot-definition-name (class-slots class))

这篇关于LISP:从类实例获取所有插槽名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆