HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pxr_CLI::CLI::detail Namespace Reference

Classes

struct  element_type
 not a pointer More...
 
struct  element_type< T, typename std::enable_if< is_copyable_ptr< T >::value >::type >
 
struct  element_value_type
 
struct  pair_adaptor
 Adaptor for set-like structure: This just wraps a normal container in a few utilities that do almost nothing. More...
 
struct  pair_adaptor< T, conditional_t< false, void_t< typename T::value_type::first_type, typename T::value_type::second_type >, void > >
 
class  is_direct_constructible
 
class  is_ostreamable
 
class  is_istreamable
 Check for input streamability. More...
 
class  is_complex
 Check for complex. More...
 
struct  is_mutable_container
 
struct  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  is_readable_container
 
struct  is_readable_container< T, conditional_t< false, void_t< decltype(std::declval< T >().end()), decltype(std::declval< T >().begin())>, void > >
 
struct  is_wrapper
 
struct  is_wrapper< T, conditional_t< false, void_t< typename T::value_type >, void > >
 
class  is_tuple_like
 
struct  wrapped_type
 template to get the underlying value type if it exists or use a default More...
 
struct  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  type_count_base
 This will only trigger for actual void type. More...
 
struct  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  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  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  subtype_count
 Set of overloads to get the type size of an object. More...
 
struct  subtype_count_min
 forward declare the subtype_count_min structure More...
 
struct  type_count
 This will only trigger for actual void type. More...
 
struct  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  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  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  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...
 
class  ExistingFileValidator
 Check for an existing file (returns error message if check fails) More...
 
class  ExistingDirectoryValidator
 Check for an existing directory (returns error message if check fails) More...
 
class  ExistingPathValidator
 Check for an existing path. More...
 
class  NonexistentPathValidator
 Check for an non-existing path. More...
 
class  IPV4Validator
 Validate the given string is a legal ipv4 address. More...
 
struct  has_find
 
struct  AppFriend
 This class is simply to allow tests access to App's protected functions. More...
 

Enumerations

enum  enabler
 Simple empty scoped class. More...
 
enum  path_type { path_type::nonexistent, path_type::file, path_type::directory }
 CLI enumeration of different file types. More...
 
enum  Classifier {
  Classifier::NONE, Classifier::POSITIONAL_MARK, Classifier::SHORT, Classifier::LONG,
  Classifier::WINDOWS_STYLE, Classifier::SUBCOMMAND, Classifier::SUBCOMMAND_TERMINATOR
}
 

Functions

CLI11_INLINE std::vector
< std::string
split (const std::string &s, char delim)
 Split a string by a delim. More...
 
template<typename T >
std::string 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 join (const T &v, Callable func, std::string delim=",")
 Simple function to join a string from processed elements. More...
 
template<typename T >
std::string rjoin (const T &v, std::string delim=",")
 Join a string in reverse order. More...
 
CLI11_INLINE std::stringltrim (std::string &str)
 Trim whitespace from left of string. More...
 
CLI11_INLINE std::stringltrim (std::string &str, const std::string &filter)
 Trim anything from left of string. More...
 
CLI11_INLINE std::stringrtrim (std::string &str)
 Trim whitespace from right of string. More...
 
CLI11_INLINE std::stringrtrim (std::string &str, const std::string &filter)
 Trim anything from right of string. More...
 
std::stringtrim (std::string &str)
 Trim whitespace from string. More...
 
std::stringtrim (std::string &str, const std::string filter)
 Trim anything from string. More...
 
std::string trim_copy (const std::string &str)
 Make a copy of the string and then trim it. More...
 
CLI11_INLINE std::stringremove_quotes (std::string &str)
 remove quotes at the front and back of a string either '"' or '\'' More...
 
CLI11_INLINE std::string fix_newlines (const std::string &leader, std::string input)
 
std::string 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 & 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 & format_aliases (std::ostream &out, const std::vector< std::string > &aliases, std::size_t wid)
 Print subcommand aliases. More...
 
template<typename T >
bool valid_first_char (T c)
 
template<typename T >
bool valid_later_char (T c)
 Verify following characters of an option. More...
 
CLI11_INLINE bool valid_name_string (const std::string &str)
 Verify an option/subcommand name. More...
 
bool valid_alias_name_string (const std::string &str)
 Verify an app name. More...
 
bool is_separator (const std::string &str)
 check if a string is a container segment separator (empty or "%%") More...
 
bool isalpha (const std::string &str)
 Verify that str consists of letters only. More...
 
std::string to_lower (std::string str)
 Return a lower case version of a string. More...
 
std::string remove_underscore (std::string str)
 remove underscores from a string More...
 
CLI11_INLINE std::string find_and_replace (std::string str, std::string from, std::string to)
 Find and replace a substring with another substring. More...
 
bool has_default_flag_values (const std::string &flags)
 check if the flag definitions has possible false flags More...
 
CLI11_INLINE void remove_default_flag_values (std::string &flags)
 
CLI11_INLINE std::ptrdiff_t 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 find_and_modify (std::string str, std::string trigger, Callable modify)
 
CLI11_INLINE std::vector
< std::string
split_up (std::string str, char delimiter= '\0')
 
CLI11_INLINE std::size_t escape_detect (std::string &str, std::size_t offset)
 
CLI11_INLINE std::stringadd_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 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 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 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 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 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 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 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 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 
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 
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 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 integral_conversion (const std::string &input, T &output) noexcept
 Convert to an unsigned integral. More...
 
std::int64_t 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 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 lexical_assign (const std::string &input, AssignTo &output)
 Assign a value through lexical cast operations. More...
 
CLI11_INLINE bool split_short (const std::string &current, std::string &name, std::string &rest)
 
CLI11_INLINE bool split_long (const std::string &current, std::string &name, std::string &value)
 
CLI11_INLINE bool split_windows_style (const std::string &current, std::string &name, std::string &value)
 
CLI11_INLINE std::vector
< std::string
split_names (std::string current)
 
CLI11_INLINE std::vector
< std::pair< std::string,
std::string > > 
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
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 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 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 >::typesmart_deref (T &value)
 
template<typename T >
std::string generate_set (const T &set)
 Generate a string representation of a set. More...
 
template<typename T >
std::string 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 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 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 
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 
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 
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 
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
split_program_name (std::string commandline)
 
template<typename T >
Optiondefault_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>
Optiondefault_flag_modifiers (Option *opt)
 summing modifiers More...
 
std::string convert_arg_for_ini (const std::string &arg, char stringQuote= '"', char characterQuote = '\'')
 
std::string 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::stringgenerate_parents (const std::string &section, std::string &name, char parentSeparator)
 
void 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 expected_max_vector_size {1 << 29}
 
constexpr enabler dummy = {}
 An instance to use in EnableIf. More...
 

Enumeration Type Documentation

Enumerator
NONE 
POSITIONAL_MARK 
SHORT 
LONG 
WINDOWS_STYLE 
SUBCOMMAND 
SUBCOMMAND_TERMINATOR 

Definition at line 5567 of file CLI11.h.

Simple empty scoped class.

Definition at line 982 of file CLI11.h.

CLI enumeration of different file types.

Enumerator
nonexistent 
file 
directory 

Definition at line 2963 of file CLI11.h.

Function Documentation

CLI11_INLINE std::string & pxr_CLI::CLI::detail::add_quotes_if_needed ( std::string str)

Add quotes if the string contains spaces.

Definition at line 629 of file CLI11.h.

CLI11_INLINE path_type pxr_CLI::CLI::detail::check_path ( const char *  file)
noexcept

get the type of the path from a file name

Definition at line 3783 of file CLI11.h.

template<typename T >
std::enable_if<std::is_integral<T>::value, bool>::type pxr_CLI::CLI::detail::checked_multiply ( T &  a,
b 
)

Performs a *= b; if it doesn't cause integer overflow. Returns false otherwise.

Definition at line 3225 of file CLI11.h.

template<typename T >
std::enable_if<std::is_floating_point<T>::value, bool>::type pxr_CLI::CLI::detail::checked_multiply ( T &  a,
b 
)

Performs a *= b; if it doesn't equal infinity. Returns false otherwise.

Definition at line 3242 of file CLI11.h.

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

Definition at line 1277 of file CLI11.h.

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

Definition at line 1286 of file CLI11.h.

CLI11_INLINE 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

Definition at line 9107 of file CLI11.h.

CLI11_INLINE std::string pxr_CLI::CLI::detail::convert_arg_for_ini ( const std::string arg,
char  stringQuote = '"',
char  characterQuote = '\'' 
)

Definition at line 9012 of file CLI11.h.

template<typename T >
Option* pxr_CLI::CLI::detail::default_flag_modifiers ( Option *  opt)

helper functions for adding in appropriate flag modifiers for add_flag

Definition at line 5588 of file CLI11.h.

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

Definition at line 5594 of file CLI11.h.

CLI11_INLINE std::size_t pxr_CLI::CLI::detail::escape_detect ( std::string str,
std::size_t  offset 
)

This function detects an equal or colon followed by an escaped quote after an argument then modifies the string to replace the equality with a space. This is needed to allow the split up function to work properly and is intended to be used with the find_and_modify function the return value is the offset+1 which is required by the find_and_modify function.

Definition at line 617 of file CLI11.h.

template<typename Callable >
std::string pxr_CLI::CLI::detail::find_and_modify ( std::string  str,
std::string  trigger,
Callable  modify 
)
inline

Find a trigger string and call a modify callable function that takes the current string and starting position of the trigger and returns the position in the string to search for the next trigger string

Definition at line 376 of file CLI11.h.

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.

Definition at line 512 of file CLI11.h.

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.

Definition at line 538 of file CLI11.h.

CLI11_INLINE std::string pxr_CLI::CLI::detail::fix_newlines ( const std::string leader,
std::string  input 
)

Add a leader to the beginning of all new lines (nothing is added at the start of the first line). "; " would be for ini files

Can't use Regex, or this would be a subs.

Definition at line 454 of file CLI11.h.

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.

Definition at line 484 of file CLI11.h.

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.

Definition at line 467 of file CLI11.h.

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.

Definition at line 1158 of file CLI11.h.

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.

Definition at line 3139 of file CLI11.h.

CLI11_INLINE std::vector< std::string > pxr_CLI::CLI::detail::generate_parents ( const std::string section,
std::string name,
char  parentSeparator 
)

Definition at line 9082 of file CLI11.h.

template<typename T >
std::string pxr_CLI::CLI::detail::generate_set ( const T &  set)

Generate a string representation of a set.

Definition at line 3126 of file CLI11.h.

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 !

Definition at line 2590 of file CLI11.h.

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.

Definition at line 2617 of file CLI11.h.

bool pxr_CLI::CLI::detail::has_default_flag_values ( const std::string flags)
inline

check if the flag definitions has possible false flags

Definition at line 362 of file CLI11.h.

CLI11_INLINE 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.

Definition at line 9055 of file CLI11.h.

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.

Convert to a signed integral.

Definition at line 1748 of file CLI11.h.

bool pxr_CLI::CLI::detail::is_separator ( const std::string str)
inline

check if a string is a container segment separator (empty or "%%")

Definition at line 334 of file CLI11.h.

bool pxr_CLI::CLI::detail::isalpha ( const std::string str)
inline

Verify that str consists of letters only.

Definition at line 340 of file CLI11.h.

template<typename T >
std::string pxr_CLI::CLI::detail::join ( const T &  v,
std::string  delim = "," 
)

Simple function to join a string.

Definition at line 222 of file CLI11.h.

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.

