/ src / libsmoke /
src/libsmoke/class.lisp
1 (in-package #:smoke)
2
3 (defcenum smoke-class-flags
4 "Class properties"
5 (:constructor #x01)
6 (:copy-constructor #x02)
7 (:virtual-destructor #x04)
8 (:namespace #x08)
9 (:undefined #x10))
10
11 (defcstruct smoke-class
12 "Describe a class"
13 (name :string)
14 (external cxx-bool)
15 (parents smoke-index)
16 (class-function :pointer)
17 (enum-function :pointer)
18 (flags :unsigned-short)
19 (size :unsigned-int))
20
21 (defcfun (smoke-find-class "cl_smoke_find_class") :void
22 (m :pointer smoke-module-index)
23 (name :string))
24
25 (declaim (inline smoke-class-id))
26 (defcfun (smoke-class-id "cl_smoke_class_id") smoke-index
27 (smoke :pointer)
28 (name :string))
29
30 (defcfun (smoke-get-class "cl_smoke_get_class") (:pointer smoke-class)
31 (smoke :pointer)
32 (class smoke-index))
33
34 (defcfun (smoke-is-derived-from "cl_smoke_is_derived_from") :boolean
35 (smoke :pointer)
36 (class smoke-index)
37 (smoke-base :pointer)
38 (base-class smoke-index))
39
40 (defcfun (smoke-cast "cl_smoke_cast") :pointer
41 (smoke :pointer)
42 (object :pointer)
43 (from smoke-index)
44 (to smoke-index))