Mercurial > hg > amuse
diff base/classes.lisp @ 246:25b6b52eb770
generalise constituent so not required to be anchored
author | Jamie Forth <j.forth@gold.ac.uk> |
---|---|
date | Thu, 24 Feb 2011 11:23:18 +0000 |
parents | 76a695fe294f |
children | e5ff7d53f084 |
line wrap: on
line diff
--- a/base/classes.lisp Thu Feb 24 11:23:18 2011 +0000 +++ b/base/classes.lisp Thu Feb 24 11:23:18 2011 +0000 @@ -214,11 +214,19 @@ ;;; Constituents: collections of more than one event ;;;===================================================================== -(defclass constituent (anchored-period) () +(defclass constituent (period) () (:documentation "Base class for constituents")) -(defclass standard-constituent (constituent standard-anchored-period) () - (:documentation "Base class for constituents using standard +(defclass anchored-constituent (anchored-period) () + (:documentation "Base class for anchored constituents")) + +(defclass standard-constituent (constituent standard-period) () + (:documentation "Base class for constituents using standard time + representation")) + +(defclass standard-anchored-constituent (anchored-constituent + standard-anchored-period) () + (:documentation "Base class for anchored-constituents using standard time representation")) (defclass time-ordered-constituent (constituent list-slot-sequence) @@ -226,19 +234,33 @@ ;; sequences. ()) -(defclass standard-time-ordered-constituent (time-ordered-constituent - standard-constituent) +(defclass time-ordered-anchored-constituent (anchored-constituent + list-slot-sequence) ;; this won't work if lisp implementation doesn't support extensible ;; sequences. ()) -(defclass composition (time-ordered-constituent) () - (:documentation "Base class for compositions")) +(defclass standard-time-ordered-constituent + (time-ordered-constituent standard-constituent) + ;; this won't work if lisp implementation doesn't support extensible + ;; sequences. + ()) -(defclass standard-composition (composition - standard-time-ordered-constituent) () - (:documentation "Base class for compositions using standard - time representation")) +(defclass standard-time-ordered-anchored-constituent + (time-ordered-anchored-constituent standard-anchored-constituent) + ;; this won't work if lisp implementation doesn't support extensible + ;; sequences. + ()) + +(defclass composition (time-ordered-anchored-constituent) () + (:documentation "Base class for compositions. Compositions are + assumed to be anchord constituents.")) + +(defclass standard-composition + (composition standard-time-ordered-anchored-constituent) () + (:documentation "Base class for compositions using standard time + representation. Standard compositions are assumed to be + anchored.")) (defclass monody (composition) () (:documentation "Class for indicating suitability for analysis @@ -246,28 +268,6 @@ (defclass standard-monody (monody standard-composition) ()) -;; Floating Constituents - -(defclass floating-constituent (period) () - (:documentation "Base class for non-anchored constituents")) - -(defclass standard-floating-constituent (floating-constituent - standard-period) () - (:documentation "Base class for floating constituents using standard - time representation")) - -(defclass time-ordered-floating-constituent (floating-constituent - list-slot-sequence) - ;; this won't work if lisp implementation doesn't support extensible - ;; sequences. - ()) - -(defclass standard-time-ordered-floating-constituent - (time-ordered-floating-constituent standard-floating-constituent) - ;; this won't work if lisp implementation doesn't support extensible - ;; sequences. - ()) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Experimental: