Zen C++ Libraries
Zero-dependency re-usable components for C++
Loading...
Searching...
No Matches
po::command Class Reference

Public Member Functions

 command (std::string name, std::optional< std::string > description={})
command & description (std::string description)
template<typename T>
command & flag (flag< T > fl)
command & action (command_callback_t callback)
command & fallback ()
command & subcommand (command cmd)
command & pos_arg (std::string name, int arity=1)

Protected Attributes

std::string _name
std::optional< std::string > _description
std::unordered_map< std::string, _flag_info_flags
std::vector< command > _subcommands
std::vector< posarg_pos_args
bool _is_fallback = false
std::optional< command_callback_t > _callback

Friends

class program

The documentation for this class was generated from the following file: