senf::console::ParsedCommandOverload< FunctionTraits, ReturnType, arity > Class Template Reference

Parsed command overload. More...

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

Inheritance diagram for senf::console::ParsedCommandOverload< FunctionTraits, ReturnType, arity >:

Public Types

typedef boost::intrusive_ptr< ParsedCommandOverloadptr
 
- Public Types inherited from senf::console::ParsedCommandOverloadBase
typedef boost::intrusive_ptr< ParsedCommandOverloadBaseptr
 
- Public Types inherited from senf::console::CommandOverload
typedef boost::intrusive_ptr< CommandOverloadptr
 
typedef boost::intrusive_ptr< CommandOverload const > cptr
 
- Public Types inherited from senf::intrusive_refcount_base
typedef unsigned refcount_t
 

Additional Inherited Members

- Public Member Functions inherited from senf::console::ParsedCommandOverloadBase
detail::ArgumentInfoBase & arg (unsigned n) const
 
void doc (std::string const &d)
 
- Public Member Functions inherited from senf::console::CommandOverload
virtual ~CommandOverload ()
 
void execute (boost::any &rv, std::ostream &os, ParseCommandInfo const &command)
 Call the overload. More...
 
void operator() (boost::any &rv, std::ostream &os, ParseCommandInfo const &command)
 Call the overload. More...
 
unsigned numArguments () const
 Number of arguments this overload takes. More...
 
void argumentDoc (unsigned index, ArgumentDoc &doc) const
 Get information on argument index. More...
 
std::string doc () const
 Get overload documentation. More...
 
OverloadedCommandNodenode () const
 Access owning node. More...
 
unsigned overloadIndex () const
 Get index of overload in it's OverloadedCommandNode. More...
 
- Public Member Functions inherited from senf::intrusive_refcount_base
virtual ~intrusive_refcount_base ()
 
refcount_t refcount () const
 
bool is_shared () const
 
- Protected Member Functions inherited from senf::console::ParsedCommandOverloadBase
 ParsedCommandOverloadBase ()
 
template<class Type >
void addParameter ()
 
- Protected Member Functions inherited from senf::console::CommandOverload
 CommandOverload ()
 
virtual void v_execute (boost::any &rv, std::ostream &os, ParseCommandInfo const &command) const =0
 Execute the overload. More...
 
- Protected Member Functions inherited from senf::intrusive_refcount
 intrusive_refcount ()
 
- Protected Member Functions inherited from intrusive_refcount_t< intrusive_refcount >
 intrusive_refcount_t ()
 
- Protected Member Functions inherited from senf::intrusive_refcount_base
 intrusive_refcount_base ()
 
void add_ref ()
 
bool release ()
 

Detailed Description

template<class FunctionTraits, class ReturnType, unsigned arity>
class senf::console::ParsedCommandOverload< FunctionTraits, ReturnType, arity >

Parsed command overload.

ParsedCommandOverload provides the command overload added to an OverloadedCommandNode for an automatically parsed command.

This class is normally instantiated automatically when adding a function or member-function pointer as callback to the tree. Manually instantiation this type of overload is not simple, since the function signature has to be manipulated correctly to support the optional std::ostream first argument.

Implementation note:
This class is specialized for each supported number of command arguments.
Todo:
Implement automatic binding of member functions for parser and formatter

Definition at line 166 of file ParsedCommand.hh.

Member Typedef Documentation

◆ ptr

template<class FunctionTraits , class ReturnType , unsigned arity>
typedef boost::intrusive_ptr<ParsedCommandOverload> senf::console::ParsedCommandOverload< FunctionTraits, ReturnType, arity >::ptr

Definition at line 169 of file ParsedCommand.hh.


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