senf::console::ParsedArgumentAttributorBase< Overload, Self, ReturnType > Class Template Reference

Derived class dependent ParsedCommandBase attributes. More...

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

Inheritance diagram for senf::console::ParsedArgumentAttributorBase< Overload, Self, ReturnType >:
Inheritance graph
[legend]

List of all members.


Detailed Description

template<class Overload, class Self, class ReturnType = typename Overload::traits::result_type>
class senf::console::ParsedArgumentAttributorBase< Overload, Self, ReturnType >

Derived class 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 do not depend on any specific argument but which need to return the correct attributor type.

See also:
Automatic argument parsing

Definition at line 410 of file ParsedCommand.hh.


Public Member Functions

Self  doc (std::string const &doc)
  Set documentation for all overloads.
Self  shortdoc (std::string const &doc)
  Set short documentation for all overloads.
Self  overloadDoc (std::string const &doc)
  Set overload specific documentation.
Self  formatter (typename Overload::Formatter formatter)
  Set return value formatter.

Protected Member Functions

  ParsedArgumentAttributorBase (typename Overload::ptr overload, unsigned index)
  ParsedArgumentAttributorBase (ParsedCommandAttributorBase const &other, unsigned index)

Constructor & Destructor Documentation

template<class Overload, class Self >
senf::console::ParsedArgumentAttributorBase< Overload, Self >::
ParsedArgumentAttributorBase ( typename Overload::ptr  overload,
unsigned  index )

Definition at line 137 of file ParsedCommand.cti.

template<class Overload, class Self >
senf::console::ParsedArgumentAttributorBase< Overload, Self >::
ParsedArgumentAttributorBase ( ParsedCommandAttributorBase const &  other,
unsigned  index )

Definition at line 144 of file ParsedCommand.cti.


Member Function Documentation

template<class Overload , class Self >
Self senf::console::ParsedArgumentAttributorBase< Overload, Self >::
doc ( std::string const &  doc )

Set documentation for all overloads.

Definition at line 104 of file ParsedCommand.cti.

template<class Overload, class Self , class ReturnType >
Self senf::console::ParsedArgumentAttributorBase< Overload, Self, ReturnType >::
formatter ( typename Overload::Formatter  formatter )

Set return value formatter.

This member is only available, if the ReturnType of the installed callback is not void.

If ReturnType is not void, the formatter must be a callable with a signature compatible with

void formatter(ReturnType const & value, std::ostream & os);
The formatter takes the return value of the call value and writes it properly formated to os.

Definition at line 128 of file ParsedCommand.cti.

template<class Overload , class Self >
Self senf::console::ParsedArgumentAttributorBase< Overload, Self >::
overloadDoc ( std::string const &  doc )

Set overload specific documentation.

Reimplemented from senf::console::ParsedCommandAttributorBase.

Definition at line 120 of file ParsedCommand.cti.

template<class Overload , class Self >
Self senf::console::ParsedArgumentAttributorBase< Overload, Self >::
shortdoc ( std::string const &  doc )

Set short documentation for all overloads.

Definition at line 112 of file ParsedCommand.cti.


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