HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pxr_CLI::CLI::OptionBase< CRTP > Class Template Reference

#include <CLI11.h>

Public Member Functions

CRTP * group (const std::string &name)
 Changes the group membership. More...
 
CRTP * required (bool value=true)
 Set the option as required. More...
 
CRTP * mandatory (bool value=true)
 Support Plumbum term. More...
 
CRTP * always_capture_default (bool value=true)
 
CLI11_NODISCARD const std::stringget_group () const
 Get the group of this option. More...
 
CLI11_NODISCARD bool get_required () const
 True if this is a required option. More...
 
CLI11_NODISCARD bool get_ignore_case () const
 The status of ignore case. More...
 
CLI11_NODISCARD bool get_ignore_underscore () const
 The status of ignore_underscore. More...
 
CLI11_NODISCARD bool get_configurable () const
 The status of configurable. More...
 
CLI11_NODISCARD bool get_disable_flag_override () const
 The status of configurable. More...
 
CLI11_NODISCARD char get_delimiter () const
 Get the current delimiter char. More...
 
CLI11_NODISCARD bool get_always_capture_default () const
 Return true if this will automatically capture the default value for help printing. More...
 
CLI11_NODISCARD MultiOptionPolicy get_multi_option_policy () const
 The status of the multi option policy. More...
 
CRTP * take_last ()
 Set the multi option policy to take last. More...
 
CRTP * take_first ()
 Set the multi option policy to take last. More...
 
CRTP * take_all ()
 Set the multi option policy to take all arguments. More...
 
CRTP * join ()
 Set the multi option policy to join. More...
 
CRTP * join (char delim)
 Set the multi option policy to join with a specific delimiter. More...
 
CRTP * configurable (bool value=true)
 Allow in a configuration file. More...
 
CRTP * delimiter (char value= '\0')
 Allow in a configuration file. More...
 

Protected Member Functions

template<typename T >
void copy_to (T *other) const
 Copy the contents to another similar class (one based on OptionBase) More...
 

Protected Attributes

std::string group_ = std::string("Options")
 The group membership. More...
 
bool required_ {false}
 True if this is a required option. More...
 
bool ignore_case_ {false}
 Ignore the case when matching (option, not value) More...
 
bool ignore_underscore_ {false}
 Ignore underscores when matching (option, not value) More...
 
bool configurable_ {true}
 Allow this option to be given in a configuration file. More...
 
bool disable_flag_override_ {false}
 Disable overriding flag values with '=value'. More...
 
char delimiter_ {'\0'}
 Specify a delimiter character for vector arguments. More...
 
bool always_capture_default_ {false}
 Automatically capture default value. More...
 
MultiOptionPolicy multi_option_policy_ {MultiOptionPolicy::Throw}
 Policy for handling multiple arguments beyond the expected Max. More...
 

Detailed Description

template<typename CRTP>
class pxr_CLI::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.

Member Function Documentation

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::always_capture_default ( bool  value = true)
inline

Definition at line 4223 of file CLI11.h.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::configurable ( bool  value = true)
inline

Allow in a configuration file.

Definition at line 4296 of file CLI11.h.

template<typename CRTP >
template<typename T >
void pxr_CLI::CLI::OptionBase< CRTP >::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.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::delimiter ( char  value = '\0')
inline

Allow in a configuration file.

Definition at line 4302 of file CLI11.h.

template<typename CRTP>
CLI11_NODISCARD bool pxr_CLI::CLI::OptionBase< CRTP >::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.

template<typename CRTP>
CLI11_NODISCARD bool pxr_CLI::CLI::OptionBase< CRTP >::get_configurable ( ) const
inline

The status of configurable.

Definition at line 4243 of file CLI11.h.

template<typename CRTP>
CLI11_NODISCARD char pxr_CLI::CLI::OptionBase< CRTP >::get_delimiter ( ) const
inline

Get the current delimiter char.

Definition at line 4249 of file CLI11.h.

template<typename CRTP>
CLI11_NODISCARD bool pxr_CLI::CLI::OptionBase< CRTP >::get_disable_flag_override ( ) const
inline

The status of configurable.