Definition at line 238 of file CLI11.h.

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.

Assign a value from a lexical cast through constructing a value and move assigning it.

Assign a value converted from a string in lexical cast to the output value directly.

Assign a value through lexical cast operations Strings can be empty so we need to do a little different

Assign a value through lexical cast operations for int compatible values mainly for atomic operations on some compilers

Definition at line 2060 of file CLI11.h.

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.

Non-string parsable by a stream.

Non-string convertible from an int.

Assignable from double.

Assignable from int.

Assignable from double or int.

wrapper types

Enumerations.

String and similar constructible and copy assignment.

String and similar direct assignment.

complex

Floats.

Boolean values.

char values

Definition at line 1835 of file CLI11.h.

CLI11_INLINE std::string & pxr_CLI::CLI::detail::ltrim ( std::string str)

Trim whitespace from left of string.

Definition at line 419 of file CLI11.h.

CLI11_INLINE std::string & pxr_CLI::CLI::detail::ltrim ( std::string str,
const std::string filter 
)

Trim anything from left of string.

Definition at line 425 of file CLI11.h.

template<typename T >
std::enable_if<std::is_signed<T>::value, T>::type pxr_CLI::CLI::detail::overflowCheck ( const T &  a,
const T &  b 
)
inline

Do a check for overflow on signed numbers.

Definition at line 3212 of file CLI11.h.

template<typename T >
std::enable_if<!std::is_signed<T>::value, T>::type pxr_CLI::CLI::detail::overflowCheck ( const T &  a,
const T &  b 
)
inline

Do a check for overflow on unsigned numbers.

Definition at line 3220 of file CLI11.h.

CLI11_INLINE void pxr_CLI::CLI::detail::remove_default_flag_values ( std::string flags)

Definition at line 524 of file CLI11.h.

CLI11_INLINE std::string & pxr_CLI::CLI::detail::remove_quotes ( std::string str)

remove quotes at the front and back of a string either '"' or '\''

Definition at line 444 of file CLI11.h.

std::string pxr_CLI::CLI::detail::remove_underscore ( std::string  str)
inline

remove underscores from a string

Definition at line 353 of file CLI11.h.

template<typename T >
std::string pxr_CLI::CLI::detail::rjoin ( const T &  v,
std::string  delim = "," 
)

Join a string in reverse order.

Definition at line 255 of file CLI11.h.

CLI11_INLINE std::string & pxr_CLI::CLI::detail::rtrim ( std::string str)

Trim whitespace from right of string.

Definition at line 431 of file CLI11.h.

CLI11_INLINE std::string & pxr_CLI::CLI::detail::rtrim ( std::string str,
const std::string filter 
)

Trim anything from right of string.

Definition at line 437 of file CLI11.h.

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.

A search function that uses the built in find function.

Definition at line 3170 of file CLI11.h.

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.

Definition at line 3189 of file CLI11.h.

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 ( value) -> decltype(*value)

Definition at line 3115 of file CLI11.h.

template<typename T , enable_if_t<!is_copyable_ptr< typename std::remove_reference< T >::type >::value, detail::enabler > = detail::dummy>
std::remove_reference<T>::type& pxr_CLI::CLI::detail::smart_deref ( T &  value)

Definition at line 3122 of file CLI11.h.

CLI11_INLINE std::vector< std::string > pxr_CLI::CLI::detail::split ( const std::string s,
char  delim 
)

Split a string by a delim.

Definition at line 403 of file CLI11.h.

CLI11_INLINE bool pxr_CLI::CLI::detail::split_long ( const std::string current,
std::string name,
std::string value 
)

Definition at line 2549 of file CLI11.h.

CLI11_INLINE std::vector< std::string > pxr_CLI::CLI::detail::split_names ( std::string  current)

Definition at line 2579 of file CLI11.h.

CLI11_INLINE std::pair< std::string, std::string > pxr_CLI::CLI::detail::split_program_name ( std::string  commandline)

