senf::console::CommandNode Class Reference
[The node tree]

Config/console tree command node. More...

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

Inheritance diagram for senf::console::CommandNode:
Inheritance graph
[legend]

List of all members.


Detailed Description

Config/console tree command node.

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.

Member Typedef Documentation

typedef boost::shared_ptr<CommandNode const> senf::console::CommandNode::
cptr

Reimplemented from senf::console::GenericNode.

Reimplemented in senf::console::SimpleCommandNode, and senf::console::OverloadedCommandNode.

Definition at line 565 of file Node.hh.

typedef boost::shared_ptr<CommandNode> senf::console::CommandNode::
ptr

Reimplemented from senf::console::GenericNode.

Reimplemented in senf::console::SimpleCommandNode, and senf::console::OverloadedCommandNode.

Definition at line 559 of file Node.hh.

typedef boost::weak_ptr<CommandNode> senf::console::CommandNode::
weak_ptr

Reimplemented from senf::console::GenericNode.

Reimplemented in senf::console::SimpleCommandNode, and senf::console::OverloadedCommandNode.

Definition at line 566 of file Node.hh.


Constructor & Destructor Documentation

senf::console::CommandNode::
CommandNode ()

Definition at line 282 of file Node.cci.


Member Function Documentation

void senf::console::CommandNode::
execute ( boost::any &  rv,
std::ostream &  output,
ParseCommandInfo const &  command )

Execute the command.

Parameters:
[out]  rv  command return value
[in]  output  stream where result messages may be written to
[in]  command  command arguments. This is a range of ranges of Token instances.

Definition at line 293 of file Node.cci.

void senf::console::CommandNode::
execute ( std::ostream &  output,
ParseCommandInfo const &  command )

Execute the command.

Parameters:
[in]  output  stream where result messages may be written to
[in]  command  command arguments. This is a range of ranges of Token instances.

Definition at line 285 of file Node.cci.

void senf::console::CommandNode::
operator() ( boost::any &  rv,
std::ostream &  output,
ParseCommandInfo const &  command )

Definition at line 308 of file Node.cci.

void senf::console::CommandNode::
operator() ( std::ostream &  output,
ParseCommandInfo const &  command )

Execute the command.

Same as execute()

Parameters:
[in]  output  stream where result messages may be written to
[in]  command  command arguments. This is a range of ranges of Token instances.

Definition at line 301 of file Node.cci.

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.

Definition at line 276 of file Node.cci.

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.

Definition at line 271 of file Node.cci.

virtual void senf::console::CommandNode::
v_execute ( boost::any &  rv,
std::ostream &  os,
ParseCommandInfo const &  command )

Called to execute the command.

Parameters:
[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.

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