Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

HelpCommand.cpp

Go to the documentation of this file.
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 } // fn run
00041 
00042 
00043 #endif
00044 

Generated at Thu Jul 11 13:31:50 2002 for Peekabooty by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001