Definition at line 4246 of file CLI11.h.

template<typename CRTP>
CLI11_NODISCARD const std::string& pxr_CLI::CLI::OptionBase< CRTP >::get_group ( ) const
inline

Get the group of this option.

Definition at line 4231 of file CLI11.h.

template<typename CRTP>
CLI11_NODISCARD bool pxr_CLI::CLI::OptionBase< CRTP >::get_ignore_case ( ) const
inline

The status of ignore case.

Definition at line 4237 of file CLI11.h.

template<typename CRTP>
CLI11_NODISCARD bool pxr_CLI::CLI::OptionBase< CRTP >::get_ignore_underscore ( ) const
inline

The status of ignore_underscore.

Definition at line 4240 of file CLI11.h.

template<typename CRTP>
CLI11_NODISCARD MultiOptionPolicy pxr_CLI::CLI::OptionBase< CRTP >::get_multi_option_policy ( ) const
inline

The status of the multi option policy.

Definition at line 4255 of file CLI11.h.

template<typename CRTP>
CLI11_NODISCARD bool pxr_CLI::CLI::OptionBase< CRTP >::get_required ( ) const
inline

True if this is a required option.

Definition at line 4234 of file CLI11.h.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::group ( const std::string name)
inline

Changes the group membership.

Definition at line 4206 of file CLI11.h.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::join ( )
inline

Set the multi option policy to join.

Definition at line 4281 of file CLI11.h.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::join ( char  delim)
inline

Set the multi option policy to join with a specific delimiter.

Definition at line 4288 of file CLI11.h.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::mandatory ( bool  value = true)
inline

Support Plumbum term.

Definition at line 4221 of file CLI11.h.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::required ( bool  value = true)
inline

Set the option as required.

Definition at line 4215 of file CLI11.h.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::take_all ( )
inline

Set the multi option policy to take all arguments.

Definition at line 4274 of file CLI11.h.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::take_first ( )
inline

Set the multi option policy to take last.

Definition at line 4267 of file CLI11.h.

template<typename CRTP>
CRTP* pxr_CLI::CLI::OptionBase< CRTP >::take_last ( )
inline

Set the multi option policy to take last.

Definition at line 4260 of file CLI11.h.

Member Data Documentation

template<typename CRTP>
bool pxr_CLI::CLI::OptionBase< CRTP >::always_capture_default_ {false}
protected

Automatically capture default value.

Definition at line 4194 of file CLI11.h.

template<typename CRTP>
bool pxr_CLI::CLI::OptionBase< CRTP >::configurable_ {true}
protected

Allow this option to be given in a configuration file.

Definition at line 4185 of file CLI11.h.

template<typename CRTP>
char pxr_CLI::CLI::OptionBase< CRTP >::delimiter_ {'\0'}
protected

Specify a delimiter character for vector arguments.

Definition at line 4191 of file CLI11.h.

template<typename CRTP>
bool pxr_CLI::CLI::OptionBase< CRTP >::disable_flag_override_ {false}
protected

Disable overriding flag values with '=value'.

Definition at line 4188 of file CLI11.h.

template<typename CRTP>
std::string pxr_CLI::CLI::OptionBase< CRTP >::group_ = std::string("Options")
protected

The group membership.

Definition at line 4173 of file CLI11.h.

template<typename CRTP>
bool pxr_CLI::CLI::OptionBase< CRTP >::ignore_case_ {false}
protected

Ignore the case when matching (option, not value)

Definition at line 4179 of file CLI11.h.

template<typename CRTP>
bool pxr_CLI::CLI::OptionBase< CRTP >::ignore_underscore_ {false}
protected

Ignore underscores when matching (option, not value)

Definition at line 4182 of file CLI11.h.

template<typename CRTP>
MultiOptionPolicy pxr_CLI::CLI::OptionBase< CRTP >::multi_option_policy_ {MultiOptionPolicy::Throw}
protected

Policy for handling multiple arguments beyond the expected Max.

Definition at line 4197 of file CLI11.h.

template<typename CRTP>
bool pxr_CLI::CLI::OptionBase< CRTP >::required_ {false}
protected

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: