CLI11 2.2.0
Loading...
Searching...
No Matches
App.hpp File Reference
#include <algorithm>
#include <cstdint>
#include <functional>
#include <iostream>
#include <iterator>
#include <memory>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include "ConfigFwd.hpp"
#include "Error.hpp"
#include "FormatterFwd.hpp"
#include "Macros.hpp"
#include "Option.hpp"
#include "Split.hpp"
#include "StringTools.hpp"
#include "TypeTools.hpp"
Include dependency graph for App.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CLI::App
 Creates a command line program, with very few defaults. More...
 
class  CLI::Option_group
 Extension of App to better manage groups of options. More...
 
struct  CLI::detail::AppFriend
 This class is simply to allow tests access to App's protected functions. More...
 

Namespaces

namespace  CLI
 
namespace  CLI::detail
 
namespace  CLI::FailureMessage
 

Macros

#define CLI11_PARSE(app, argc, argv)
 

Typedefs

using CLI::App_p = std::shared_ptr<App>
 

Enumerations

enum class  CLI::detail::Classifier {
  CLI::detail::NONE , CLI::detail::POSITIONAL_MARK , CLI::detail::SHORT , CLI::detail::LONG ,
  CLI::detail::WINDOWS_STYLE , CLI::detail::SUBCOMMAND , CLI::detail::SUBCOMMAND_TERMINATOR
}
 
enum class  CLI::config_extras_mode : char { CLI::error = 0 , CLI::ignore , CLI::ignore_all , CLI::capture }
 enumeration of modes of how to deal with extras in config files More...
 

Functions

std::string CLI::FailureMessage::simple (const App *app, const Error &e)
 Printout a clean, simple message on error (the default in CLI11 1.5+)
 
std::string 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)
 
template<typename T , enable_if_t<!std::is_integral< T >::value||(sizeof(T)<=1U), detail::enabler > = detail::dummy>
OptionCLI::detail::default_flag_modifiers (Option *opt)
 helper functions for adding in appropriate flag modifiers for add_flag
 
void CLI::TriggerOn (App *trigger_app, App *app_to_enable)
 Helper function to enable one option group/subcommand when another is used.
 
void CLI::TriggerOn (App *trigger_app, std::vector< App * > apps_to_enable)
 Helper function to enable one option group/subcommand when another is used.
 
void CLI::TriggerOff (App *trigger_app, App *app_to_enable)
 Helper function to disable one option group/subcommand when another is used.
 
void CLI::TriggerOff (App *trigger_app, std::vector< App * > apps_to_enable)
 Helper function to disable one option group/subcommand when another is used.
 
void CLI::deprecate_option (Option *opt, const std::string &replacement="")
 Helper function to mark an option as deprecated.
 
void CLI::deprecate_option (App *app, const std::string &option_name, const std::string &replacement="")
 Helper function to mark an option as deprecated.
 
void CLI::deprecate_option (App &app, const std::string &option_name, const std::string &replacement="")
 Helper function to mark an option as deprecated.
 
void CLI::retire_option (App *app, Option *opt)
 Helper function to mark an option as retired.
 
void CLI::retire_option (App &app, Option *opt)
 Helper function to mark an option as retired.
 
void CLI::retire_option (App *app, const std::string &option_name)
 Helper function to mark an option as retired.
 
void CLI::retire_option (App &app, const std::string &option_name)
 Helper function to mark an option as retired.
 

Macro Definition Documentation

◆ CLI11_PARSE

#define CLI11_PARSE ( app,
argc,
argv )
Value:
try { \
(app).parse((argc), (argv)); \
} catch(const CLI::ParseError &e) { \
return (app).exit(e); \
}
Anything that can error in Parse.
Definition Error.hpp:150