00001 #ifdef TEST
00002
00003 #include "headers.h"
00004
00005 static const string helpCommandString = "help";
00006
00007 HelpCommand::HelpCommand(CommandProcessor* cp) : MetaCommand(cp)
00008 {}
00009
00010
00011 void
00012 HelpCommand::getHtmlInterface(std::ostream& s) {
00013 }
00014
00015
00016 string
00017 HelpCommand::getCommandString() {
00018 return helpCommandString;
00019 }
00020
00021
00027 void
00028 HelpCommand::run(std::ostream& s)
00029 {
00030 vector<Command*> commandList = m_commandProcessor->getCommandList();
00031 vector<Command*>::const_iterator commandIterator;
00032
00033 s << "Commands available:\n-------------------\n";
00034 for (commandIterator = commandList.begin(); commandIterator < commandList.end(); ++commandIterator) {
00035 s << (*commandIterator)->getCommandString() << "\n";
00036 }
00037 s << "\n"
00038 << " * Note: some commands have sub-commands.\n"
00039 << " * For commands with subcommands, type the name of the command to get help.\n";
00040 }
00041
00042
00043 #endif
00044