libcaf
0.13.2
|
Stores the name of a command line option ("<long name>[,<short name>]") along with a description and a callback. More...
#include <message.hpp>
Public Member Functions | |
cli_arg (std::string name, std::string text) | |
Creates a CLI argument without data. | |
cli_arg (std::string name, std::string text, std::string &dest) | |
Creates a CLI argument storing its matched argument in dest . | |
cli_arg (std::string name, std::string text, std::vector< std::string > &dest) | |
Creates a CLI argument appending matched arguments to dest . | |
template<class T > | |
cli_arg (std::string name, std::string text, T &dest) | |
Creates a CLI argument for converting from strings, storing its matched argument in dest . More... | |
template<class T > | |
cli_arg (std::string name, std::string text, std::vector< T > &dest) | |
Creates a CLI argument for converting from strings, appending matched arguments to dest . More... | |
Public Attributes | |
std::string | name |
Full name of this CLI argument using format "<long name>[,<short name>]". | |
std::string | text |
Desciption of this CLI argument for the auto-generated help text. | |
std::string | helptext |
Auto-generated helptext for this item. | |
std::function< bool(const std::string &)> | fun |
Returns true on a match, false otherwise. | |
Stores the name of a command line option ("<long name>[,<short name>]") along with a description and a callback.
caf::message::cli_arg::cli_arg | ( | std::string | name, |
std::string | text, | ||
T & | dest | ||
) |
Creates a CLI argument for converting from strings, storing its matched argument in dest
.
caf::message::cli_arg::cli_arg | ( | std::string | name, |
std::string | text, | ||
std::vector< T > & | dest | ||
) |
Creates a CLI argument for converting from strings, appending matched arguments to dest
.