senf::console::ParsedArgumentAttributor< Overload, index, flag > Class Template Reference

Argument dependent ParsedCommandBase attributes. More...

#include <senf/Utils/Console/ParsedCommand.hh>

Inheritance diagram for senf::console::ParsedArgumentAttributor< Overload, index, flag >:
Inheritance graph
[legend]

List of all members.


Detailed Description

template<class Overload, unsigned index, bool flag>
class senf::console::ParsedArgumentAttributor< Overload, index, flag >

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.

See also:
Automatic argument parsing

Definition at line 468 of file 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 Member Functions

next_type  arg () const
  Set argument attributes.

Member Typedef Documentation

template<class Overload, unsigned index, bool flag>
typedef senf::function_traits_arg_type< typename Overload::traits, int(index) >::type senf::console::ParsedArgumentAttributor< Overload, index, flag >::
arg_type

Definition at line 482 of file ParsedCommand.hh.

template<class Overload, unsigned index, bool flag>
typedef ParsedArgumentAttributor<Overload, index+1> senf::console::ParsedArgumentAttributor< Overload, index, flag >::
next_type

Definition at line 484 of file ParsedCommand.hh.

template<class Overload, unsigned index, bool flag>
typedef senf::remove_cvref< arg_type >::type senf::console::ParsedArgumentAttributor< Overload, index, flag >::
value_type

Definition at line 483 of file ParsedCommand.hh.


Member Function Documentation

template<class Overload , unsigned index, bool flag>
senf::console::ParsedArgumentAttributor< Overload, index, flag >::next_type senf::console::ParsedArgumentAttributor< Overload, index, flag >::
arg ()

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.

...
    .arg( kw::name          = "name",
          kw::default_value = 1 )
...
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.

Definition at line 191 of file ParsedCommand.cti.


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