Mercurial > hg > amuse
comparison base/generics.lisp @ 102:59e69a32b8d9
More docstrings
darcs-hash:20070726091550-f76cc-32dfc4cc3e4922d6801b3b2717e5c19f15a1ef92.gz
author | David Lewis <d.lewis@gold.ac.uk> |
---|---|
date | Thu, 26 Jul 2007 10:15:50 +0100 |
parents | ad9cca28fecf |
children | 8528c316fbcc |
comparison
equal
deleted
inserted
replaced
101:c5f04eb31071 | 102:59e69a32b8d9 |
---|---|
167 ;; <time> <duration> -> <time> | 167 ;; <time> <duration> -> <time> |
168 ;; <duration> <duration> -> <duration> (or a distinct duration-?) | 168 ;; <duration> <duration> -> <duration> (or a distinct duration-?) |
169 ;; <duration> <time> -> ERROR? | 169 ;; <duration> <time> -> ERROR? |
170 ;; <anchored> <anchored> -> (time- (moment o1) (moment o2)) ? or error? | 170 ;; <anchored> <anchored> -> (time- (moment o1) (moment o2)) ? or error? |
171 | 171 |
172 (defgeneric time+ (object1 object2)) | 172 (defgeneric time+ (object1 object2) |
173 (defgeneric time- (object1 object2)) | 173 (:documentation "Addition for time designators")) |
174 | 174 (defgeneric time- (object1 object2) |
175 (defgeneric time> (object1 object2)) | 175 (:documentation "Subtraction for time designators")) |
176 | |
177 (defgeneric time> (object1 object2) | |
178 (:documentation "> operator for time designators")) | |
176 (defgeneric time< (object1 object2) | 179 (defgeneric time< (object1 object2) |
180 (:documentation "< operator for time designators") | |
177 (:method (o1 o2) (time> o2 o1))) | 181 (:method (o1 o2) (time> o2 o1))) |
178 (defgeneric time= (object1 object2)) | 182 (defgeneric time= (object1 object2) |
183 (:documentation "= operator for time designators")) | |
179 (defgeneric time>= (object1 object2) | 184 (defgeneric time>= (object1 object2) |
185 (:documentation ">= operator for time designators") | |
180 (:method (o1 o2) (or (time> o1 o2) (time= o1 o2)))) | 186 (:method (o1 o2) (or (time> o1 o2) (time= o1 o2)))) |
181 (defgeneric time<= (object1 object2) | 187 (defgeneric time<= (object1 object2) |
188 (:documentation "<= operator for time designators") | |
182 (:method (o1 o2) (or (time< o1 o2) (time= o1 o2)))) | 189 (:method (o1 o2) (or (time< o1 o2) (time= o1 o2)))) |
183 (defgeneric time/= (object1 object2) | 190 (defgeneric time/= (object1 object2) |
191 (:documentation "not = operator for time designators") | |
184 (:method (o1 o2) (not (time= o1 o2)))) | 192 (:method (o1 o2) (not (time= o1 o2)))) |
185 | 193 |
186 ;;; Duration protocol | 194 ;;; Duration protocol |
187 | 195 |
188 (defgeneric duration> (object1 object2)) | 196 (defgeneric duration> (object1 object2)) |