6.2.8 Classes

Class: abstract-class ()

The ABSTRACT-CLASS class.
This is the meta-class for abstract classes.

Package

net.didierverna.clon

Source

util.lisp (file)

Direct superclasses

standard-class (class)

Direct methods
  • validate-superclass (method)
  • validate-superclass (method)
  • make-instance (method)
Class: container ()

The CONTAINER class.
This class is a mixin used in synopsis and groups to represent the program’s command-line hierarchy.

Package

net.didierverna.clon

Source

container.lisp (file)

Direct superclasses

item (class)

Direct subclasses
Direct methods
Direct slots
Slot: items

The items in the container.

Type

list

Initargs

:items

Readers

items (generic function)

Class: context ()

The CONTEXT class.
This class represents the associatiion of a synopsis and a set of command-line options based on it.

Package

net.didierverna.clon

Source

context.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: synopsis

The program synopsis.

Type

net.didierverna.clon::synopsis

Initargs

:synopsis

Initform

net.didierverna.clon:*synopsis*

Readers

synopsis (generic function)

Slot: progname

The program name as it appears on the command-line.

Type

string

Slot: cmdline-options

The options from the command-line.

Type

list

Readers

cmdline-options (generic function)

Writers

(setf cmdline-options) (generic function)

Slot: remainder

The non-Clon part of the command-line.

Type

list

Slot: search-path

The search path for Clon files.

Readers

search-path (generic function)

Slot: theme

The theme filename.

Readers

theme (generic function)

Slot: line-width

The line width for help display.

Readers

line-width (generic function)

Slot: highlight

Clon’s output highlight mode.

Readers

highlight (generic function)

Slot: error-handler

The behavior to adopt on option retrieval errors.

Type

symbol

Initform

:quit

Readers

error-handler (generic function)

Direct Default Initargs
InitargValue
:cmdline(net.didierverna.clon:cmdline)
Class: enum ()

The ENUM class.
This class implements options whose values belong to a set of keywords.

Package

net.didierverna.clon

Source

enum.lisp (file)

Direct superclasses
Direct methods
Direct slots
Slot: argument-name
Initform

"type"

Class: enum-base ()

The ENUM-BASE abstract class.
This class provides support for options including enumerated values.

Package

net.didierverna.clon

Source

enum-base.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
  • initialize-instance (method)
  • enum (method)
Direct slots
Slot: enum

The set of possible values.

Initargs

:enum

Readers

enum (generic function)

Class: face ()

The FACE class.

Package

net.didierverna.clon

Source

face.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

sface (class)

Direct methods
Direct slots
Slot: name

The face name.

Initargs

:name

Readers

name (generic function)

Slot: visiblep

Whether the face is visible.

Initargs

:visible

Initform

t

Readers

visiblep (generic function)

Slot: left-padding

The face left padding.
This property can take the following forms:
- <NUMBER>: the padding is relative to the enclosing face,
- SELF: the padding is set to wherever the face happens to be opened, - (<NUMBER> ABSOLUTE): the padding is set in absolute value,
- (<NUMBER> :RELATIVE-TO <FACE-NAME>): the padding is set relatively to a parent face named FACE-NAME.

Initargs

:padding-left

Initform

0

Readers

left-padding (generic function)

Slot: right-padding

The face right padding.
This property can take the following forms:
- <NUMBER>: the padding is relative to the enclosing face,
- SELF: the padding is set to wherever the face happens to be closed, - (<NUMBER> ABSOLUTE): the padding is set in absolute value,
- (<NUMBER> :RELATIVE-TO <FACE-NAME>): the padding is set relatively to a parent face named FACE-NAME.

Initargs

:padding-right

Initform

(quote net.didierverna.clon::self)

Readers

right-padding (generic function)

Slot: top-padding

The face top padding.
This property can take the following forms:
- nil: the output can start right away,
- 0: the output should start on the next line,
- N>0: there should be N empty lines before the output.

Initargs

:padding-top

Readers

top-padding (generic function)

Slot: bottom-padding

The face bottom padding.
This property can take the following forms:
- nil: the next output can start right at the end of this face’s, - 0: the next output should start on the next line,
- N>0: there should be N empty lines before the next output.

Initargs

:padding-bottom

Readers

bottom-padding (generic function)

Slot: item-separator

The face item separator.

Initargs

:item-separator

Initform

#\

Readers

item-separator (generic function)

Slot: intensity

The face intensity.

Initargs

:intensity

Readers

