Base class for command overload of OverloadedCommandNode. More...
#include <senf/Utils/Console/OverloadedCommand.hh>

Public Types | |
| 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 | |
| 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 | 
Protected Member Functions | |
| CommandOverload () | |
| virtual unsigned | v_numArguments () const =0 | 
| Return the number of arguments.  More... | |
| virtual void | v_argumentDoc (unsigned index, ArgumentDoc &doc) const =0 | 
| Return argument documentation.  More... | |
| virtual std::string | v_doc () const =0 | 
| Return overload documentation.  More... | |
| 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 () | 
Base class for command overload of OverloadedCommandNode.
This class is the base class of the commands which may be added to an OverloadedCommandNode.
Definition at line 52 of file OverloadedCommand.hh.
| typedef boost::intrusive_ptr<CommandOverload const> senf::console::CommandOverload::cptr | 
Definition at line 60 of file OverloadedCommand.hh.
| typedef boost::intrusive_ptr<CommandOverload> senf::console::CommandOverload::ptr | 
Definition at line 59 of file OverloadedCommand.hh.
      
  | 
  virtual | 
Definition at line 29 of file OverloadedCommand.cc.
      
  | 
  protected | 
Definition at line 75 of file OverloadedCommand.cc.
| void senf::console::CommandOverload::argumentDoc | ( | unsigned | index, | 
| ArgumentDoc & | doc | ||
| ) | const | 
Get information on argument index.
The information is returned in doc. doc must be empty before this call.
| [in] | index | Argument index | 
| [out] | doc | Argument documentation | 
Definition at line 50 of file OverloadedCommand.cc.
| std::string senf::console::CommandOverload::doc | ( | ) | const | 
Get overload documentation.
Definition at line 56 of file OverloadedCommand.cc.
| void senf::console::CommandOverload::execute | ( | boost::any & | rv, | 
| std::ostream & | os, | ||
| ParseCommandInfo const & | command | ||
| ) | 
Call the overload.
If the arguments are not acceptable for this overload, a SyntaxErrorException must be thrown. Same as operator()()
Definition at line 38 of file OverloadedCommand.cc.
| senf::console::OverloadedCommandNode & senf::console::CommandOverload::node | ( | ) | const | 
Access owning node.
Definition at line 62 of file OverloadedCommand.cc.
| unsigned senf::console::CommandOverload::numArguments | ( | ) | const | 
Number of arguments this overload takes.
Definition at line 44 of file OverloadedCommand.cc.
| void senf::console::CommandOverload::operator() | ( | boost::any & | rv, | 
| std::ostream & | os, | ||
| ParseCommandInfo const & | command | ||
| ) | 
Call the overload.
If the arguments are not acceptable for this overload, a SyntaxErrorException must be thrown. Same as execute()
Definition at line 32 of file OverloadedCommand.cc.
| unsigned senf::console::CommandOverload::overloadIndex | ( | ) | const | 
Get index of overload in it's OverloadedCommandNode.
Definition at line 69 of file OverloadedCommand.cc.
      
  | 
  protectedpure virtual | 
Return argument documentation.
The member must be implemented int the derived class to return all documentation information for the index'th parameter in doc.
      
  | 
  protectedpure virtual | 
Return overload documentation.
This member must be implemented in the derived class to return the overloads documentation string.
      
  | 
  protectedpure virtual | 
Execute the overload.
This member must be implemented in the derived class o execute the overload.
      
  | 
  protectedpure virtual | 
Return the number of arguments.
This member must be implemented in the derived class to return the number of arguments, the command expects.