11 #include "UserCommand.h" 89 virtual const std::string
getName ()
const = 0;
102 virtual std::vector<std::string>
getAliases ()
const;
114 virtual const std::string
getAliasMapping (
const std::string &alias)
const;
virtual const std::string getName() const =0
Returns the name of this Command to be used in iash.
Command()
Creates a new Comamnd instance.
Definition: Command.cpp:13
virtual std::vector< std::string > getAliases() const
Returns all builtin aliases for this Command.
Definition: Command.cpp:26
virtual bool validate(const UserCommand *cmd) const
Validates the command entered by the user.
Definition: Command.cpp:41
virtual int run(const UserCommand *cmd)=0
Called when a command matching the current Command is issued.
The main shell class for iash.
Definition: iash.h:56
Abstract interface for a command registered with the shell.
Definition: Command.h:56
void init(iash *parent)
Sets the shell parent for this Command.
Definition: Command.cpp:21
Used to retain command arguments and the proper input and output streams for a command call...
Definition: UserCommand.h:28
virtual void showUsageMessage(std::ostream &os) const
Prints a usage message to the specified output stream.
Definition: Command.cpp:36
virtual const std::string getAliasMapping(const std::string &alias) const
Converts a given alias for this command into a fully-qualified command string (using the Command's de...
Definition: Command.cpp:31