Mercurial > hg > amuse
view implementations/tabcode/classes.lisp @ 193:c18f795f4463
rollback the amuse.asd generics/classes dependency fix
Ignore-this: be4e0351d31f24f5348cc8dc434477dc
Fix properly this time by moving the specialized get-constituents method from generics to methods.
rolling back:
Wed Jan 23 15:55:34 GMT 2008 Jamie Forth <j.forth@gold.ac.uk>
* Fixed amuse.asd dependency - generics depends on classes.
M ./amuse.asd -2 +2
darcs-hash:20090524164116-16a00-2b561eab1a5829a251eb5e9b40357945af13e6a6.gz
author | j.forth <j.forth@gold.ac.uk> |
---|---|
date | Sun, 24 May 2009 17:41:16 +0100 |
parents | 5b2d0e5a99f1 |
children |
line wrap: on
line source
(cl:in-package #:amuse-tabcode) (defclass tabcode-object (amuse-object) ()) (defclass tabcode-composition (standard-composition tabcode-object) ((bars :initarg :bars :reader tabcode-bars) (rules :initarg :rules :reader tabcode-rules) (metres :initarg :metres :reader metrical-signs))) (defclass tabcode-pitched-event (standard-chromatic-pitched-event tabcode-object) ((course :initarg :course :reader course) (fret :initarg :fret :reader fret) (word :initarg :word :reader word) (bar :initarg :bar :reader in-bar))) (defclass tabcode-time-signature (standard-anchored-period tabcode-object) ((word :initarg :word :reader word) (ul)(ll)(ur)(lr))) (defgeneric ul (timesig)) (defgeneric ll (timesig)) (defgeneric ur (timesig)) (defgeneric lr (timesig)) (defmethod ul ((timesig tabcode-time-signature)) (unless (slot-boundp timesig 'ul) (let ((ul (tabcode::ul (word timesig)))) (setf (slot-value timesig 'ul) (when ul (or (parse-integer ul :junk-allowed t) ul))))) (slot-value timesig 'ul)) (defmethod ll ((timesig tabcode-time-signature)) (unless (slot-boundp timesig 'll) (let ((ll (tabcode::ll (word timesig)))) (setf (slot-value timesig 'll) (when ll (or (parse-integer ll :junk-allowed t) ll))))) (slot-value timesig 'll)) (defmethod ur ((timesig tabcode-time-signature)) (unless (slot-boundp timesig 'ur) (let ((ur (tabcode::ur (word timesig)))) (setf (slot-value timesig 'ur) (when ur (or (parse-integer ur :junk-allowed t) ur))))) (slot-value timesig 'ur)) (defmethod lr ((timesig tabcode-time-signature)) (unless (slot-boundp timesig 'lr) (let ((lr (tabcode::lr (word timesig)))) (setf (slot-value timesig 'lr) (when lr (or (parse-integer lr :junk-allowed t) lr))))) (slot-value timesig 'lr)) (defclass tabcode-file-identifier (identifier tabcode-object) ((pathname :initarg :pathname :reader tabcode-pathname))) (defclass tabcode-bar (standard-anchored-period tabcode-object) ((start :initarg :start :accessor start-tabword) (end :initarg :end :accessor end-tabword))) (defclass tabcode-ruleset (standard-anchored-period tabcode-object) ((rules :initarg :rules :accessor ruleset-rules) (tuning :initarg :tuning :accessor ruleset-tuning :initform nil)))