commandr.option

Program and command entries.

This module contains interfaces and implementations of various entries. Generally, most APIs expose builder-like pattern, where setters return class instance to allow chaining.

Entries are all things that can be added to program or command - that is flags, options and arguments. All entries contain a name - which is an unique identifier for every entry. Names must be a valid alpha numeric identifier.

Result of parsing arguments (instance of ProgramArgs) allows reading argument values by entry name (not by -short or --long-forms).

Members

Classes

Argument
class Argument

Represents an argument.

Flag
class Flag

Represents a flag.

InvalidArgumentsException
class InvalidArgumentsException

Thrown when user-passed data is invalid.

Option
class Option

Represents an option.

Interfaces

IEntry
interface IEntry

Interface for all program or command entries - flags, options and arguments.

IOption
interface IOption

Option interface.

Mixin templates

EntryImpl
mixin template EntryImpl()
OptionImpl
mixin template OptionImpl()

See Also

Flag, Option, Argument

Meta