summaryrefslogtreecommitdiff
path: root/definition-macros.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'definition-macros.lisp')
-rw-r--r--definition-macros.lisp19
1 files changed, 19 insertions, 0 deletions
diff --git a/definition-macros.lisp b/definition-macros.lisp
new file mode 100644
index 0000000..6ecda6d
--- /dev/null
+++ b/definition-macros.lisp
@@ -0,0 +1,19 @@
+;;;; definition-macros.lisp
+
+(in-package :vampire)
+
+(defmacro defclass/bknr (name supers slotdefs &rest options)
+ "Defines a class using defclass/std syntax. Ensures that the class
+ is a sublcas of STORE-OBJECT with metaclass PERSISTENT-CLASS."
+ (let* ((include-store-object-p
+ (notany (lambda (c) (closer-mop:subclassp c 'store-object))
+ supers))
+ (supers
+ (if include-store-object-p
+ `(store-object ,@supers)
+ supers)))
+ `(eval-when (:compile-toplevel)
+ (defclass/std ,name ,supers
+ ,slotdefs
+ (:metaclass persistent-class)
+ ,@options))))