senf::console::SimpleCommandOverload Class Reference

Basic command overload. More...

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

Inheritance diagram for senf::console::SimpleCommandOverload:

Public Types

typedef boost::intrusive_ptr< SimpleCommandOverloadptr
 
typedef boost::function< void(std::ostream &, ParseCommandInfo const &)> Function
 
- 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
 

Public Member Functions

SimpleCommandOverloaddoc (std::string const &doc)
 Assign overload specific documentation. More...
 
- 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
 

Structors and default members

static SimpleCommandOverload::ptr create (Function fn)
 Create new SimpleCommandOverload. More...
 

Additional Inherited Members

- Protected Member Functions inherited from senf::console::CommandOverload
 CommandOverload ()
 
- 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

Basic command overload.

This is an implementation of CommandOverload which allows to call an arbitrary callback with the correct signature (void (std::ostream &, senf::console::ParseCommandInfo const &))

Definition at line 220 of file OverloadedCommand.hh.

Member Typedef Documentation

◆ Function

typedef boost::function<void (std::ostream &, ParseCommandInfo const &)> senf::console::SimpleCommandOverload::Function

Definition at line 228 of file OverloadedCommand.hh.

◆ ptr

Definition at line 227 of file OverloadedCommand.hh.

Member Function Documentation

◆ create()

static SimpleCommandOverload::ptr senf::console::SimpleCommandOverload::create ( Function  fn)
static

Create new SimpleCommandOverload.

Parameters
[in]fncallback to call

◆ doc()

SimpleCommandOverload& senf::console::SimpleCommandOverload::doc ( std::string const &  doc)

Assign overload specific documentation.


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