This is the CRTP base class for Option and OptionDefaults.
More...
#include <CLI11.h>
|
| CRTP * | group (const std::string &name) |
| | Changes the group membership.
|
| |
| CRTP * | required (bool value=true) |
| | Set the option as required.
|
| |
| CRTP * | mandatory (bool value=true) |
| | Support Plumbum term.
|
| |
| CRTP * | 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.
|
| |
| CRTP * | take_last () |
| | Set the multi option policy to take last.
|
| |
| CRTP * | take_first () |
| | Set the multi option policy to take last.
|
| |
| CRTP * | take_all () |
| | Set the multi option policy to take all arguments.
|
| |
| CRTP * | join () |
| | Set the multi option policy to join.
|
| |
| CRTP * | join (char delim) |
| | Set the multi option policy to join with a specific delimiter.
|
| |
| CRTP * | configurable (bool value=true) |
| | Allow in a configuration file.
|
| |
| CRTP * | delimiter (char value='\0') |
| | Allow in a configuration file.
|
| |
|
| template<typename T > |
| void | copy_to (T *other) const |
| | Copy the contents to another similar class (one based on OptionBase)
|
| |
|
| std::string | group_ = std::string("Options") |
| | The group membership.
|
| |
| bool | required_ {false} |
| | True if this is a required option.
|
| |
| bool | ignore_case_ {false} |
| | Ignore the case when matching (option, not value)
|
| |
| bool | ignore_underscore_ {false} |
| | Ignore underscores when matching (option, not value)
|
| |
| bool | configurable_ {true} |
| | Allow this option to be given in a configuration file.
|
| |
| bool | disable_flag_override_ {false} |
| | Disable overriding flag values with '=value'.
|
| |
| char | delimiter_ {'\0'} |
| | Specify a delimiter character for vector arguments.
|
| |
| bool | always_capture_default_ {false} |
| | Automatically capture default value.
|
| |
| MultiOptionPolicy | multi_option_policy_ {MultiOptionPolicy::Throw} |
| | Policy for handling multiple arguments beyond the expected Max.
|
| |
template<typename CRTP>
class pxr_CLI::OptionBase< CRTP >
This is the CRTP base class for Option and OptionDefaults.
It was designed this way to share parts of the class; an OptionDefaults can copy to an Option.
Definition at line 4168 of file CLI11.h.
◆ always_capture_default()
template<typename CRTP >
| CRTP * always_capture_default |
( |
bool | value = true | ) |
|
|
inline |
◆ configurable()
template<typename CRTP >
| CRTP * configurable |
( |
bool | value = true | ) |
|
|
inline |
Allow in a configuration file.
Definition at line 4296 of file CLI11.h.
◆ copy_to()
template<typename CRTP >
template<typename T >
| void copy_to |
( |
T * | other | ) |
const |
|
protected |
Copy the contents to another similar class (one based on OptionBase)
Definition at line 4924 of file CLI11.h.
◆ delimiter()
template<typename CRTP >
| CRTP * delimiter |
( |
char | value = '\0' | ) |
|
|
inline |
Allow in a configuration file.
Definition at line 4302 of file CLI11.h.
◆ get_always_capture_default()
template<typename CRTP >
| CLI11_NODISCARD bool get_always_capture_default |
( |
| ) |
const |
|
inline |
Return true if this will automatically capture the default value for help printing.
Definition at line 4252 of file CLI11.h.
◆ get_configurable()
template<typename CRTP >
| CLI11_NODISCARD bool get_configurable |
( |
| ) |
const |
|
inline |
The status of configurable.
Definition at line 4243 of file CLI11.h.
◆ get_delimiter()
template<typename CRTP >
| CLI11_NODISCARD char get_delimiter |
( |
| ) |
const |
|
inline |
Get the current delimiter char.
Definition at line 4249 of file CLI11.h.
◆ get_disable_flag_override()
template<typename CRTP >
| CLI11_NODISCARD bool get_disable_flag_override |
( |
| ) |
const |
|
inline |
The status of configurable.
Definition at line 4246 of file CLI11.h.
◆ get_group()
template<typename CRTP >
| CLI11_NODISCARD const std::string & get_group |
( |
| ) |
const |
|
inline |
Get the group of this option.
Definition at line 4231 of file CLI11.h.
◆ get_ignore_case()
template<typename CRTP >
| CLI11_NODISCARD bool get_ignore_case |
( |
| ) |
const |
|
inline |
The status of ignore case.
Definition at line 4237 of file CLI11.h.
◆ get_ignore_underscore()
template<typename CRTP >
| CLI11_NODISCARD bool get_ignore_underscore |
( |
| ) |
const |
|
inline |
The status of ignore_underscore.
Definition at line 4240 of file CLI11.h.
◆ get_multi_option_policy()
template<typename CRTP >
| CLI11_NODISCARD MultiOptionPolicy get_multi_option_policy |
( |
| ) |
const |
|
inline |
The status of the multi option policy.
Definition at line 4255 of file CLI11.h.
◆ get_required()
template<typename CRTP >
| CLI11_NODISCARD bool get_required |
( |
| ) |
const |
|
inline |
True if this is a required option.
Definition at line 4234 of file CLI11.h.
◆ group()
template<typename CRTP >
| CRTP * group |
( |
const std::string & | name | ) |
|
|
inline |
Changes the group membership.
Definition at line 4206 of file CLI11.h.
◆ join() [1/2]
Set the multi option policy to join.
Definition at line 4281 of file CLI11.h.
◆ join() [2/2]
template<typename CRTP >
| CRTP * join |
( |
char | delim | ) |
|
|
inline |
Set the multi option policy to join with a specific delimiter.
Definition at line 4288 of file CLI11.h.
◆ mandatory()
template<typename CRTP >
| CRTP * mandatory |
( |
bool | value = true | ) |
|
|
inline |
Support Plumbum term.
Definition at line 4221 of file CLI11.h.
◆ required()
template<typename CRTP >
| CRTP * required |
( |
bool | value = true | ) |
|
|
inline |
Set the option as required.
Definition at line 4215 of file CLI11.h.
◆ take_all()
Set the multi option policy to take all arguments.
Definition at line 4274 of file CLI11.h.
◆ take_first()
Set the multi option policy to take last.
Definition at line 4267 of file CLI11.h.
◆ take_last()
Set the multi option policy to take last.
Definition at line 4260 of file CLI11.h.
◆ always_capture_default_
template<typename CRTP >
| bool always_capture_default_ {false} |
|
protected |
Automatically capture default value.
Definition at line 4194 of file CLI11.h.
◆ configurable_
template<typename CRTP >
| bool configurable_ {true} |
|
protected |
Allow this option to be given in a configuration file.
Definition at line 4185 of file CLI11.h.
◆ delimiter_
Specify a delimiter character for vector arguments.
Definition at line 4191 of file CLI11.h.
◆ disable_flag_override_
template<typename CRTP >
| bool disable_flag_override_ {false} |
|
protected |
Disable overriding flag values with '=value'.
Definition at line 4188 of file CLI11.h.
◆ group_
template<typename CRTP >
| std::string group_ = std::string("Options") |
|
protected |
The group membership.
Definition at line 4173 of file CLI11.h.
◆ ignore_case_
template<typename CRTP >
| bool ignore_case_ {false} |
|
protected |
Ignore the case when matching (option, not value)
Definition at line 4179 of file CLI11.h.
◆ ignore_underscore_
template<typename CRTP >
| bool ignore_underscore_ {false} |
|
protected |
Ignore underscores when matching (option, not value)
Definition at line 4182 of file CLI11.h.
◆ multi_option_policy_
template<typename CRTP >
| MultiOptionPolicy multi_option_policy_ {MultiOptionPolicy::Throw} |
|
protected |
Policy for handling multiple arguments beyond the expected Max.
Definition at line 4197 of file CLI11.h.
◆ required_
True if this is a required option.
Definition at line 4176 of file CLI11.h.
The documentation for this class was generated from the following file: