#include <BESShowCommand.h>
Public Member Functions | |
BESShowCommand (const string &cmd) | |
virtual | ~BESShowCommand () |
virtual BESResponseHandler * | parse_request (BESTokenizer &tokens, BESDataHandlerInterface &dhi) |
knows how to parse a show request | |
virtual void | dump (ostream &strm) const |
dumps information about this object | |
virtual string | parse_options (BESTokenizer &tokens, BESDataHandlerInterface &dhi) |
Static Public Member Functions | |
static void | add_command (const string &cmd_str, BESCommand *cmd) |
static bool | del_command (const string &cmd_str) |
static BESCommand * | find_command (const string &cmd_str) |
Static Public Attributes | |
static BESCommand * | TermCommand = new BESTermCommand( "term" ) |
Protected Attributes | |
string | _cmd |
Definition at line 38 of file BESShowCommand.h.
BESShowCommand::BESShowCommand | ( | const string & | cmd | ) | [inline] |
Definition at line 43 of file BESShowCommand.h.
virtual BESShowCommand::~BESShowCommand | ( | ) | [inline, virtual] |
Definition at line 45 of file BESShowCommand.h.
BESResponseHandler * BESShowCommand::parse_request | ( | BESTokenizer & | tokenizer, | |
BESDataHandlerInterface & | dhi | |||
) | [virtual] |
knows how to parse a show request
This class knows how to parse a show request, building a sub response handler that actually knows how to build the requested response object, such as for show help or show version.
A show request looks like:
get <info_type>;
where info_type is the type of information that the user is requesting, such as help or version
This parse method creates the sub response handler that knows how to create the specified information, such as creating HelpResponseHandler.
tokenizer | holds on to the list of tokens to be parsed | |
dhi | structure that holds request and response information |
BESParserException | if there is a problem parsing the request |
Implements BESCommand.
Definition at line 59 of file BESShowCommand.cc.
References BESCommand::_cmd, _BESDataHandlerInterface::action, BESCommand::find_command(), BESResponseHandlerList::find_handler(), BESTokenizer::get_next_token(), BESTokenizer::parse_error(), BESCommand::parse_options(), BESCommand::parse_request(), BESCommand::TermCommand, and BESResponseHandlerList::TheList().
void BESShowCommand::dump | ( | ostream & | strm | ) | const [virtual] |
dumps information about this object
Displays the pointer value of this instance
strm | C++ i/o stream to dump the information to |
Reimplemented from BESCommand.
Definition at line 106 of file BESShowCommand.cc.
References BESCommand::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
string BESCommand::parse_options | ( | BESTokenizer & | tokens, | |
BESDataHandlerInterface & | dhi | |||
) | [virtual, inherited] |
Reimplemented in BESDefineCommand, and BESSetCommand.
Definition at line 39 of file BESCommand.cc.
References BESTokenizer::get_next_token().
Referenced by TestCommand::parse_request(), parse_request(), BESGetCommand::parse_request(), BESDeleteCommand::parse_request(), and BESCatalogCommand::parse_request().
void BESCommand::add_command | ( | const string & | cmd_str, | |
BESCommand * | cmd | |||
) | [static, inherited] |
Definition at line 49 of file BESCommand.cc.
Referenced by TestModule::initialize(), DAPCommandModule::initialize(), and BESDefaultCommands::initialize().
bool BESCommand::del_command | ( | const string & | cmd_str | ) | [static, inherited] |
Definition at line 55 of file BESCommand.cc.
Referenced by TestModule::terminate(), DAPCommandModule::terminate(), and BESDefaultCommands::terminate().
BESCommand * BESCommand::find_command | ( | const string & | cmd_str | ) | [static, inherited] |
Definition at line 75 of file BESCommand.cc.
Referenced by BESCmdParser::parse(), TestCommand::parse_request(), parse_request(), BESSetCommand::parse_request(), BESGetCommand::parse_request(), BESDeleteCommand::parse_request(), and BESDefineCommand::parse_request().
string BESCommand::_cmd [protected, inherited] |
Definition at line 54 of file BESCommand.h.
Referenced by BESCommand::dump(), TestCommand::parse_request(), parse_request(), BESSetCommand::parse_request(), BESGetCommand::parse_request(), BESDeleteCommand::parse_request(), BESDelDefsCommand::parse_request(), BESDelDefCommand::parse_request(), BESDelContainersCommand::parse_request(), BESDelContainerCommand::parse_request(), BESDefineCommand::parse_request(), and BESCatalogCommand::parse_request().
BESCommand * BESCommand::TermCommand = new BESTermCommand( "term" ) [static, inherited] |
Definition at line 68 of file BESCommand.h.
Referenced by TestModule::initialize(), DAPCommandModule::initialize(), BESDefaultCommands::initialize(), TestCommand::parse_request(), parse_request(), BESSetCommand::parse_request(), BESGetCommand::parse_request(), BESDeleteCommand::parse_request(), and BESDefineCommand::parse_request().