# HG changeset patch # User David Lewis # Date 1185546114 -3600 # Node ID 4198b52e612b6be0cb9e62658f2057b717e95bbb # Parent d2f68cedf57304cd1b3e0abaa2e1cb4f42f9778b More docstrings darcs-hash:20070727142154-f76cc-f59d4ad1216346f392d5b9f9e5b153a6f07a9bd9.gz diff -r d2f68cedf573 -r 4198b52e612b base/generics.lisp --- a/base/generics.lisp Fri Jul 27 12:25:07 2007 +0100 +++ b/base/generics.lisp Fri Jul 27 15:21:54 2007 +0100 @@ -102,7 +102,9 @@ (defgeneric (setf timepoint) (value moment-designator)) (defgeneric cut-off (anchored-period-designator) ; name? (:documentation "Returns a representing the point at - which the anchored period has ended.") + which the anchored period has ended. By default, is calculated + as the result of running time+ on the onset and period of the + object.") (:method (apd) (time+ (moment apd) (floating-period apd)))) (defgeneric crotchet (object) (:documentation "Returns a period, the duration of which represents diff -r d2f68cedf573 -r 4198b52e612b base/methods.lisp --- a/base/methods.lisp Fri Jul 27 12:25:07 2007 +0100 +++ b/base/methods.lisp Fri Jul 27 15:21:54 2007 +0100 @@ -174,41 +174,47 @@ ;; Time protocol (defmethod time+ ((object1 moment) (object2 period)) - "(time+ ) -> Implemented as a -straightforward summation." + "Returns a . Implemented as a straightforward +summation." (make-moment (+ (timepoint object1) (duration object2)))) (defmethod time+ ((object1 period) (object2 moment)) ;? - "(time+ ) -> Implemented as a -straightforward summation and defined by default as (time+ - )." + "Returns a . Implemented as a straightforward summation +and defined by default as (time+ )." (time+ object2 object1)) (defmethod time+ ((object1 period) (object2 period)) - "(time+ ) -> Implemented as a -straightforward summation." + "Returns a . Implemented as a straightforward +summation." (make-floating-period (+ (duration object1) (duration object2)))) (defmethod time+ ((object1 moment) (object2 moment)) - "(time+ ) -> The -question makes no sense." + "Returns . The question makes no +sense." (error 'undefined-action :operation 'time+ :datatype (list (class-of object1) (class-of object2)))) (defmethod time- ((object1 moment) (object2 moment)) + "Returns with an onset at object2 and + extending to object1" (make-anchored-period (timepoint object2) (- (timepoint object1) (timepoint object2)))) (defmethod time- ((object1 moment) (object2 period)) + "Simple subtraction - Returns a " (make-moment (- (timepoint object1) (duration object2)))) (defmethod time- ((object1 period) (object2 moment)) ;? + "Returns . The question makes no +sense" (error 'undefined-action :operation 'time- :datatype (list (class-of object1) (class-of object2)))) (defmethod time- ((object1 period) (object2 period)) + "Returns spanning the difference of the +periods" (make-floating-period (- (duration object2) (duration object1))))