# Options

`AP_OPTION` is the common superclass of all options. It defines the fact that options can have a short and a long form and a descriptive text. It also can count the occurrencies of an option and can mark the option as mandatory.

`AP_OPTION_WITH_PARAMETER[G]` extends `AP_OPTION` with the possibility of recoding parameters of type `G`. All options except for `AP_FLAG` inherit from this class.

## Available option types

The following standard option types are available:

`AP_FLAG`
  A simple flag that does not take an argument.
`AP_STRING_OPTION`
  A flag that takes an arbitrary string as argument.
`AP_BOOLEAN_OPTION`
  The flag needs to be supplied by a boolean value. The strings 'yes','y','1','true' and 't' are regarded as true. The strings 'no','n','0','false' and 'f' are regarded as false.
`AP_ENUMERATION_OPTION`
  The enumeration options allows to choose one string out of a fixed set of choices. Available choices can be added to the option through the `extend` call.
`AP_INTEGER_OPTION`
  This option takes an integer as an argument. Parsing will yield an error if no integer value is passed.
`AP_DISPLAY_HELP_FLAG`
  This is a special flag to display a help message. It is normally added automatically through the call of `make` in `AP_PARSER`.

## Defining own option types

It should be easy to implement own option types do define own parameters, for example for file names or dates. It is best to inherit form `AP_OPTION_WITH_PARAMETER` or one of its decedents.