aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core-units/unit.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core-units/unit.lisp')
-rw-r--r--src/core-units/unit.lisp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/core-units/unit.lisp b/src/core-units/unit.lisp
deleted file mode 100644
index 20e05e2..0000000
--- a/src/core-units/unit.lisp
+++ /dev/null
@@ -1,30 +0,0 @@
-;;;; units/unit.lisp
-
-(in-package #:wheelwork)
-
-(defclass/std unit ()
- ((cached-application :a)
- (container :with :a)))
-
-(defmethod (setf closer-mop:slot-value-using-class) :after
- (newval class (unit unit) slot)
- (case (closer-mop:slot-definition-name slot)
- (container
- (setf (cached-application unit) nil))))
-
-
-(defun app-of-unit (unit)
- "Returns the APPLICATION instance, if any, of which this UNIT is a
-part. NIL indicates that the unit has not been added to any container
-in this application."
- (or (cached-application unit)
- (setf (cached-application unit)
- (labels ((rec (u)
- (when-let (c (unit-container u))
- (etypecase c
- (application c)
- (unit (rec c))
- (null nil)))))
- (rec unit)))))
-
-