Loading...
Searching...
No Matches
CLI::OptionDefaults Class Reference

`#include <Option.hpp>`

Inheritance diagram for CLI::OptionDefaults:

## Public Member Functions

| OptionDefaults ()=default
OptionDefaults * | callback_priority (CallbackPriority value=CallbackPriority::Normal)
| Set the callback priority.
OptionDefaults * | multi_option_policy (MultiOptionPolicy value=MultiOptionPolicy::Throw)
| Take the last argument if given multiple times.
OptionDefaults * | ignore_case (bool value=true)
| Ignore the case of the option name.
OptionDefaults * | ignore_underscore (bool value=true)
| Ignore underscores in the option name.
OptionDefaults * | disable_flag_override (bool value=true)
| Disable overriding flag values with an '=' segment.
OptionDefaults * | delimiter (char value='\0')
| set a delimiter character to split up single arguments to treat as multiple inputs
Public Member Functions inherited from CLI::OptionBase< OptionDefaults >
OptionDefaults * | group (const std::string &name)
| Changes the group membership.
OptionDefaults * | required (bool value=true)
| Set the option as required.
OptionDefaults * | mandatory (bool value=true)
| Support Plumbum term.
OptionDefaults * | always_capture_default (bool value=true)
CLI11_NODISCARD const std::string & | get_group () const
| Get the group of this option.
CLI11_NODISCARD bool | get_required () const
| True if this is a required option.
CLI11_NODISCARD bool | get_ignore_case () const
| The status of ignore case.
CLI11_NODISCARD bool | get_ignore_underscore () const
| The status of ignore_underscore.
CLI11_NODISCARD bool | get_configurable () const
| The status of configurable.
CLI11_NODISCARD bool | get_disable_flag_override () const
| The status of configurable.
CLI11_NODISCARD char | get_delimiter () const
| Get the current delimiter char.
CLI11_NODISCARD bool | get_always_capture_default () const
| Return true if this will automatically capture the default value for help printing.
CLI11_NODISCARD MultiOptionPolicy | get_multi_option_policy () const
| The status of the multi option policy.
CLI11_NODISCARD CallbackPriority | get_callback_priority () const
| The priority of callback.
OptionDefaults * | take_last ()
| Set the multi option policy to take last.
OptionDefaults * | take_first ()
| Set the multi option policy to take last.
OptionDefaults * | take_all ()
| Set the multi option policy to take all arguments.
OptionDefaults * | join ()
| Set the multi option policy to join.
OptionDefaults * | configurable (bool value=true)
| Allow in a configuration file.
OptionDefaults * | delimiter (char value='\0')
| Allow in a configuration file.

## Additional Inherited Members

Protected Member Functions inherited from CLI::OptionBase< OptionDefaults >
void | copy_to (T *other) const
| Copy the contents to another similar class (one based on OptionBase).
Protected Attributes inherited from CLI::OptionBase< OptionDefaults >
std::string | group_
| The group membership.
bool | required_
| True if this is a required option.
bool | ignore_case_
| Ignore the case when matching (option, not value).
bool | ignore_underscore_
| Ignore underscores when matching (option, not value).
bool | configurable_
| Allow this option to be given in a configuration file.
bool | disable_flag_override_
| Disable overriding flag values with '=value'.
char | delimiter_
| Specify a delimiter character for vector arguments.
bool | always_capture_default_
| Automatically capture default value.
MultiOptionPolicy | multi_option_policy_
| Policy for handling multiple arguments beyond the expected Max.
CallbackPriority | callback_priority_
| Priority of callback.

## Detailed Description

This is a version of OptionBase that only supports setting values, for defaults. It is stored as the default option in an App.

## Constructor & Destructor Documentation

## OptionDefaults()

CLI::OptionDefaults::OptionDefaults | ( |  | ) |

default

## Member Function Documentation

## callback_priority()

OptionDefaults * CLI::OptionDefaults::callback_priority | ( | CallbackPriority | value = CallbackPriority::Normal | ) |

inline

Set the callback priority.

## delimiter()

OptionDefaults * CLI::OptionDefaults::delimiter | ( | char | value = '\0' | ) |

inline

set a delimiter character to split up single arguments to treat as multiple inputs

## disable_flag_override()

OptionDefaults * CLI::OptionDefaults::disable_flag_override | ( | bool | value = true | ) |

inline

Disable overriding flag values with an '=' segment.

## ignore_case()

OptionDefaults * CLI::OptionDefaults::ignore_case | ( | bool | value = true | ) |

inline

Ignore the case of the option name.

## ignore_underscore()

OptionDefaults * CLI::OptionDefaults::ignore_underscore | ( | bool | value = true | ) |

inline

Ignore underscores in the option name.

## multi_option_policy()

OptionDefaults * CLI::OptionDefaults::multi_option_policy | ( | MultiOptionPolicy | value = MultiOptionPolicy::Throw | ) |

inline

Take the last argument if given multiple times.

The documentation for this class was generated from the following file:

- include/CLI/Option.hpp