args
6.2.0
A simple single-header C++11 STL-only argument parser library
|
this single-header lets you use all of the args functionality More...
#include <algorithm>
#include <iterator>
#include <exception>
#include <functional>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <type_traits>
#include <cstddef>
#include <iostream>
Go to the source code of this file.
Classes | |
class | args::Error |
Base error class. More... | |
class | args::UsageError |
Errors that occur during usage. More... | |
class | args::ParseError |
Errors that occur during regular parsing. More... | |
class | args::ValidationError |
Errors that are detected from group validation after parsing finishes. More... | |
class | args::RequiredError |
Errors that when a required flag is omitted. More... | |
class | args::MapError |
Errors in map lookups. More... | |
class | args::ExtraError |
Error that occurs when a singular flag is specified multiple times. More... | |
class | args::Help |
An exception that indicates that the user has requested help. More... | |
class | args::Completion |
An exception that contains autocompletion reply. More... | |
struct | args::EitherFlag |
A simple unified option type for unified initializer lists for the Matcher class. More... | |
class | args::Matcher |
A class of "matchers", specifying short and flags that can possibly be matched. More... | |
struct | args::HelpParams |
A simple structure of parameters for easy user-modifyable help menus. More... | |
struct | args::Nargs |
A number of arguments which can be consumed by an option. More... | |
class | args::Base |
Base class for all match types. More... | |
class | args::NamedBase |
Base class for all match types that have a name. More... | |
class | args::detail::is_streamable< S, T > |
class | args::FlagBase |
Base class for all flag options. More... | |
class | args::ValueFlagBase |
Base class for value-accepting flag options. More... | |
class | args::CompletionFlag |
class | args::PositionalBase |
Base class for positional options. More... | |
class | args::Group |
Class for all kinds of validating groups, including ArgumentParser. More... | |
struct | args::Group::Validators |
Default validators. More... | |
class | args::GlobalOptions |
Class for using global options in ArgumentParser. More... | |
class | args::Subparser |
Utility class for building subparsers with coroutines/callbacks. More... | |
class | args::Command |
Main class for building subparsers. More... | |
class | args::ArgumentParser |
The main user facing command line argument parser class. More... | |
class | args::Flag |
Boolean argument matcher. More... | |
class | args::HelpFlag |
Help flag class. More... | |
class | args::CounterFlag |
A flag class that simply counts the number of times it's matched. More... | |
class | args::ActionFlag |
A flag class that calls a function when it's matched. More... | |
struct | args::ValueReader |
A default Reader class for argument classes. More... | |
class | args::ValueFlag< T, Reader > |
An argument-accepting flag class. More... | |
class | args::ImplicitValueFlag< T, Reader > |
An optional argument-accepting flag class. More... | |
class | args::NargsValueFlag< T, List, Reader > |
A variadic arguments accepting flag class. More... | |
class | args::ValueFlagList< T, List, Reader > |
An argument-accepting flag class that pushes the found values into a list. More... | |
class | args::MapFlag< K, T, Reader, Map > |
A mapping value flag class. More... | |
class | args::MapFlagList< K, T, List, Reader, Map > |
A mapping value flag list class. More... | |
class | args::Positional< T, Reader > |
A positional argument class. More... | |
class | args::PositionalList< T, List, Reader > |
A positional argument class that pushes the found values into a list. More... | |
class | args::MapPositional< K, T, Reader, Map > |
A positional argument mapping class. More... | |
class | args::MapPositionalList< K, T, List, Reader, Map > |
A positional argument mapping list class. More... | |
Namespaces | |
args | |
contains all the functionality of the args library | |
Macros | |
#define | ARGS_VERSION "6.2.4" |
#define | ARGS_VERSION_MAJOR 6 |
#define | ARGS_VERSION_MINOR 2 |
#define | ARGS_VERSION_PATCH 4 |
Enumerations | |
enum class | args::Options { args::None = 0x0 , args::Single = 0x01 , args::Required = 0x02 , args::HiddenFromUsage = 0x04 , args::HiddenFromDescription = 0x08 , args::Global = 0x10 , args::KickOut = 0x20 , args::HiddenFromCompletion = 0x40 , args::Hidden = HiddenFromUsage | HiddenFromDescription | HiddenFromCompletion } |
Attributes for flags. More... | |
Functions | |
template<typename Option > | |
auto | args::get (Option &option_) -> decltype(option_.Get()) |
Getter to grab the value from the argument type. More... | |
std::string::size_type | args::Glyphs (const std::string &string_) |
(INTERNAL) Count UTF-8 glyphs More... | |
template<typename It > | |
std::vector< std::string > | args::Wrap (It begin, It end, const std::string::size_type width, std::string::size_type firstlinewidth=0, std::string::size_type firstlineindent=0) |
(INTERNAL) Wrap a vector of words into a vector of lines More... | |
template<typename T > | |
std::string | args::detail::Join (const T &array, const std::string &delimiter) |
std::vector< std::string > | args::Wrap (const std::string &in, const std::string::size_type width, std::string::size_type firstlinewidth=0) |
(INTERNAL) Wrap a string into a vector of lines More... | |
Options | args::operator| (Options lhs, Options rhs) |
Options | args::operator& (Options lhs, Options rhs) |
template<typename T > | |
std::enable_if< IsConvertableToString< T >::value, std::string >::type | args::detail::ToString (const T &value) |
template<typename T > | |
std::enable_if<!IsConvertableToString< T >::value, std::string >::type | args::detail::ToString (const T &) |
template<typename T > | |
std::vector< std::string > | args::detail::MapKeysToStrings (const T &map) |
std::ostream & | args::operator<< (std::ostream &os, const ArgumentParser &parser) |
this single-header lets you use all of the args functionality
The important stuff is done inside the args namespace