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

Marco Antoniotti mantoniotti at common-lisp.net
Thu Mar 10 18:07:06 UTC 2005


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)




More information about the Cl-enumeration-cvs mailing list