HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CLI11.h File Reference
#include <functional>
#include <locale>
#include <cstdint>
#include <iomanip>
#include <memory>
#include <exception>
#include <stdexcept>
#include <string>
#include <vector>
#include <iterator>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <type_traits>
#include <limits>
#include <set>
#include <utility>
#include <map>
#include <iostream>
#include <numeric>
#include <fstream>
#include <tuple>
#include "pxr/pxr.h"
#include <sys/stat.h>
#include <sys/types.h>
+ Include dependency graph for CLI11.h:

Go to the source code of this file.

Classes

class  pxr_CLI::CLI::Error
 All errors derive from this one. More...
 
class  pxr_CLI::CLI::ConstructionError
 Construction errors (not in parsing) More...
 
class  pxr_CLI::CLI::IncorrectConstruction
 Thrown when an option is set to conflicting values (non-vector and multi args, for example) More...
 
class  pxr_CLI::CLI::BadNameString
 Thrown on construction of a bad name. More...
 
class  pxr_CLI::CLI::OptionAlreadyAdded
 Thrown when an option already exists. More...
 
class  pxr_CLI::CLI::ParseError
 Anything that can error in Parse. More...
 
class  pxr_CLI::CLI::Success
 This is a successful completion on parsing, supposed to exit. More...
 
class  pxr_CLI::CLI::CallForHelp
 -h or –help on command line More...
 
class  pxr_CLI::CLI::CallForAllHelp
 Usually something like –help-all on command line. More...
 
class  pxr_CLI::CLI::CallForVersion
 -v or –version on command line More...
 
class  pxr_CLI::CLI::RuntimeError
 Does not output a diagnostic in CLI11_PARSE, but allows main() to return with a specific error code. More...
 
class  pxr_CLI::CLI::FileError
 Thrown when parsing an INI file and it is missing. More...
 
class  pxr_CLI::CLI::ConversionError
 Thrown when conversion call back fails, such as when an int fails to coerce to a string. More...
 
class  pxr_CLI::CLI::ValidationError
 Thrown when validation of results fails. More...
 
class  pxr_CLI::CLI::RequiredError
 Thrown when a required option is missing. More...
 
class  pxr_CLI::CLI::ArgumentMismatch
 Thrown when the wrong number of arguments has been received. More...
 
class  pxr_CLI::CLI::RequiresError
 Thrown when a requires option is missing. More...
 
class  pxr_CLI::CLI::ExcludesError
 Thrown when an excludes option is present. More...
 
class  pxr_CLI::CLI::ExtrasError
 Thrown when too many positionals or options are found. More...
 
class  pxr_CLI::CLI::ConfigError
 Thrown when extra values are found in an INI file. More...
 
class  pxr_CLI::CLI::InvalidError
 Thrown when validation fails before parsing. More...
 
class  pxr_CLI::CLI::HorribleError
 
class  pxr_CLI::CLI::OptionNotFound
 Thrown when counting a non-existent option. More...
 
struct  pxr_CLI::CLI::make_void< Ts >
 A copy of std::void_t from C++17 (helper for C++11 and C++14) More...
 
struct  pxr_CLI::CLI::is_bool< T >
 Check to see if something is bool (fail check by default) More...
 
struct  pxr_CLI::CLI::is_bool< bool >
 Check to see if something is bool (true if actually a bool) More...
 
struct  pxr_CLI::CLI::is_shared_ptr< T >
 Check to see if something is a shared pointer. More...
 
struct  pxr_CLI::CLI::is_shared_ptr< std::shared_ptr< T > >
 Check to see if something is a shared pointer (True if really a shared pointer) More...
 
struct  pxr_CLI::CLI::is_shared_ptr< const std::shared_ptr< T > >
 Check to see if something is a shared pointer (True if really a shared pointer) More...
 
struct  pxr_CLI::CLI::is_copyable_ptr< T >
 Check to see if something is copyable pointer. More...
 
struct  pxr_CLI::CLI::IsMemberType< T >
 This can be specialized to override the type deduction for IsMember. More...
 
struct  pxr_CLI::CLI::IsMemberType< const char * >
 The main custom type needed here is const char * should be a string. More...
 
struct  pxr_CLI::CLI::detail::element_type< T, Enable >
 not a pointer More...
 
struct  pxr_CLI::CLI::detail::element_type< T, typename std::enable_if< is_copyable_ptr< T >::value >::type >
 
struct  pxr_CLI::CLI::detail::element_value_type< T >
 
struct  pxr_CLI::CLI::detail::pair_adaptor< T, _ >
 Adaptor for set-like structure: This just wraps a normal container in a few utilities that do almost nothing. More...
 
struct  pxr_CLI::CLI::detail::pair_adaptor< T, conditional_t< false, void_t< typename T::value_type::first_type, typename T::value_type::second_type >, void > >
 
class  pxr_CLI::CLI::detail::is_direct_constructible< T, C >
 
class  pxr_CLI::CLI::detail::is_ostreamable< T, S >
 
class  pxr_CLI::CLI::detail::is_istreamable< T, S >
 Check for input streamability. More...
 
class  pxr_CLI::CLI::detail::is_complex< T >
 Check for complex. More...
 
struct  pxr_CLI::CLI::detail::is_mutable_container< T, _ >
 
struct  pxr_CLI::CLI::detail::is_mutable_container< T, conditional_t< false, void_t< typename T::value_type, decltype(std::declval< T >().end()), decltype(std::declval< T >().clear()), decltype(std::declval< T >().insert(std::declval< decltype(std::declval< T >().end())>(), std::declval< const typename T::value_type & >()))>, void > >
 
struct  pxr_CLI::CLI::detail::is_readable_container< T, _ >
 
struct  pxr_CLI::CLI::detail::is_readable_container< T, conditional_t< false, void_t< decltype(std::declval< T >().end()), decltype(std::declval< T >().begin())>, void > >
 
struct  pxr_CLI::CLI::detail::is_wrapper< T, _ >
 
struct  pxr_CLI::CLI::detail::is_wrapper< T, conditional_t< false, void_t< typename T::value_type >, void > >
 
class  pxr_CLI::CLI::detail::is_tuple_like< S >
 
struct  pxr_CLI::CLI::detail::wrapped_type< T, def, Enable >
 template to get the underlying value type if it exists or use a default More...
 
struct  pxr_CLI::CLI::detail::wrapped_type< T, def, typename std::enable_if< is_wrapper< T >::value >::type >
 Type size for regular object types that do not look like a tuple. More...
 
struct  pxr_CLI::CLI::detail::type_count_base< T, Enable >
 This will only trigger for actual void type. More...
 
struct  pxr_CLI::CLI::detail::type_count_base< T, typename std::enable_if<!is_tuple_like< T >::value &&!is_mutable_container< T >::value &&!std::is_void< T >::value >::type >
 Type size for regular object types that do not look like a tuple. More...
 
struct  pxr_CLI::CLI::detail::type_count_base< T, typename std::enable_if< is_tuple_like< T >::value &&!is_mutable_container< T >::value >::type >
 the base tuple size More...
 
struct  pxr_CLI::CLI::detail::type_count_base< T, typename std::enable_if< is_mutable_container< T >::value >::type >
 Type count base for containers is the type_count_base of the individual element. More...
 
struct  pxr_CLI::CLI::detail::subtype_count< T >
 Set of overloads to get the type size of an object. More...
 
struct  pxr_CLI::CLI::detail::subtype_count_min< T >
 forward declare the subtype_count_min structure More...
 
struct  pxr_CLI::CLI::detail::type_count< T, Enable >
 This will only trigger for actual void type. More...
 
struct  pxr_CLI::CLI::detail::type_count< T, typename std::enable_if<!is_wrapper< T >::value &&!is_tuple_like< T >::value &&!is_complex< T >::value &&!std::is_void< T >::value >::type >
 Type size for regular object types that do not look like a tuple. More...
 
struct  pxr_CLI::CLI::detail::type_count< T, typename std::enable_if< is_complex< T >::value >::type >
 Type size for complex since it sometimes looks like a wrapper. More...
 
struct  pxr_CLI::CLI::detail::type_count< T, typename std::enable_if< is_mutable_container< T >::value >::type >
 Type size of types that are wrappers,except complex and tuples(which can also be wrappers sometimes) More...
 
struct  pxr_CLI::CLI::detail::type_count< T, typename std::enable_if< is_wrapper< T >::value &&!is_complex< T >::value &&!is_tuple_like< T >::value &&!is_mutable_container< T >::value >::type >
 Type size of types that are wrappers,except containers complex and tuples(which can also be wrappers sometimes) More...
 
struct  pxr_CLI::CLI::ConfigItem
 Holds values to load into Options. More...
 
class  pxr_CLI::CLI::Config
 This class provides a converter for configuration files. More...
 
class  pxr_CLI::CLI::ConfigBase
 This converter works with INI/TOML files; to write INI files use ConfigINI. More...
 
class  pxr_CLI::CLI::ConfigINI
 ConfigINI generates a "standard" INI compliant output. More...
 
class  pxr_CLI::CLI::Validator
 Some validators that are provided. More...
 
class  pxr_CLI::CLI::CustomValidator
 Class wrapping some of the accessors of Validator. More...
 
class  pxr_CLI::CLI::detail::ExistingFileValidator
 Check for an existing file (returns error message if check fails) More...
 
class  pxr_CLI::CLI::detail::ExistingDirectoryValidator
 Check for an existing directory (returns error message if check fails) More...
 
class  pxr_CLI::CLI::detail::ExistingPathValidator
 Check for an existing path. More...
 
class  pxr_CLI::CLI::detail::NonexistentPathValidator
 Check for an non-existing path. More...
 
class  pxr_CLI::CLI::detail::IPV4Validator
 Validate the given string is a legal ipv4 address. More...
 
class  pxr_CLI::CLI::TypeValidator< DesiredType >
 Validate the input as a particular type. More...
 
class  pxr_CLI::CLI::FileOnDefaultPath
 
class  pxr_CLI::CLI::Range
 Produce a range (factory). Min and max are inclusive. More...
 
class  pxr_CLI::CLI::Bound
 Produce a bounded range (factory). Min and max are inclusive. More...
 
struct  pxr_CLI::CLI::detail::has_find< C, V >
 
class  pxr_CLI::CLI::IsMember
 Verify items are in a set. More...
 
class  pxr_CLI::CLI::Transformer
 Translate named items to other or a value set. More...
 
class  pxr_CLI::CLI::CheckedTransformer
 translate named items to other or a value set More...
 
class  pxr_CLI::CLI::AsNumberWithUnit
 
class  pxr_CLI::CLI::AsSizeValue
 
class  pxr_CLI::CLI::FormatterBase
 
class  pxr_CLI::CLI::FormatterLambda
 This is a specialty override for lambda functions. More...
 
class  pxr_CLI::CLI::Formatter
 
class  pxr_CLI::CLI::OptionBase< CRTP >
 
class  pxr_CLI::CLI::OptionDefaults
 
class  pxr_CLI::CLI::Option
 
class  pxr_CLI::CLI::App
 Creates a command line program, with very few defaults. More...
 
class  pxr_CLI::CLI::Option_group
 Extension of App to better manage groups of options. More...
 
struct  pxr_CLI::CLI::detail::AppFriend
 This class is simply to allow tests access to App's protected functions. More...
 

Namespaces

 pxr_CLI
 
 pxr_CLI::CLI
 
 pxr_CLI::CLI::enums
 
 pxr_CLI::CLI::detail
 
 pxr_CLI::CLI::FailureMessage
 

Macros

#define PXR_CLI11_H
 
#define CLI11_VERSION_MAJOR   2
 
#define CLI11_VERSION_MINOR   3
 
#define CLI11_VERSION_PATCH   1
 
#define CLI11_VERSION   "2.3.1"
 
#define CLI11_DEPRECATED(reason)   __attribute__((deprecated(reason)))
 
#define CLI11_NODISCARD
 
#define CLI11_USE_STATIC_RTTI   1
 
#define CLI11_INLINE   inline
 
#define CLI11_ERROR_DEF(parent, name)
 
#define CLI11_ERROR_SIMPLE(name)   explicit name(std::string msg) : name(#name, msg, ExitCodes::name) {}
 
#define CLI11_PARSE(app, argc, argv)
 

Typedefs

template<bool B, class T = void>
using pxr_CLI::CLI::enable_if_t = typename std::enable_if< B, T >::type
 
template<typename... Ts>
using pxr_CLI::CLI::void_t = typename make_void< Ts...>::type
 A copy of std::void_t from C++17 - same reasoning as enable_if_t, it does not hurt to redefine. More...
 
template<bool B, class T , class F >
using pxr_CLI::CLI::conditional_t = typename std::conditional< B, T, F >::type
 A copy of std::conditional_t from C++14 - same reasoning as enable_if_t, it does not hurt to redefine. More...
 
using pxr_CLI::CLI::ConfigTOML = ConfigBase
 the default Config is the TOML file format More...
 
using pxr_CLI::CLI::results_t = std::vector< std::string >
 
using pxr_CLI::CLI::callback_t = std::function< bool(const results_t &)>
 callback function definition More...
 
using pxr_CLI::CLI::Option_p = std::unique_ptr< Option >
 
using pxr_CLI::CLI::App_p = std::shared_ptr< App >
 

Enumerations

enum  pxr_CLI::CLI::ExitCodes {
  pxr_CLI::CLI::ExitCodes::Success = 0, pxr_CLI::CLI::ExitCodes::IncorrectConstruction = 100, pxr_CLI::CLI::ExitCodes::BadNameString, pxr_CLI::CLI::ExitCodes::OptionAlreadyAdded,
  pxr_CLI::CLI::ExitCodes::FileError, pxr_CLI::CLI::ExitCodes::ConversionError, pxr_CLI::CLI::ExitCodes::ValidationError, pxr_CLI::CLI::ExitCodes::RequiredError,
  pxr_CLI::CLI::ExitCodes::RequiresError, pxr_CLI::CLI::ExitCodes::ExcludesError, pxr_CLI::CLI::ExitCodes::ExtrasError, pxr_CLI::CLI::ExitCodes::ConfigError,
  pxr_CLI::CLI::ExitCodes::InvalidError, pxr_CLI::CLI::ExitCodes::HorribleError, pxr_CLI::CLI::ExitCodes::OptionNotFound, pxr_CLI::CLI::ExitCodes::ArgumentMismatch,
  pxr_CLI::CLI::ExitCodes::BaseClass = 127
}
 
enum  pxr_CLI::CLI::detail::enabler
 Simple empty scoped class. More...
 
enum  pxr_CLI::CLI::detail::path_type { pxr_CLI::CLI::detail::path_type::nonexistent, pxr_CLI::CLI::detail::path_type::file, pxr_CLI::CLI::detail::path_type::directory }
 CLI enumeration of different file types. More...
 
enum  pxr_CLI::CLI::AppFormatMode { pxr_CLI::CLI::AppFormatMode::Normal, pxr_CLI::CLI::AppFormatMode::All, pxr_CLI::CLI::AppFormatMode::Sub }
 
enum  pxr_CLI::CLI::MultiOptionPolicy : char {
  pxr_CLI::CLI::MultiOptionPolicy::Throw, pxr_CLI::CLI::MultiOptionPolicy::TakeLast, pxr_CLI::CLI::MultiOptionPolicy::TakeFirst, pxr_CLI::CLI::MultiOptionPolicy::Join,
  pxr_CLI::CLI::MultiOptionPolicy::TakeAll, pxr_CLI::CLI::MultiOptionPolicy::Sum
}
 Enumeration of the multiOption Policy selection. More...
 
enum  pxr_CLI::CLI::detail::Classifier {
  pxr_CLI::CLI::detail::Classifier::NONE, pxr_CLI::CLI::detail::Classifier::POSITIONAL_MARK, pxr_CLI::CLI::detail::Classifier::SHORT, pxr_CLI::CLI::detail::Classifier::LONG,
  pxr_CLI::CLI::detail::Classifier::WINDOWS_STYLE, pxr_CLI::CLI::detail::Classifier::SUBCOMMAND, pxr_CLI::CLI::detail::Classifier::SUBCOMMAND_TERMINATOR
}
 
enum  pxr_CLI::CLI::config_extras_mode : char { pxr_CLI::CLI::config_extras_mode::error = 0, pxr_CLI::CLI::config_extras_mode::ignore, pxr_CLI::CLI::config_extras_mode::ignore_all, pxr_CLI::CLI::config_extras_mode::capture }
 enumeration of modes of how to deal with extras in config files More...
 

Functions

template<typename T , typename = typename std::enable_if<std::is_enum<T>::value>::type>
std::ostream & pxr_CLI::CLI::enums::operator<< (std::ostream &in, const T &item)
 output streaming for enumerations More...
 
CLI11_INLINE std::vector
< std::string
pxr_CLI::CLI::detail::split (const std::string &s, char delim)
 Split a string by a delim. More...
 
template<typename T >
std::string pxr_CLI::CLI::detail::join (const T &v, std::string delim=",")
 Simple function to join a string. More...
 
template<typename T , typename Callable , typename = typename std::enable_if<!std::is_constructible<std::string, Callable>::value>::type>
std::string pxr_CLI::CLI::detail::join (const T &v, Callable func, std::string delim=",")
 Simple function to join a string from processed elements. More...
 
template<typename T >
std::string pxr_CLI::CLI::detail::rjoin (const T &v, std::string delim=",")
 Join a string in reverse order. More...
 
CLI11_INLINE std::stringpxr_CLI::CLI::detail::ltrim (std::string &str)
 Trim whitespace from left of string. More...
 
CLI11_INLINE std::stringpxr_CLI::CLI::detail::ltrim (std::string &str, const std::string &filter)
 Trim anything from left of string. More...
 
CLI11_INLINE std::stringpxr_CLI::CLI::detail::rtrim (std::string &str)
 Trim whitespace from right of string. More...
 
CLI11_INLINE std::stringpxr_CLI::CLI::detail::rtrim (std::string &str, const std::string &filter)
 Trim anything from right of string. More...
 
std::stringpxr_CLI::CLI::detail::trim (std::string &str)
 Trim whitespace from string. More...
 
std::stringpxr_CLI::CLI::detail::trim (std::string &str, const std::string filter)
 Trim anything from string. More...
 
std::string pxr_CLI::CLI::detail::trim_copy (const std::string &str)
 Make a copy of the string and then trim it. More...
 
CLI11_INLINE std::stringpxr_CLI::CLI::detail::remove_quotes (std::string &str)
 remove quotes at the front and back of a string either '"' or '\'' More...
 
CLI11_INLINE std::string pxr_CLI::CLI::detail::fix_newlines (const std::string &leader, std::string input)
 
std::string pxr_CLI::CLI::detail::trim_copy (const std::string &str, const std::string &filter)
 Make a copy of the string and then trim it, any filter string can be used (any char in string is filtered) More...
 
CLI11_INLINE std::ostream & pxr_CLI::CLI::detail::format_help (std::ostream &out, std::string name, const std::string &description, std::size_t wid)
 Print a two part "help" string. More...
 
CLI11_INLINE std::ostream & pxr_CLI::CLI::detail::format_aliases (std::ostream &out, const std::vector< std::string > &aliases, std::size_t wid)
 Print subcommand aliases. More...
 
template<typename T >
bool pxr_CLI::CLI::detail::valid_first_char (T c)
 
template<typename T >
bool pxr_CLI::CLI::detail::valid_later_char (T c)
 Verify following characters of an option. More...
 
CLI11_INLINE bool pxr_CLI::CLI::detail::valid_name_string (const std::string &str)
 Verify an option/subcommand name. More...
 
bool pxr_CLI::CLI::detail::valid_alias_name_string (const std::string &str)
 Verify an app name. More...
 
bool pxr_CLI::CLI::detail::is_separator (const std::string &str)
 check if a string is a container segment separator (empty or "%%") More...
 
bool pxr_CLI::CLI::detail::isalpha (const std::string &str)
 Verify that str consists of letters only. More...
 
std::string pxr_CLI::CLI::detail::to_lower (std::string str)
 Return a lower case version of a string. More...
 
std::string pxr_CLI::CLI::detail::remove_underscore (std::string str)
 remove underscores from a string More...
 
CLI11_INLINE std::string pxr_CLI::CLI::detail::find_and_replace (std::string str, std::string from, std::string to)
 Find and replace a substring with another substring. More...
 
bool pxr_CLI::CLI::detail::has_default_flag_values (const std::string &flags)
 check if the flag definitions has possible false flags More...
 
CLI11_INLINE void pxr_CLI::CLI::detail::remove_default_flag_values (std::string &flags)
 
CLI11_INLINE std::ptrdiff_t pxr_CLI::CLI::detail::find_member (std::string name, const std::vector< std::string > names, bool ignore_case=false, bool ignore_underscore=false)
 Check if a string is a member of a list of strings and optionally ignore case or ignore underscores. More...
 
template<typename Callable >
std::string pxr_CLI::CLI::detail::find_and_modify (std::string str, std::string trigger, Callable modify)
 
CLI11_INLINE std::vector
< std::string
pxr_CLI::CLI::detail::split_up (std::string str, char delimiter= '\0')
 
CLI11_INLINE std::size_t pxr_CLI::CLI::detail::escape_detect (std::string &str, std::size_t offset)
 
CLI11_INLINE std::stringpxr_CLI::CLI::detail::add_quotes_if_needed (std::string &str)
 Add quotes if the string contains spaces. More...
 
template<typename T , enable_if_t< is_istreamable< T >::value, detail::enabler > = detail::dummy>
bool pxr_CLI::CLI::detail::from_stream (const std::string &istring, T &obj)
 Templated operation to get a value from a stream. More...
 
template<typename T , enable_if_t< std::is_convertible< T, std::string >::value, detail::enabler > = detail::dummy>
auto pxr_CLI::CLI::detail::to_string (T &&value) -> decltype(std::forward< T >(value))
 Convert an object to a string (directly forward if this can become a string) More...
 
template<typename T , enable_if_t< std::is_constructible< std::string, T >::value &&!std::is_convertible< T, std::string >::value, detail::enabler > = detail::dummy>
std::string pxr_CLI::CLI::detail::to_string (const T &value)
 Construct a string from the object. More...
 
template<typename T , enable_if_t<!std::is_convertible< std::string, T >::value &&!std::is_constructible< std::string, T >::value &&is_ostreamable< T >::value, detail::enabler > = detail::dummy>
std::string pxr_CLI::CLI::detail::to_string (T &&value)
 Convert an object to a string (streaming must be supported for that type) More...
 
template<typename T1 , typename T2 , typename T , enable_if_t< std::is_same< T1, T2 >::value, detail::enabler > = detail::dummy>
auto pxr_CLI::CLI::detail::checked_to_string (T &&value) -> decltype(to_string(std::forward< T >(value)))
 special template overload More...
 
template<typename T1 , typename T2 , typename T , enable_if_t<!std::is_same< T1, T2 >::value, detail::enabler > = detail::dummy>
std::string pxr_CLI::CLI::detail::checked_to_string (T &&)
 special template overload More...
 
template<typename T , enable_if_t< std::is_arithmetic< T >::value, detail::enabler > = detail::dummy>
std::string pxr_CLI::CLI::detail::value_string (const T &value)
 get a string as a convertible value for arithmetic types More...
 
template<typename T , enable_if_t<!std::is_enum< T >::value &&!std::is_arithmetic< T >::value, detail::enabler > = detail::dummy>
auto pxr_CLI::CLI::detail::value_string (const T &value) -> decltype(to_string(value))
 for other types just use the regular to_string function More...
 
template<typename T , std::size_t I>
constexpr std::enable_if< I==type_count_base
< T >::value, int >::type 
pxr_CLI::CLI::detail::tuple_type_size ()
 0 if the index > tuple size More...
 
template<typename T , std::size_t I>
constexpr std::enable_if< I
< type_count_base< T >::value,
int >::type tuple_type_size(){return
subtype_count< typename
std::tuple_element< I, T >
::type >::value+tuple_type_size
< T, I+1 >);}template
< typename T > struct
type_count< T, typename
std::enable_if< is_tuple_like
< T >::value >::type >{static
constexpr int value{tuple_type_size
< T, 0 >)};};template
< typename T > struct
subtype_count{static constexpr
int value{is_mutable_container
< T >::value?expected_max_vector_size:type_count
< T >::value};};template
< typename T, typename Enable=void >
struct type_count_min{static
const int value{0};};template
< typename T >struct
type_count_min< T, typename
std::enable_if
<!is_mutable_container< T >
::value &&!is_tuple_like< T >
::value &&!is_wrapper< T >
::value &&!is_complex< T >
::value &&!std::is_void< T >
::value >::type >{static
constexpr int value{type_count
< T >::value};};template
< typename T > struct
type_count_min< T, typename
std::enable_if< is_complex< T >
::value >::type >{static
constexpr int value{1};};template
< typename T >struct
type_count_min< T, typename
std::enable_if< is_wrapper< T >
::value &&!is_complex< T >
::value &&!is_tuple_like< T >
::value >::type >{static
constexpr int value{subtype_count_min
< typename T::value_type >
::value};};template< typename
T, std::size_t I >constexpr
typename std::enable_if< I==type_count_base
< T >::value, int >::type
tuple_type_size_min(){return
0;}template< typename T,
std::size_t I > constexpr
typename std::enable_if< I
< type_count_base< T >::value,
int >::type
tuple_type_size_min(){return
subtype_count_min< typename
std::tuple_element< I, T >
::type >::value+tuple_type_size_min
< T, I+1 >);}template
< typename T > struct
type_count_min< T, typename
std::enable_if< is_tuple_like
< T >::value >::type >{static
constexpr int value{tuple_type_size_min
< T, 0 >)};};template
< typename T > struct
subtype_count_min{static
constexpr int value{is_mutable_container
< T >::value?((type_count< T >
::value
< expected_max_vector_size)?type_count
< T >::value:0):type_count_min
< T >::value};};template
< typename T, typename Enable=void >
struct expected_count{static
const int value{0};};template
< typename T >struct
expected_count< T, typename
std::enable_if
<!is_mutable_container< T >
::value &&!is_wrapper< T >
::value &&!std::is_void< T >
::value >::type >{static
constexpr int value{1};};template
< typename T > struct
expected_count< T, typename
std::enable_if
< is_mutable_container< T >
::value >::type >{static
constexpr int value{expected_max_vector_size};};template
< typename T >struct
expected_count< T, typename
std::enable_if
<!is_mutable_container< T >
::value &&is_wrapper< T >
::value >::type >{static
constexpr int value{expected_count
< typename T::value_type >
::value};};enum class
object_category:int{char_value=1,
integral_value=2,
unsigned_integral=4,
enumeration=6, boolean_value=8,
floating_point=10,
number_constructible=12,
double_constructible=14,
integer_constructible=16,
string_assignable=23,
string_constructible=24, other=45,
wrapper_value=50,
complex_number=60, tuple_value=70,
container_value=80,};template
< typename T, typename Enable=void >
struct classify_object{static
constexpr object_category
value{object_category::other};};template
< typename T >struct
classify_object< T, typename
std::enable_if
< std::is_integral< T >::value
&&!std::is_same< T, char >
::value &&std::is_signed< T >
::value &&!is_bool< T >::value
&&!std::is_enum< T >::value >
::type >{static constexpr
object_category value{object_category::integral_value};};template
< typename T >struct
classify_object< T, typename
std::enable_if
< std::is_integral< T >::value
&&std::is_unsigned< T >::value
&&!std::is_same< T, char >
::value &&!is_bool< T >::value >
::type >{static constexpr
object_category value{object_category::unsigned_integral};};template
< typename T >struct
classify_object< T, typename
std::enable_if< std::is_same
< T, char >::value
&&!std::is_enum< T >::value >
::type >{static constexpr
object_category value{object_category::char_value};};template
< typename T > struct
classify_object< T, typename
std::enable_if< is_bool< T >
::value >::type >{static
constexpr object_category
value{object_category::boolean_value};};template
< typename T > struct
classify_object< T, typename
std::enable_if
< std::is_floating_point< T >
::value >::type >{static
constexpr object_category
value{object_category::floating_point};};template
< typename T >struct
classify_object< T, typename
std::enable_if
<!std::is_floating_point< T >
::value &&!std::is_integral< T >
::value &&std::is_assignable
< T &, std::string >::value >
::type >{static constexpr
object_category value{object_category::string_assignable};};template
< typename T >struct
classify_object< T, typename
std::enable_if
<!std::is_floating_point< T >
::value &&!std::is_integral< T >
::value &&!std::is_assignable
< T &, std::string >::value
&&(type_count< T >::value==1)&&std::is_constructible
< T, std::string >::value >
::type >{static constexpr
object_category value{object_category::string_constructible};};template
< typename T > struct
classify_object< T, typename
std::enable_if< std::is_enum
< T >::value >::type >{static
constexpr object_category
value{object_category::enumeration};};template
< typename T > struct
classify_object< T, typename
std::enable_if< is_complex< T >
::value >::type >{static
constexpr object_category
value{object_category::complex_number};};template
< typename T > struct
uncommon_type{using type=typename
std::conditional
<!std::is_floating_point< T >
::value &&!std::is_integral< T >
::value &&!std::is_assignable
< T &, std::string >::value
&&!std::is_constructible< T,
std::string >::value
&&!is_complex< T >::value
&&!is_mutable_container< T >
::value &&!std::is_enum< T >
::value, std::true_type,
std::false_type >::type;static
constexpr bool value=type::value;};template
< typename T >struct
classify_object< T, typename
std::enable_if
<(!is_mutable_container< T >
::value &&is_wrapper< T >
::value &&!is_tuple_like< T >
::value &&uncommon_type< T >
::value)>::type >{static
constexpr object_category
value{object_category::wrapper_value};};template
< typename T >struct
classify_object< T, typename
std::enable_if< uncommon_type
< T >::value &&type_count< T >
::value==1 &&!is_wrapper< T >
::value
&&is_direct_constructible< T,
double >::value
&&is_direct_constructible< T,
int >::value >::type >{static
constexpr object_category
value{object_category::number_constructible};};template
< typename T >struct
classify_object< T, typename
std::enable_if< uncommon_type
< T >::value &&type_count< T >
::value==1 &&!is_wrapper< T >
::value
&&!is_direct_constructible< T,
double >::value
&&is_direct_constructible< T,
int >::value >::type >{static
constexpr object_category
value{object_category::integer_constructible};};template
< typename T >struct
classify_object< T, typename
std::enable_if< uncommon_type
< T >::value &&type_count< T >
::value==1 &&!is_wrapper< T >
::value
&&is_direct_constructible< T,
double >::value
&&!is_direct_constructible< T,
int >::value >::type >{static
constexpr object_category
value{object_category::double_constructible};};template
< typename T >struct
classify_object< T, typename
std::enable_if< is_tuple_like
< T >::value &&((type_count< T >
::value >=2 &&!is_wrapper< T >
::value)||(uncommon_type< T >
::value
&&!is_direct_constructible< T,
double >::value
&&!is_direct_constructible< T,
int >::value)||(uncommon_type
< T >::value &&type_count< T >
::value >=2))>::type >{static
constexpr object_category
value{object_category::tuple_value};};template
< typename T > struct
classify_object< T, typename
std::enable_if
< is_mutable_container< T >
::value >::type >{static
constexpr object_category
value{object_category::container_value};};template
< typename T, enable_if_t
< classify_object< T >::value==object_category::char_value,
detail::enabler >
=detail::dummy >constexpr
const char *type_name(){return"CHAR";}template
< typename T, enable_if_t
< classify_object< T >::value==object_category::integral_value||classify_object
< T >::value==object_category::integer_constructible,
detail::enabler >
=detail::dummy >constexpr
const char *type_name(){return"INT";}template
< typename T, enable_if_t
< classify_object< T >::value==object_category::unsigned_integral,
detail::enabler >
=detail::dummy >constexpr
const char *type_name(){return"UINT";}template
< typename T, enable_if_t
< classify_object< T >::value==object_category::floating_point||classify_object
< T >::value==object_category::number_constructible||classify_object
< T >::value==object_category::double_constructible,
detail::enabler >
=detail::dummy >constexpr
const char *type_name(){return"FLOAT";}template
< typename T, enable_if_t
< classify_object< T >::value==object_category::enumeration,
detail::enabler >
=detail::dummy >constexpr
const char *type_name(){return"ENUM";}template
< typename T, enable_if_t
< classify_object< T >::value==object_category::boolean_value,
detail::enabler >
=detail::dummy >constexpr
const char *type_name(){return"BOOLEAN";}template
< typename T, enable_if_t
< classify_object< T >::value==object_category::complex_number,
detail::enabler >
=detail::dummy >constexpr
const char *type_name(){return"COMPLEX";}template
< typename T, enable_if_t
< classify_object< T >::value >
=object_category::string_assignable
&&classify_object< T >::value
<=object_category::other,
detail::enabler >
=detail::dummy >constexpr
const char *type_name(){return"TEXT";}template
< typename T, enable_if_t
< classify_object< T >::value==object_category::tuple_value
&&type_count_base< T >::value >
=2, detail::enabler >
=detail::dummy >std::string
type_name();template< typename
T, enable_if_t
< classify_object< T >::value==object_category::container_value||classify_object
< T >::value==object_category::wrapper_value,
detail::enabler >
=detail::dummy >std::string
type_name();template< typename
T, enable_if_t
< classify_object< T >::value==object_category::tuple_value
&&type_count_base< T >::value==1,
detail::enabler >
=detail::dummy >inline
std::string type_name(){return
type_name< typename std::decay
< typename std::tuple_element
< 0, T >::type >::type >
);}template< typename T,
std::size_t I >inline typename
std::enable_if< I==type_count_base
< T >::value, std::string >
::type tuple_name(){return
std::string{};}template
< typename T, std::size_t I >
inline typename std::enable_if
<(I< type_count_base< T >
::value), std::string >::type
tuple_name(){auto str=std::string{type_name
< typename std::decay
< typename std::tuple_element
< I, T >::type >::type >
)}+ ','+tuple_name< T, I+1 >
);if(str.back()==
',') str.pop_back();return str;}template
< typename T, enable_if_t
< classify_object< T >::value==object_category::tuple_value
&&type_count_base< T >::value >
=2, detail::enabler >
> std::string 
pxr_CLI::CLI::detail::type_name ()
 Recursively generate the tuple type name. More...
 
template<typename T , enable_if_t< classify_object< T >::value==object_category::container_value||classify_object< T >::value==object_category::wrapper_value, detail::enabler > >
std::string pxr_CLI::CLI::detail::type_name ()
 get the type name for a type that has a value_type member More...
 
template<typename T , enable_if_t< std::is_unsigned< T >::value, detail::enabler > = detail::dummy>
bool pxr_CLI::CLI::detail::integral_conversion (const std::string &input, T &output) noexcept
 Convert to an unsigned integral. More...
 
std::int64_t pxr_CLI::CLI::detail::to_flag_value (std::string val)
 Convert a flag into an integer value typically binary flags. More...
 
template<typename T , enable_if_t< classify_object< T >::value==object_category::integral_value||classify_object< T >::value==object_category::unsigned_integral, detail::enabler > = detail::dummy>
bool pxr_CLI::CLI::detail::lexical_cast (const std::string &input, T &output)
 Integer conversion. More...
 
template<typename AssignTo , typename ConvertTo , enable_if_t< std::is_same< AssignTo, ConvertTo >::value &&(classify_object< AssignTo >::value==object_category::string_assignable||classify_object< AssignTo >::value==object_category::string_constructible), detail::enabler > = detail::dummy>
bool pxr_CLI::CLI::detail::lexical_assign (const std::string &input, AssignTo &output)
 Assign a value through lexical cast operations. More...
 
CLI11_INLINE bool pxr_CLI::CLI::detail::split_short (const std::string &current, std::string &name, std::string &rest)
 
CLI11_INLINE bool pxr_CLI::CLI::detail::split_long (const std::string &current, std::string &name, std::string &value)
 
CLI11_INLINE bool pxr_CLI::CLI::detail::split_windows_style (const std::string &current, std::string &name, std::string &value)
 
CLI11_INLINE std::vector
< std::string
pxr_CLI::CLI::detail::split_names (std::string current)
 
CLI11_INLINE std::vector
< std::pair< std::string,
std::string > > 
pxr_CLI::CLI::detail::get_default_flag_values (const std::string &str)
 extract default flag values either {def} or starting with a ! More...
 
CLI11_INLINE std::tuple
< std::vector< std::string >
, std::vector< std::string >
, std::string
pxr_CLI::CLI::detail::get_names (const std::vector< std::string > &input)
 Get a vector of short names, one of long names, and a single name. More...
 
CLI11_INLINE path_type pxr_CLI::CLI::detail::check_path (const char *file) noexcept
 get the type of the path from a file name More...
 
template<typename T , enable_if_t< is_copyable_ptr< typename std::remove_reference< T >::type >::value, detail::enabler > = detail::dummy>
auto pxr_CLI::CLI::detail::smart_deref (T value) -> decltype(*value)
 
template<typename T , enable_if_t<!is_copyable_ptr< typename std::remove_reference< T >::type >::value, detail::enabler > = detail::dummy>
std::remove_reference< T >::typepxr_CLI::CLI::detail::smart_deref (T &value)
 
template<typename T >
std::string pxr_CLI::CLI::detail::generate_set (const T &set)
 Generate a string representation of a set. More...
 
template<typename T >
std::string pxr_CLI::CLI::detail::generate_map (const T &map, bool key_only=false)
 Generate a string representation of a map. More...
 
template<typename T , typename V , enable_if_t<!has_find< T, V >::value, detail::enabler > = detail::dummy>
auto pxr_CLI::CLI::detail::search (const T &set, const V &val) -> std::pair< bool, decltype(std::begin(detail::smart_deref(set)))>
 A search function. More...
 
template<typename T , typename V >
auto pxr_CLI::CLI::detail::search (const T &set, const V &val, const std::function< V(V)> &filter_function) -> std::pair< bool, decltype(std::begin(detail::smart_deref(set)))>
 A search function with a filter function. More...
 
template<typename T >
std::enable_if< std::is_signed
< T >::value, T >::type 
pxr_CLI::CLI::detail::overflowCheck (const T &a, const T &b)
 Do a check for overflow on signed numbers. More...
 
template<typename T >
std::enable_if<!std::is_signed
< T >::value, T >::type 
pxr_CLI::CLI::detail::overflowCheck (const T &a, const T &b)
 Do a check for overflow on unsigned numbers. More...
 
template<typename T >
std::enable_if
< std::is_integral< T >::value,
bool >::type 
pxr_CLI::CLI::detail::checked_multiply (T &a, T b)
 Performs a *= b; if it doesn't cause integer overflow. Returns false otherwise. More...
 
template<typename T >
std::enable_if
< std::is_floating_point< T >
::value, bool >::type 
pxr_CLI::CLI::detail::checked_multiply (T &a, T b)
 Performs a *= b; if it doesn't equal infinity. Returns false otherwise. More...
 
CLI11_INLINE std::pair
< std::string, std::string
pxr_CLI::CLI::detail::split_program_name (std::string commandline)
 
std::string pxr_CLI::CLI::FailureMessage::simple (const App *app, const Error &e)
 Printout a clean, simple message on error (the default in CLI11 1.5+) More...
 
std::string pxr_CLI::CLI::FailureMessage::help (const App *app, const Error &e)
 Printout the full help string on error (if this fn is set, the old default for CLI11) More...
 
template<typename T >
Option * pxr_CLI::CLI::detail::default_flag_modifiers (Option *opt)
 helper functions for adding in appropriate flag modifiers for add_flag More...
 
template<typename T , enable_if_t< std::is_integral< T >::value &&(sizeof(T) > 1U>
Option * pxr_CLI::CLI::detail::default_flag_modifiers (Option *opt)
 summing modifiers More...
 
CLI11_INLINE void pxr_CLI::CLI::TriggerOn (App *trigger_app, App *app_to_enable)
 Helper function to enable one option group/subcommand when another is used. More...
 
CLI11_INLINE void pxr_CLI::CLI::TriggerOn (App *trigger_app, std::vector< App * > apps_to_enable)
 Helper function to enable one option group/subcommand when another is used. More...
 
CLI11_INLINE void pxr_CLI::CLI::TriggerOff (App *trigger_app, App *app_to_enable)
 Helper function to disable one option group/subcommand when another is used. More...
 
CLI11_INLINE void pxr_CLI::CLI::TriggerOff (App *trigger_app, std::vector< App * > apps_to_enable)
 Helper function to disable one option group/subcommand when another is used. More...
 
CLI11_INLINE void pxr_CLI::CLI::deprecate_option (Option *opt, const std::string &replacement="")
 Helper function to mark an option as deprecated. More...
 
void pxr_CLI::CLI::deprecate_option (App *app, const std::string &option_name, const std::string &replacement="")
 Helper function to mark an option as deprecated. More...
 
void pxr_CLI::CLI::deprecate_option (App &app, const std::string &option_name, const std::string &replacement="")
 Helper function to mark an option as deprecated. More...
 
CLI11_INLINE void pxr_CLI::CLI::retire_option (App *app, Option *opt)
 Helper function to mark an option as retired. More...
 
CLI11_INLINE void pxr_CLI::CLI::retire_option (App &app, Option *opt)
 Helper function to mark an option as retired. More...
 
CLI11_INLINE void pxr_CLI::CLI::retire_option (App *app, const std::string &option_name)
 Helper function to mark an option as retired. More...
 
CLI11_INLINE void pxr_CLI::CLI::retire_option (App &app, const std::string &option_name)
 Helper function to mark an option as retired. More...
 
std::string pxr_CLI::CLI::detail::convert_arg_for_ini (const std::string &arg, char stringQuote= '"', char characterQuote = '\'')
 
std::string pxr_CLI::CLI::detail::ini_join (const std::vector< std::string > &args, char sepChar= ',', char arrayStart= '[', char arrayEnd= ']', char stringQuote= '"', char characterQuote = '\'')
 Comma separated join, adds quotes if needed. More...
 
std::vector< std::stringpxr_CLI::CLI::detail::generate_parents (const std::string &section, std::string &name, char parentSeparator)
 
void pxr_CLI::CLI::detail::checkParentSegments (std::vector< ConfigItem > &output, const std::string &currentSection, char parentSeparator)
 assuming non default segments do a check on the close and open of the segments in a configItem structure More...
 

Variables

constexpr int pxr_CLI::CLI::detail::expected_max_vector_size {1 << 29}
 
constexpr enabler pxr_CLI::CLI::detail::dummy = {}
 An instance to use in EnableIf. More...
 
template<typename T >
using pxr_CLI::CLI::TransformPairs = std::vector< std::pair< std::string, T >>
 definition of the default transformation object More...
 
const detail::ExistingFileValidator pxr_CLI::CLI::ExistingFile
 Check for existing file (returns error message if check fails) More...
 
const
detail::ExistingDirectoryValidator 
pxr_CLI::CLI::ExistingDirectory
 Check for an existing directory (returns error message if check fails) More...
 
const detail::ExistingPathValidator pxr_CLI::CLI::ExistingPath
 Check for an existing path. More...
 
const
detail::NonexistentPathValidator 
pxr_CLI::CLI::NonexistentPath
 Check for an non-existing path. More...
 
const detail::IPV4Validator pxr_CLI::CLI::ValidIPV4
 Check for an IP4 address. More...
 
const TypeValidator< double > pxr_CLI::CLI::Number ("NUMBER")
 Check for a number. More...
 
const Range pxr_CLI::CLI::NonNegativeNumber ((std::numeric_limits< double >::max)(),"NONNEGATIVE")
 Check for a non negative number. More...
 
const Range pxr_CLI::CLI::PositiveNumber ((std::numeric_limits< double >::min)(),(std::numeric_limits< double >::max)(),"POSITIVE")
 Check for a positive valued number (val>0.0), <double>::min here is the smallest positive number. More...
 
std::string pxr_CLI::CLI::ignore_case (std::string item)
 Helper function to allow ignore_case to be passed to IsMember or Transform. More...
 
std::string pxr_CLI::CLI::ignore_underscore (std::string item)
 Helper function to allow ignore_underscore to be passed to IsMember or Transform. More...
 
std::string pxr_CLI::CLI::ignore_space (std::string item)
 Helper function to allow checks to ignore spaces to be passed to IsMember or Transform. More...
 
AsNumberWithUnit::Options pxr_CLI::CLI::operator| (const AsNumberWithUnit::Options &a, const AsNumberWithUnit::Options &b)
 definition of the default transformation object More...
 

Macro Definition Documentation

#define CLI11_DEPRECATED (   reason)    __attribute__((deprecated(reason)))

Definition at line 114 of file CLI11.h.

#define CLI11_ERROR_DEF (   parent,
  name 
)
Value:
protected: \
name(std::string ename, std::string msg, int exit_code) : parent(std::move(ename), std::move(msg), exit_code) {} \
name(std::string ename, std::string msg, ExitCodes exit_code) \
: parent(std::move(ename), std::move(msg), exit_code) {} \
\
public: \
name(std::string msg, ExitCodes exit_code) : parent(#name, std::move(msg), exit_code) {} \
name(std::string msg, int exit_code) : parent(#name, std::move(msg), exit_code) {}
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
GLuint const GLchar * name
Definition: glcorearb.h:786

Definition at line 646 of file CLI11.h.

#define CLI11_ERROR_SIMPLE (   name)    explicit name(std::string msg) : name(#name, msg, ExitCodes::name) {}

Definition at line 657 of file CLI11.h.

#define CLI11_INLINE   inline

Inline macro

Definition at line 146 of file CLI11.h.

#define CLI11_NODISCARD

Definition at line 120 of file CLI11.h.

#define CLI11_PARSE (   app,
  argc,
  argv 
)
Value:
try { \
(app).parse((argc), (argv)); \
} catch(const CLI::ParseError &e) { \
return (app).exit(e); \
}

Definition at line 5558 of file CLI11.h.

#define CLI11_USE_STATIC_RTTI   1

detection of rtti

Definition at line 138 of file CLI11.h.

#define CLI11_VERSION   "2.3.1"

Definition at line 79 of file CLI11.h.

#define CLI11_VERSION_MAJOR   2

Definition at line 76 of file CLI11.h.

#define CLI11_VERSION_MINOR   3

Definition at line 77 of file CLI11.h.

#define CLI11_VERSION_PATCH   1

Definition at line 78 of file CLI11.h.

#define PXR_CLI11_H

Definition at line 40 of file CLI11.h.