4.2.4 Documenting Classes and Interfaces
syntax
(defclass maybe-link id super (intf ...) pre-flow ...)
maybe-link =
| #:link-target? link-target?-expr super = super-id | (mixin-id super) intf = intf-id | [#:no-inherit intf-id]
The decoding of the pre-flow sequence should start with general documentation about the class, followed by constructor definition (see defconstructor), and then field and method definitions (see defmethod). In rendered form, the constructor and method specification are indented to visually group them under the class definition.
When an intf-id is specified with #:no-inherit, then the set of inherited methods for id does not include methods from intf-id. Omitting methods in this way can avoid a documentation dependency when no direct reference to a method of intf-id is needed.
Changed in version 1.42 of package scribble-lib: Added #:no-inherit for intf.
syntax
(defclass/title maybe-link id super (intf ...) pre-flow ...)
This form is normally used to create a section to be rendered on its own HTML. The 'hidden style is used because the definition box serves as a title.
Changed in version 1.42 of package scribble-lib: Added #:no-inherit for intf.
syntax
(definterface id (intf ...) pre-flow ...)
Changed in version 1.42 of package scribble-lib: Added #:no-inherit for intf.
syntax
(definterface/title id (intf ...) pre-flow ...)
Changed in version 1.42 of package scribble-lib: Added #:no-inherit for intf.
syntax
(defmixin id (domain-id ...) (range-id ...) pre-flow ...)
Changed in version 1.42 of package scribble-lib: Added #:no-inherit support for domain-id.
syntax
(defmixin/title id (domain-id ...) (range-id ...) pre-flow ...)
syntax
(defconstructor (arg-spec ...) pre-flow ...)
arg-spec = (arg-id contract-expr-datum) | (arg-id contract-expr-datum default-expr)
syntax
(defconstructor/make (arg-spec ...) pre-flow ...)
syntax
(defconstructor*/make [(arg-spec ...) ...] pre-flow ...)
syntax
(defconstructor/auto-super [(arg-spec ...) ...] pre-flow ...)
syntax
(defmethod maybe-mode maybe-link (id arg-spec ...) result-contract-expr-datum pre-flow ...)
maybe-link =
| #:link-target? link-target?-expr maybe-mode =
| #:mode public | #:mode public-final | #:mode override | #:mode override-final | #:mode augment | #:mode augment-final | #:mode extend | #:mode extend-final | #:mode pubment
The maybe-mode specifies whether the method overrides a method from a superclass, and so on. (For these purposes, use #:mode override when refining a method of an implemented interface.) The extend mode is like override, but the description of the method should describe only extensions to the superclass implementation. When maybe-mode is not supplied, it defaults to public.
Changed in version 1.35 of package scribble-lib: Added a check against invalid maybe-mode.
syntax
(defmethod* maybe-mode maybe-link ([(id arg-spec ...) result-contract-expr-datum] ...) pre-flow ...)
syntax
(method class/intf-id method-id)
For-label binding information is used with class/intf-id, but not method-id.
syntax
(xmethod class/intf-id method-id)
syntax
(this-obj)