|
class | basic_command_line_parser |
| Parses command line arguments into strongly-typed values. More...
|
|
class | basic_line_wrapping_ostream |
| Output stream that wraps lines on white-space characters at the specified line length, and with support for indentation. More...
|
|
class | basic_line_wrapping_streambuf |
| Stream buffer that wraps lines on white-space characters at the specified line length, and with support for indentation. More...
|
|
class | basic_parser_builder |
| Provides functionality to specify options and arguments to create a new basic_command_line_parser. More...
|
|
class | basic_shell_command |
| Abstract base class for all shell commands. More...
|
|
class | basic_shell_command_manager |
| Manages registration, creation and invocation of shell commands for an application. More...
|
|
class | basic_shell_command_usage_options |
| Provides options for how to format usage help for applications using shell commands. More...
|
|
class | basic_usage_options |
| Provides options for how to format usage help. More...
|
|
class | command_line_argument |
| Class that provides information about arguments that are not multi-value arguments. More...
|
|
class | command_line_argument_base |
| Abstract base class for regular and multi-value arguments. More...
|
|
struct | console_stream |
| Template to determine the correct console streams based on the character type. More...
|
|
struct | console_stream< char > |
| Specialization of console_stream for char . More...
|
|
struct | console_stream< wchar_t > |
| Specialization of console_stream for wchar_t . More...
|
|
struct | lexical_convert |
| Template class used to convert strings to strongly typed argument values. More...
|
|
struct | lexical_convert< bool, CharType, Traits, Alloc > |
| Specialization of the lexical_convert template for conversion from string to bool. More...
|
|
struct | lexical_convert< std::basic_string< CharType, Traits, Alloc >, CharType, Traits, Alloc > |
| Specialization of lexical_convert for strings. More...
|
|
class | multi_value_command_line_argument |
| Class that provides information about arguments that are not multi-value arguments. More...
|
|
class | owned_or_borrowed_ptr |
| Smart pointer that may or may not own the contained pointer. More...
|
|
struct | parse_result |
| Provides the result, success or error, of a command line argument parsing operation. More...
|
|
class | shell_command_info |
| Provides information about a shell command. More...
|
|
struct | string_convert |
| Performs a simple conversion of a narrow character string to a specified character type. More...
|
|
struct | string_convert< char, Traits, Alloc > |
| Specialization of string_convert where the target type is also char. More...
|
|
struct | string_less |
| A version of the std::less predicate for strings that supports case insensitive comparison. More...
|
|
class | tokenize |
| A pseudo-range for string tokenization. More...
|
|
struct | value_description |
| Template used to specify the default value description for a type. More...
|
|
struct | value_description< std::basic_string< CharType2, Traits2, Alloc2 >, CharType, Traits, Alloc > |
| Specialization of value_description for strings. More...
|
|
struct | value_description< std::optional< T >, CharType, Traits, Alloc > |
| Specialization of value_description for std::optional<T> . More...
|
|
|
short | get_console_width (short default_width=80) noexcept |
| Determines the width of the console. More...
|
|
template<typename T , typename CharType = char, typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>> |
auto | get_short_type_name () |
| Gets the name of a type excluding the namespace name. More...
|
|
template<typename CharType = char, typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>> |
auto | get_short_type_name (const std::type_info &type) |
| Gets the name of a type excluding the namespace name. More...
|
|
template<typename T , typename CharType = char, typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>> |
auto | get_type_name () |
| Gets the name of a type. More...
|
|
template<typename CharType = char, typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>> |
auto | get_type_name (const std::type_info &type) |
| Gets the name of a type. More...
|
|
template<typename CharType , size_t Length> |
constexpr const std::array< CharType, Length > | literal_cast (const char(&value)[Length]) |
| Converts a simple ASCII string literal to the specified character type at compile time. More...
|
|
template<typename T , typename... Args> |
auto | make_owned_ptr (Args &&... args) |
| Creates a new instance of the owned_or_borrowed_ptr that owns the contained pointer, by constructing a new object of type T with the specified arguments. More...
|
|
template<typename CharType , typename Traits > |
std::basic_ostream< CharType, Traits > & | reset_indent (std::basic_ostream< CharType, Traits > &stream) |
| IO manipulator that lets the next line start at the beginning of the line, without indenting it. More...
|
|
details::set_indent_helper | set_indent (size_t indent) |
| IO manipulator that changes the number of spaces that each line is indented with for a line wrapping stream. More...
|
|
template<typename CharType , typename Traits > |
bool | string_equal_case_insensitive (std::basic_string_view< CharType, Traits > string1, std::basic_string_view< CharType, Traits > string2, const std::locale &locale={}) |
| Compares two strings, ignoring their case. More...
|
|
template<typename T > |
void | swap (owned_or_borrowed_ptr< T > &left, owned_or_borrowed_ptr< T > &right) noexcept |
| Swaps two owned_or_borrowed_ptr instances. More...
|
|
Namespace containing the core Ookii.CommandLine.Cpp types.
This namespace defines all the types needed to use Ookii.CommandLine.Cpp, including basic_command_line_parser and basic_parser_builder. It also defines utility types such as basic_line_wrapping_ostream.
template<typename T , typename CharType = char, typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>>
auto ookii::get_short_type_name |
( |
| ) |
|
|
inline |
Gets the name of a type excluding the namespace name.
On g++, this demangles the type name before returning it. On VC++, it also strips the "class" or "struct" prefix.
- Template Parameters
-
T | The type whose name to return. |
CharType | The character type to use for the returned string. |
Traits | The character traits to use. |
Alloc | The allocator to use. |
template<typename CharType = char, typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>>
auto ookii::get_short_type_name |
( |
const std::type_info & |
type | ) |
|
|
inline |
Gets the name of a type excluding the namespace name.
On g++, this demangles the type name before returning it. On VC++, it also strips the "class" or "struct" prefix.
- Template Parameters
-
CharType | The character type to use for the returned string. |
Traits | The character traits to use. |
Alloc | The allocator to use. |
- Parameters
-
type | The type_info for the type. |
template<typename CharType , size_t Length>
constexpr const std::array<CharType, Length> ookii::literal_cast |
( |
const char(&) |
value[Length] | ) |
|
|
constexpr |
Converts a simple ASCII string literal to the specified character type at compile time.
This function is intended to be used on simple literals, to allow template functions to use string literals where the character type depends on the template parameters.
- Warning
- This function simply copies the source array to the target array, and will not work correctly if the source array contains multi-byte characters.
- Template Parameters
-
CharType | The target character type. |
Length | The length of the string. |
- Parameters
-
value | The character sequence to convert. |
- Returns
- A
std::array
holding the converted character sequence.