changeset 124:b0a1760ab0dd

base/: amuse-object as top-level class darcs-hash:20070730133602-c0ce4-2f8758c81a98323e1dca0c6b482e5cdef5c9d3d9.gz
author Marcus Pearce <m.pearce@gold.ac.uk>
date Mon, 30 Jul 2007 14:36:02 +0100
parents f57ab0e109fb
children c179481a7bd0
files base/classes.lisp base/package.lisp
diffstat 2 files changed, 23 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/base/classes.lisp	Mon Jul 30 14:38:25 2007 +0100
+++ b/base/classes.lisp	Mon Jul 30 14:36:02 2007 +0100
@@ -1,32 +1,28 @@
 (cl:in-package #:amuse) 
 
-;; collections of more than one event
+;; top-level amuse object 
 
-(defclass constituent (anchored-period) ()
-  (:documentation "Base class for `constituents'"))
-(defclass time-ordered-constituent (constituent list-slot-sequence) ()
-  (:documentation "Class for ordered sequence. Won't work out of the box if the
-  lisp implementation doesn't support extensible sequences."))
-(defclass composition (time-ordered-constituent) ()
-  (:documentation "Base class for complete compositions."))
-(defclass monody (composition) ()
-  (:documentation "Simple class to indicate suitability for
-  monody-requiring processes"))
+(defclass constituent (anchored-period) ())
+(defclass time-ordered-constituent (constituent list-slot-sequence)
+  ;; this won't work if lisp implementation doesn't support extensible
+  ;; sequences.
+  ())
+(defclass composition (time-ordered-constituent) ())
+(defclass monody (composition) ())
 
 ;; types of information-specifiers
 
-(defclass identifier () ()
-  (:documentation "Must be subclassed. Allows specification of compositions"))
+(defclass identifier () ()) ;; for composition specification
 (defclass moment-designator () ()
   (:documentation "Object indicating a point in time"))
-(defclass period-designator () ()
+(defclass period-designator (amuse-object) ()
   (:documentation "Object indicating a region of time"))
 (defclass anchored-period-designator (moment-designator period-designator) ()
   (:documentation "Object indicating a region of time starting at
   a specific point in time"))
-(defclass pitch-designator () ()
+(defclass pitch-designator (amuse-object) ()
   (:documentation "Object indicating some sort of pitch"))
-(defclass pitch-interval-designator () ()
+(defclass pitch-interval-designator (amuse-object) ()
   (:documentation "Object indicating a distance in pitch space"))
 
 ;; time-related classes
@@ -119,3 +115,12 @@
   accel and rit in symbolic encoding will need other structures,
   as will textual tempo markings."))
    
+;; collections of more than one event
+
+(defclass constituent (anchored-period) ())
+(defclass time-ordered-constituent (constituent list-slot-sequence)
+  ;; this won't work if lisp implementation doesn't support extensible
+  ;; sequences.
+  ())
+(defclass composition (time-ordered-constituent) ())
+(defclass monody (composition) ())
--- a/base/package.lisp	Mon Jul 30 14:38:25 2007 +0100
+++ b/base/package.lisp	Mon Jul 30 14:36:02 2007 +0100
@@ -1,6 +1,7 @@
 (cl:defpackage #:amuse
   (:use #:common-lisp)
-  (:export #:constituent
+  (:export #:amuse-object
+           #:constituent
 	   #:composition
 	   #:monody
 	   #:identifier