# HG changeset patch # User Jamie Forth # Date 1298546598 0 # Node ID 25b6b52eb7705f48f25e4f16ea2a9bf1f355e749 # Parent 70969555ca0785d64b78d65862067f4c8f8218e3 generalise constituent so not required to be anchored diff -r 70969555ca07 -r 25b6b52eb770 base/classes.lisp --- 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: diff -r 70969555ca07 -r 25b6b52eb770 base/package.lisp --- a/base/package.lisp Thu Feb 24 11:23:18 2011 +0000 +++ b/base/package.lisp Thu Feb 24 11:23:18 2011 +0000 @@ -2,13 +2,15 @@ (:use #:common-lisp) (:export #:amuse-object #:constituent + #:anchored-constituent + #:standard-constituent + #:standard-anchored-constituent + #:time-ordered-constituent + #:time-ordered-anchored-constituent + #:standard-time-ordered-constituent + #:standard-time-ordered-anchored-constituent #:composition - #:standard-constituent #:standard-composition - #:floating-constituent - #:standard-floating-constituent - #:time-ordered-floating-constituent - #:standard-time-ordered-floating-constituent #:monody #:standard-monody #:identifier