#include <parser.h>
|
| parser (int argc, const char **argv) |
|
| parser (int argc, char **argv) |
|
| parser (const parser &)=delete |
|
| parser (parser &&)=delete |
|
parser & | operator= (const parser &)=delete |
|
parser & | operator= (parser &&)=delete |
|
auto | has_help () const -> bool |
|
void | enable_help () |
|
void | disable_help () |
|
void | reset () |
|
template<typename T > |
void | set_default (bool is_required, const std::string &description="") |
|
template<typename T > |
void | set_required (const std::string &name, const std::string &alternative, const std::string &description="", bool dominant=false) |
|
template<typename T > |
void | set_optional (const std::string &name, const std::string &alternative, T defaultValue, const std::string &description="", bool dominant=false) |
|
template<typename T > |
void | set_callback (const std::string &name, const std::string &alternative, std::function< T(callback_args &)> callback, const std::string &description="", bool dominant=false) |
|
void | run_and_exit_if_error () |
|
auto | run () -> bool |
|
auto | run (std::ostream &output) -> bool |
|
auto | run (std::ostream &output, std::ostream &error) -> bool |
|
template<typename T > |
auto | get (const std::string &name) const -> T |
|
template<typename T > |
auto | try_get (const std::string &name, T &result) const -> bool |
|
template<typename T > |
auto | get_if (const std::string &name, std::function< T(T)> callback) const -> T |
|
auto | requirements () const -> int |
|
auto | commands () const -> int |
|
auto | app_name () const -> const std::string & |
|
auto | usage () const -> std::string |
|
|
auto | find (const std::string &name) -> cmd_base * |
|
auto | find_default () -> cmd_base * |
|
void | print_help (std::stringstream &ss) const |
|
auto | howto_required (const std::unique_ptr< cmd_base > &command) const -> std::string |
|
auto | howto_use (const std::unique_ptr< cmd_base > &command) const -> std::string |
|
auto | no_default () const -> std::string |
|
Definition at line 61 of file parser.h.
◆ parser() [1/4]
cmd_line::parser::parser |
( |
int | argc, |
|
|
const char ** | argv ) |
|
explicit |
◆ parser() [2/4]
cmd_line::parser::parser |
( |
int | argc, |
|
|
char ** | argv ) |
|
explicit |
◆ parser() [3/4]
cmd_line::parser::parser |
( |
const parser & | | ) |
|
|
delete |
◆ parser() [4/4]
cmd_line::parser::parser |
( |
parser && | | ) |
|
|
delete |
◆ app_name()
auto cmd_line::parser::app_name |
( |
| ) |
const -> const std::string& |
◆ commands()
auto cmd_line::parser::commands |
( |
| ) |
const -> int |
◆ disable_help()
void cmd_line::parser::disable_help |
( |
| ) |
|
◆ enable_help()
void cmd_line::parser::enable_help |
( |
| ) |
|
◆ find()
auto cmd_line::parser::find |
( |
const std::string & | name | ) |
-> cmd_base* |
|
protected |
◆ find_default()
auto cmd_line::parser::find_default |
( |
| ) |
-> cmd_base* |
|
protected |
◆ get()
template<typename T >
auto cmd_line::parser::get |
( |
const std::string & | name | ) |
const -> T
|
|
inline |
◆ get_if()
template<typename T >
auto cmd_line::parser::get_if |
( |
const std::string & | name, |
|
|
std::function< T(T)> | callback ) const -> T
|
|
inline |
◆ has_help()
auto cmd_line::parser::has_help |
( |
| ) |
const -> bool |
◆ howto_required()
auto cmd_line::parser::howto_required |
( |
const std::unique_ptr< cmd_base > & | command | ) |
const -> std::string |
|
protected |
◆ howto_use()
auto cmd_line::parser::howto_use |
( |
const std::unique_ptr< cmd_base > & | command | ) |
const -> std::string |
|
protected |
◆ no_default()
auto cmd_line::parser::no_default |
( |
| ) |
const -> std::string |
|
protected |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ print_help()
void cmd_line::parser::print_help |
( |
std::stringstream & | ss | ) |
const |
|
protected |
◆ requirements()
auto cmd_line::parser::requirements |
( |
| ) |
const -> int |
◆ reset()
void cmd_line::parser::reset |
( |
| ) |
|
◆ run() [1/3]
auto cmd_line::parser::run |
( |
| ) |
-> bool |
◆ run() [2/3]
auto cmd_line::parser::run |
( |
std::ostream & | output | ) |
-> bool |
◆ run() [3/3]
auto cmd_line::parser::run |
( |
std::ostream & | output, |
|
|
std::ostream & | error ) -> bool |
◆ run_and_exit_if_error()
void cmd_line::parser::run_and_exit_if_error |
( |
| ) |
|
◆ set_callback()
template<typename T >
void cmd_line::parser::set_callback |
( |
const std::string & | name, |
|
|
const std::string & | alternative, |
|
|
std::function< T(callback_args &)> | callback, |
|
|
const std::string & | description = "", |
|
|
bool | dominant = false ) |
|
inline |
◆ set_default()
template<typename T >
void cmd_line::parser::set_default |
( |
bool | is_required, |
|
|
const std::string & | description = "" ) |
|
inline |
◆ set_optional()
template<typename T >
void cmd_line::parser::set_optional |
( |
const std::string & | name, |
|
|
const std::string & | alternative, |
|
|
T | defaultValue, |
|
|
const std::string & | description = "", |
|
|
bool | dominant = false ) |
|
inline |
◆ set_required()
template<typename T >
void cmd_line::parser::set_required |
( |
const std::string & | name, |
|
|
const std::string & | alternative, |
|
|
const std::string & | description = "", |
|
|
bool | dominant = false ) |
|
inline |
◆ try_get()
template<typename T >
auto cmd_line::parser::try_get |
( |
const std::string & | name, |
|
|
T & | result ) const -> bool
|
|
inline |
◆ usage()
auto cmd_line::parser::usage |
( |
| ) |
const -> std::string |
The documentation for this class was generated from the following files:
- C:/Workspace/github/UnravelEngine/UnravelEngine/engine/core/cmd_line/parser.h
- C:/Workspace/github/UnravelEngine/UnravelEngine/engine/core/cmd_line/parser.cpp