Split a string into a program name and command line arguments the string is assumed to contain a file name followed by other arguments the return value contains is a pair with the first argument containing the program name and the second everything else.

Definition at line 3928 of file CLI11.h.

CLI11_INLINE bool pxr_CLI::CLI::detail::split_short ( const std::string current,
std::string name,
std::string rest 
)

Definition at line 2540 of file CLI11.h.

CLI11_INLINE std::vector< std::string > pxr_CLI::CLI::detail::split_up ( std::string  str,
char  delimiter = '\0' 
)

Split a string '"one two" "three"' into 'one two', 'three' Quote characters can be ` ' or "

Definition at line 565 of file CLI11.h.

CLI11_INLINE bool pxr_CLI::CLI::detail::split_windows_style ( const std::string current,
std::string name,
std::string value 
)

Definition at line 2564 of file CLI11.h.

std::int64_t pxr_CLI::CLI::detail::to_flag_value ( std::string  val)
inline

Convert a flag into an integer value typically binary flags.

Definition at line 1788 of file CLI11.h.

std::string pxr_CLI::CLI::detail::to_lower ( std::string  str)
inline

Return a lower case version of a string.

Definition at line 345 of file CLI11.h.

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)

Definition at line 1221 of file CLI11.h.

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.

Definition at line 1229 of file CLI11.h.

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)

convert a readable container to a string

If conversion is not supported, return an empty string (streaming is not supported for that type)

Definition at line 1238 of file CLI11.h.

std::string& pxr_CLI::CLI::detail::trim ( std::string str)
inline

Trim whitespace from string.

Definition at line 280 of file CLI11.h.

std::string& pxr_CLI::CLI::detail::trim ( std::string str,
const std::string  filter 
)
inline

Trim anything from string.

Definition at line 283 of file CLI11.h.

std::string pxr_CLI::CLI::detail::trim_copy ( const std::string str)
inline

Make a copy of the string and then trim it.

Definition at line 286 of file CLI11.h.

std::string pxr_CLI::CLI::detail::trim_copy ( const std::string str,
const std::string filter 
)
inline

Make a copy of the string and then trim it, any filter string can be used (any char in string is filtered)

Definition at line 301 of file CLI11.h.

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

Definition at line 1375 of file CLI11.h.

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 ( )
inline

Recursively generate the tuple type name.

Examples:
VOP/VOP_CustomContext.C.

Definition at line 1729 of file CLI11.h.

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 ( )
inline

get the type name for a type that has a value_type member

Definition at line 1740 of file CLI11.h.

bool pxr_CLI::CLI::detail::valid_alias_name_string ( const std::string str)
inline

Verify an app name.

Definition at line 328 of file CLI11.h.

template<typename T >
bool pxr_CLI::CLI::detail::valid_first_char ( c)

Verify the first character of an option

  • is a trigger character, ! has special meaning and new lines would just be annoying to deal with

Definition at line 314 of file CLI11.h.

template<typename T >
bool pxr_CLI::CLI::detail::valid_later_char ( c)

Verify following characters of an option.

Definition at line 317 of file CLI11.h.

CLI11_INLINE bool pxr_CLI::CLI::detail::valid_name_string ( const std::string str)

Verify an option/subcommand name.

Definition at line 501 of file CLI11.h.

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

get a string as a convertible value for enumerations

Definition at line 1291 of file CLI11.h.

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

Definition at line 1302 of file CLI11.h.

Variable Documentation

constexpr enabler pxr_CLI::CLI::detail::dummy = {}

An instance to use in EnableIf.

Examples:
tetprim/GR_PrimTetra.C.

Definition at line 985 of file CLI11.h.

constexpr int pxr_CLI::CLI::detail::expected_max_vector_size {1 << 29}

a constant defining an expected max vector size defined to be a big number that could be multiplied by 4 and not produce overflow for some expected uses

Definition at line 216 of file CLI11.h.