[cl-enumeration-cvs] CVS update: enumerations/enumerations.lisp

Update of /project/cl-enumeration/cvsroot/enumerations In directory common-lisp.net:/tmp/cvs-serv26545 Modified Files: enumerations.lisp Log Message: Added DEFGENERIC for RESET and some doc strings. Date: Thu Mar 10 19:07:05 2005 Author: mantoniotti Index: enumerations/enumerations.lisp diff -u enumerations/enumerations.lisp:1.1.1.1 enumerations/enumerations.lisp:1.2 --- enumerations/enumerations.lisp:1.1.1.1 Wed Mar 9 19:18:02 2005 +++ enumerations/enumerations.lisp Thu Mar 10 19:07:05 2005 @@ -45,11 +45,14 @@ (defgeneric has-more-elements-p (x) (:method ((x enumeration)) nil) - (:documentation "Checks whether the enumeration has more elements. Obsolete.")) + (:documentation + "Checks whether the enumeration has more elements. Obsolete.")) (defgeneric has-next-p (x) - (:method ((x enumeration)) nil)) + (:method ((x enumeration)) nil) + (:documentation + "Checks whether the enumeration has more elements. Obsolete.")) (defgeneric next (x &optional default)) @@ -60,7 +63,18 @@ (declare (ignore errorp)) (cerror "Do you want to return the default value specified ~S?" "No specific cursor defined for enumeration ~*~S." default x) - default)) + default) + (:documentation + "Returns the \"current\" element in the enumeration ENUM. +If ERRORP is non-NIL and no \"current\" element is available, then +CURRENT signals an error: either NO-SUCH-ELEMENT or a continuable +error. If ERRORP is NIL and no \"current\" element is available then +DEFAULT is returned.")) + + +(defgeneric reset (enum) + (:documentation + "Resets the enumeration ENUM to the \"initial\" element.")) (defgeneric element-type (x)
participants (1)
-
mantoniotti@common-lisp.net