Quick Links:

bal | bbl | bdl | bsl

Namespaces

Component balcl_option
[Package balcl]

Provide an allocator-aware command-line-option descriptor class. More...

Namespaces

namespace  balcl

Detailed Description

Outline
Purpose:
Provide an allocator-aware command-line-option descriptor class.
Classes:
balcl::Option allocator-aware, in-core VST option descriptor
See also:
Component balcl_optioninfo, Component balcl_commandline
Description:
This component provides an unconstrained, allocator-aware, in-core (value-semantic) attribute class, balcl::Option, that describes a command-line option. Class balcl::Option is used to specify the user-defined command-line options accepted by a balcl::CommandLine object.
The value of a balcl::Option object is the same as that of the balcl::OptionInfo object accessible from the option object via a conversion operator. That value consists of several (subordinate) attributes:
  • the strings associated with the option:

    • tag
    • name, and
    • description

  • the typeInfo attribute (see balcl_typeinfo) that, in turn, consists of:

    • type (type of the option's value)
    • linkedVariable [optional], and
    • constraint [optional]

  • the occurrenceInfo attribute (see balcl_occurrenceinfo) that, in turn, consists of:

    • occurrenceType (required, optional, or hidden)
    • defaulValue [optional]

Since balcl::TypeInfo is an in-core VST, so is balcl::Option.
When constructing a balcl::Option from a balcl::OptionInfo object, the class places no constraints on the latter's value except, of course, for the constraints required by the types that compose the balcl::OptionInfo class.
Additionally, the balcl::Option class provides:
  • A set of (is*Valid) methods that report whether or not the option's string attributes (tag, name, description) are valid for use by balcl::CommandLine.
  • Allocator awareness that allows balcl::Option values to be stored in allocator-aware containers.
Usage:
The intended use of this component is illustrated in balcl_commandline|Usage.