#include <senf/Utils/Console/Node.hh>
The CommandNode is the base-class for the tree leaf nodes. Concrete command node implementations are derived from this class.
To execute a command, CommandNode::operator()() or CommandNode::execute() is called.
Subclass instances of this node type are automatically created when adding commands to the tree. See Supported command types.
Definition at line 557 of file Node.hh.
Public Types |
|
typedef boost::shared_ptr < CommandNode > |
ptr |
typedef boost::shared_ptr < CommandNode const > |
cptr |
typedef boost::weak_ptr < CommandNode > |
weak_ptr |
Public Member Functions |
|
void | execute (std::ostream &output, ParseCommandInfo const &command) const |
Execute the command. |
|
void | execute (boost::any &rv, std::ostream &output, ParseCommandInfo const &command) const |
Execute the command. |
|
void | operator() (std::ostream &output, ParseCommandInfo const &command) const |
Execute the command. |
|
void | operator() (boost::any &rv, std::ostream &output, ParseCommandInfo const &command) const |
ptr | thisptr () |
Get smart pointer to node. |
|
cptr | thisptr () const |
Get smart pointer to node (const). |
|
Protected Member Functions |
|
CommandNode () | |
virtual void | v_execute (boost::any &rv, std::ostream &os, ParseCommandInfo const &command) const =0 |
Called to execute the command. |
typedef boost::shared_ptr<CommandNode const> senf::console::CommandNode:: | ||||
cptr | ||||
Reimplemented from senf::console::GenericNode.
Reimplemented in senf::console::SimpleCommandNode, and senf::console::OverloadedCommandNode.
typedef boost::shared_ptr<CommandNode> senf::console::CommandNode:: | ||||
ptr | ||||
Reimplemented from senf::console::GenericNode.
Reimplemented in senf::console::SimpleCommandNode, and senf::console::OverloadedCommandNode.
typedef boost::weak_ptr<CommandNode> senf::console::CommandNode:: | ||||
weak_ptr | ||||
Reimplemented from senf::console::GenericNode.
Reimplemented in senf::console::SimpleCommandNode, and senf::console::OverloadedCommandNode.
void senf::console::CommandNode:: | ||||
execute | ( | boost::any & | rv, | |
std::ostream & | output, | |||
ParseCommandInfo const & | command | ) | ||
void senf::console::CommandNode:: | ||||
execute | ( | std::ostream & | output, | |
ParseCommandInfo const & | command | ) | ||
void senf::console::CommandNode:: | ||||
operator() | ( | boost::any & | rv, | |
std::ostream & | output, | |||
ParseCommandInfo const & | command | ) | ||
void senf::console::CommandNode:: | ||||
operator() | ( | std::ostream & | output, | |
ParseCommandInfo const & | command | ) | ||
senf::console::CommandNode::cptr senf::console::CommandNode:: | ||||
thisptr | () | |||
Get smart pointer to node (const).
Reimplemented from senf::console::GenericNode.
Reimplemented in senf::console::SimpleCommandNode, and senf::console::OverloadedCommandNode.
senf::console::CommandNode::ptr senf::console::CommandNode:: | ||||
thisptr | () | |||
Get smart pointer to node.
Reimplemented from senf::console::GenericNode.
Reimplemented in senf::console::SimpleCommandNode, and senf::console::OverloadedCommandNode.
virtual void senf::console::CommandNode:: | ||||
v_execute | ( | boost::any & | rv, | |
std::ostream & | os, | |||
ParseCommandInfo const & | command | ) | ||
Called to execute the command.
[out] | rv | return value holder |
[in] | os | stream where result messages may be written to |
[in] | command | command arguments. This is a range of ranges of Token instances. |