Command.h Source File
Back to the index.
Go to the documentation of this file.
61 Command(
const string& name,
const string& argumentFormat);
82 return m_argumentFormat;
93 const vector<string>& arguments) = 0;
131 string m_argumentFormat;
135 typedef map< string,refcount_ptr<Command> >
Commands;
map< string, refcount_ptr< Command > > Commands
const string & GetArgumentFormat() const
Gets the argument format for the command.
A Command is a named function, executed by the CommandInterpreter.
Command(const string &name, const string &argumentFormat)
Constructs a Command.
virtual bool MayBeReexecutedWithoutArgs() const
Returns whether the command can be quickly re-executed using an empty command line.
const string & GetCommandName() const
Gets the name of the command.
virtual string GetLongDescription() const =0
Returns a long description/help message for the command.
virtual bool Execute(GXemul &gxemul, const vector< string > &arguments)=0
Executes the command on a given GXemul instance.
Base class for unit testable classes.
Base class for reference countable objects.
virtual string GetShortDescription() const =0
Returns a short (one-line) description of the command.
static void RunUnitTests(int &nSucceeded, int &nFailures)
Generated on Tue Aug 25 2020 19:25:06 for GXemul by
1.8.18