CmdInterpreter Class Reference
A class which interprets CUTE and shell commands.
More...
#include <cmdinterpreter.h>
List of all members.
Detailed Description
A class which interprets CUTE and shell commands.
This class represents the CUTE command interpreter, which executes all command typed in the command box of CUTE. New commands can be added with the registerCmd method. If the typed string is not a CUTE command it is supposed to be a shell command and is executed with a shell in the background.
- Author:
- Heiko Köhler
Constructor & Destructor Documentation
CmdInterpreter::CmdInterpreter |
( |
QObject * |
parent |
) |
|
|
|
constructs a new interpreter but only one is necessary |
Member Function Documentation
bool CmdInterpreter::canReadLineStderr |
( |
|
) |
|
|
|
can line be read from stderr |
bool CmdInterpreter::canReadLineStdout |
( |
|
) |
|
|
|
can line be read from stdout |
QStringList& CmdInterpreter::commands |
( |
|
) |
|
|
|
retrieves all available commands of the interpeter |
void CmdInterpreter::createNewProcess |
( |
|
) |
|
|
bool CmdInterpreter::exec |
( |
const QString & |
cmd |
) |
|
|
|
runs a command returns false on failure and true on success |
QString CmdInterpreter::readLineStderr |
( |
|
) |
|
|
QString CmdInterpreter::readLineStdout |
( |
|
) |
|
|
void CmdInterpreter::registerCmd |
( |
QString |
startToken, |
|
|
cmd_func |
func |
|
) |
|
|
|
registers a new command starting with startToken and implemented in func |
void CmdInterpreter::registerFunc |
( |
QString |
name, |
|
|
cmd_func |
func |
|
) |
|
|
|
make interpreter to know a function func which is executed when command starts with :. "name" is the name for the new CUTE function |
The documentation for this class was generated from the following file:
Generated on Sun May 2 20:02:58 2004 by
1.3.2