intensity (generic function)

Slot: italicp

The face’s italic status.

Initargs

:italic

Readers

italicp (generic function)

Slot: underline

The face’s underline level.

Initargs

:underline

Readers

underline (generic function)

The face’s blink speed.

Initargs

:blink

Readers

blink (generic function)

Slot: inversep

The face’s inverse video status.

Initargs

:inverse

Readers

inversep (generic function)

Slot: concealedp

The face’s concealed status.

Initargs

:concealed

Readers

concealedp (generic function)

Slot: crossed-out-p

The face’s crossed out status.

Initargs

:crossed-out

Readers

crossed-out-p (generic function)

Slot: framedp

The face’s framed status.

Initargs

:framed

Readers

framedp (generic function)

Slot: foreground

The face foreground.

Initargs

:foreground

Readers

foreground (generic function)

Slot: background

The face background.

Initargs

:background

Readers

background (generic function)

Slot: subfaces

The face children.

Initargs

:subfaces

Readers

subfaces (generic function)

Slot: parent

The face parent.

Readers

parent (generic function)

Class: flag ()

The FLAG class.
This class implements options that don’t take any argument.

Package

net.didierverna.clon

Source

flag.lisp (file)

Direct superclasses

option (class)

Direct methods

retrieve-from-environment (method)

Class: group ()

The GROUP class.
This class groups other groups, options or strings together, effectively implementing hierarchical program command-line.

Package

net.didierverna.clon

Source

group.lisp (file)

Direct superclasses

container (class)

Direct methods
Direct slots
Slot: header

The group’s header.

Initargs

:header

Readers

header (generic function)

Class: item ()

The ITEM class.
This class is the base class for all synopsis items.

Package

net.didierverna.clon

Source

item.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: traversedp

The item’s traversal state.

Readers

traversedp (generic function)

Writers

(setf traversedp) (generic function)

Slot: hiddenp

Whether the item is hidden in help strings.

Initargs

:hidden

Readers

hiddenp (generic function)

Class: lispobj ()

The LISPOBJ class.
This class implements read-from-string options.

Package

net.didierverna.clon

Source

lispobj.lisp (file)

Direct superclasses

valued-option (class)

Direct methods
Direct slots
Slot: argument-name
Initform

"obj"

Slot: typespec

A type specifier the option’s value should satisfy.

Initargs

:typespec

Initform

t

Readers

typespec (generic function)

Class: negatable ()

The NEGATABLE Class.
This class implements the negated syntax for the switch-based hierarchy.

Package

net.didierverna.clon

Source

negatable.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

switch-base (class)

Direct methods
Class: option ()

The OPTION class.
This is the base class for all options.

Package

net.didierverna.clon

Source

option.lisp (file)

Direct superclasses

item (class)

Direct subclasses
Direct methods
Direct slots
Slot: short-name

The option’s short name.

Type

(or null string)

Initargs

:short-name

Readers

short-name (generic function)

Slot: long-name

The option’s long name.

Type

(or null string)

Initargs

:long-name

Readers

long-name (generic function)

Slot: description

The option’s description.

Type

(or null string)

Initargs

:description

Readers

description (generic function)

Slot: env-var

The option’s associated environment variable.

Type

(or null string)

Initargs

:env-var

Readers

env-var (generic function)

Direct Default Initargs
InitargValue
:internalnil
Class: path ()

The PATH class.
This class implements options whose values are (colon-separated lists of) pathnames.

Package

net.didierverna.clon

Source

path.lisp (file)

Direct superclasses

valued-option (class)

Direct methods
Direct slots
Slot: argument-name
Initform

"path"

Slot: path-type

The path type.

Initargs

:type

Readers

path-type (generic function)

Class: sface ()

The SFACE class.
An SFace is the association of a face and its raw sibling. The sibling is used to create subfaces which would be missing from the original, user defined one.

Package

net.didierverna.clon

Source

sheet.lisp (file)

Direct superclasses

face (class)

Direct methods

sibling (method)

Direct slots
Slot: sibling

The SFace’s raw sibling.

Readers

sibling (generic function)

Class: sheet ()

The SHEET class.
This class implements the notion of sheet for printing Clon help.

Package

net.didierverna.clon

Source

sheet.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: output-stream

The sheet’s output stream.

Type

stream

Initargs

:output-stream

Readers

output-stream (generic function)

Slot: line-width

The sheet’s line width.

Type

(integer 1)

Initargs

:line-width

Readers

line-width (generic function)

