Argument dependent ParsedCommandBase attributes. More...
#include <senf/Utils/Console/ParsedCommand.hh>
Public Types | |
typedef senf::function_traits_arg_type< typename Overload::traits, int(index) >::type | arg_type |
typedef senf::remove_cvref< arg_type >::type | value_type |
typedef ParsedArgumentAttributor< Overload, index+1 > | next_type |
Public Types inherited from senf::console::ParsedCommandAttributorBase | |
typedef OverloadedCommandNode | node_type |
typedef OverloadedCommandNode & | result_type |
Public Member Functions | |
next_type | arg () const |
Set argument attributes. More... | |
Public Member Functions inherited from senf::console::ParsedArgumentAttributorBase< Overload, ParsedArgumentAttributor< Overload, index, flag > > | |
ParsedArgumentAttributor< Overload, index, flag > | doc (std::string const &doc) |
Set documentation for all overloads. More... | |
ParsedArgumentAttributor< Overload, index, flag > | shortdoc (std::string const &doc) |
Set short documentation for all overloads. More... | |
ParsedArgumentAttributor< Overload, index, flag > | overloadDoc (std::string const &doc) |
Set overload specific documentation. More... | |
ParsedArgumentAttributor< Overload, index, flag > | formatter (typename Overload::Formatter formatter) |
Set return value formatter. More... | |
Public Member Functions inherited from senf::console::ParsedCommandAttributor< Overload > | |
Overload & | overload () const |
Get the command overload. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from senf::console::ParsedArgumentAttributorBase< Overload, ParsedArgumentAttributor< Overload, index, flag > > | |
ParsedArgumentAttributorBase (typename Overload::ptr overload, unsigned index) | |
ParsedArgumentAttributorBase (ParsedCommandAttributorBase const &other, unsigned index) | |
Protected Member Functions inherited from senf::console::ParsedCommandAttributor< Overload > | |
ParsedCommandAttributor (typename Overload::ptr overload, unsigned index) | |
ParsedCommandAttributor (ParsedCommandAttributorBase const &other, unsigned index) | |
Protected Member Functions inherited from senf::console::ParsedCommandAttributorBase | |
ParsedCommandAttributorBase (ParsedCommandOverloadBase::ptr overload, unsigned index) | |
ParsedCommandAttributorBase (ParsedCommandAttributorBase const &other, unsigned index) | |
void | argName (std::string const &name) |
void | argDoc (std::string const &doc) |
void | typeName (std::string const &doc) |
void | defaultDoc (std::string const &doc) |
ParsedCommandOverloadBase & | overload () const |
void | overloadDoc (std::string const &doc) |
void | nodeDoc (std::string const &doc) |
void | shortDoc (std::string const &doc) |
Argument dependent ParsedCommandBase attributes.
Attributes for parsed commands are not set directly on the node. They are set via a special attributor temporary returned when adding a parsed command to the tree.
This class adds all those members, which depend on a specific argument. Each call to arg
will advance to the next argument.
Definition at line 458 of file ParsedCommand.hh.
typedef senf::function_traits_arg_type< typename Overload::traits, int(index) >::type senf::console::ParsedArgumentAttributor< Overload, index, flag >::arg_type |
Definition at line 472 of file ParsedCommand.hh.
typedef ParsedArgumentAttributor<Overload, index+1> senf::console::ParsedArgumentAttributor< Overload, index, flag >::next_type |
Definition at line 474 of file ParsedCommand.hh.
typedef senf::remove_cvref< arg_type >::type senf::console::ParsedArgumentAttributor< Overload, index, flag >::value_type |
Definition at line 473 of file ParsedCommand.hh.
next_type senf::console::ParsedArgumentAttributor< Overload, index, flag >::arg | ( | ) | const |
Set argument attributes.
This member changes the attributes for the current argument. The attributes are passed to arg() as keyword arguments using the Boost.Parameter library.
The valid keywords are defined in the senf::console::kw namespace.
Each call to arg() will increment the argument index and advance to the next argument. This member is only present, if there is an argument at the current index.