Basic command overload. More...
#include <senf/Utils/Console/OverloadedCommand.hh>
Public Types | |
typedef boost::intrusive_ptr< SimpleCommandOverload > | ptr |
typedef boost::function< void(std::ostream &, ParseCommandInfo const &)> | Function |
Public Types inherited from senf::console::CommandOverload | |
typedef boost::intrusive_ptr< CommandOverload > | ptr |
typedef boost::intrusive_ptr< CommandOverload const > | cptr |
Public Types inherited from senf::intrusive_refcount_base | |
typedef unsigned | refcount_t |
Public Member Functions | |
SimpleCommandOverload & | doc (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... | |
OverloadedCommandNode & | node () 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 () |
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.
typedef boost::function<void (std::ostream &, ParseCommandInfo const &)> senf::console::SimpleCommandOverload::Function |
Definition at line 228 of file OverloadedCommand.hh.
typedef boost::intrusive_ptr<SimpleCommandOverload> senf::console::SimpleCommandOverload::ptr |
Definition at line 227 of file OverloadedCommand.hh.
|
static |
Create new SimpleCommandOverload.
[in] | fn | callback to call |
SimpleCommandOverload& senf::console::SimpleCommandOverload::doc | ( | std::string const & | doc | ) |
Assign overload specific documentation.