Slot: highlightp

Whether to highlight SHEET’s output.

Initargs

:highlightp

Readers

highlightp (generic function)

Slot: sface-tree

The sheet’s sface tree.

Readers

sface-tree (generic function)

Slot: column

The sheet’s current column.

Type

(integer 0)

Initform

0

Readers

column (generic function)

Writers

(setf column) (generic function)

Slot: frames

The stack of currently open frames.

Type

list

Readers

frames (generic function)

Writers

(setf frames) (generic function)

Class: stropt ()

The STROPT class.
This class implements options the values of which are strings.

Package

net.didierverna.clon

Source

stropt.lisp (file)

Direct superclasses

valued-option (class)

Direct methods
Direct slots
Slot: argument-name
Initform

"str"

Class: switch ()

The SWITCH class.
This class implements boolean options.

Package

net.didierverna.clon

Source

switch.lisp (file)

Direct superclasses
Direct methods
Class: switch-base ()

The SWITCH-BASE abstract class.
This class provides support for options including boolean values.

Package

net.didierverna.clon

Source

switch-base.lisp (file)

Direct superclasses

negatable (class)

Direct subclasses
Direct methods
Direct slots
Slot: argument-styles

The possible argument styles.
The position of every argument style in the list must correspond to the position of the associated strings in the yes-values and no-values slots.

Type

list

Initargs

:argument-styles

Readers

argument-styles (generic function)

Writers

(setf argument-styles) (generic function)

Slot: yes-values

The possible ’yes’ values.

Type

list

Initargs

:yes-values

Readers

yes-values (generic function)

Writers

(setf yes-values) (generic function)

Slot: no-values

The possible ’no’ values.

Type

list

Initargs

:no-values

Readers

no-values (generic function)

Writers

(setf no-values) (generic function)

Slot: argument-style

The selected argument style.

Type

keyword

Initargs

:argument-style

Initform

:yes/no

Readers

argument-style (generic function)

Direct Default Initargs
InitargValue
:argument-type:optional
:argument-styles(quote (:yes/no :on/off :true/false :yup/nope :yeah/nah))
:yes-values(quote ("yes" "on" "true" "yup" "yeah"))
:no-values(quote ("no" "off" "false" "nope" "nah"))
Class: synopsis ()

The SYNOPSIS class.
This class handles the description of the program’s command-line options.

Package

net.didierverna.clon

Source

synopsis.lisp (file)

Direct superclasses

container (class)

Direct methods
Direct slots
Slot: postfix

A postfix to the program synopsis.

Type

(or null string)

Initargs

:postfix

Readers

postfix (generic function)

Slot: short-pack

The short pack string.

Type

(or null string)

Readers

short-pack (generic function)

Slot: negated-pack

The negated pack string.

Type

(or null string)

Readers

negated-pack (generic function)

Slot: potential-pack

The potential pack string.

Type

(or null string)

Readers

potential-pack (generic function)

Slot: clon-options-group

The Clon options group.

Type

net.didierverna.clon::group

Initargs

:clon-options-group

Readers

clon-options-group (generic function)

Class: text ()

The TEXT class.
This class implements plain text objects appearing in a synopsis.

Package

net.didierverna.clon

Source

text.lisp (file)

Direct superclasses

item (class)

Direct methods
Direct slots
Slot: contents

The actual text string.

Type

string

Initargs

:contents

Readers

contents (generic function)

Class: valued-option ()

The VALUED-OPTION class.
This is the base class for options accepting arguments.

Package

net.didierverna.clon

Source

valued.lisp (file)

Direct superclasses

option (class)

Direct subclasses
Direct methods
Direct slots
Slot: argument-name

The option’s argument display name.

Initargs

:argument-name

Initform

"arg"

Readers

argument-name (generic function)

Slot: argument-required-p

Whether the option’s argument is required.

Readers

argument-required-p (generic function)

Slot: fallback-value

The option’s fallback value.

Initargs

:fallback-value

Readers

fallback-value (generic function)

Slot: default-value

The option’s default value.

Initargs

:default-value

Readers

default-value (generic function)

Direct Default Initargs
InitargValue
:argument-type:required
Class: xswitch ()

The XSWITCH class.
This class merges the functionalities of switches and enumerations. As such, the negated syntax is available for extended xswitches.

Package

net.didierverna.clon

Source

xswitch.lisp (file)

Direct superclasses
Direct methods
Direct slots
Slot: enum

The set of possible non-boolean values.