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

CmdInterpreter Class Reference

A class which interprets CUTE and shell commands. More...

#include <cmdinterpreter.h>

List of all members.

Public Methods

 CmdInterpreter (QObject *parent)
bool exec (const QString &cmd)
void registerFunc (QString name, cmd_func func)
void registerCmd (QString startToken, cmd_func func)
QStringList & commands ()
QString readLineStdout ()
QString readLineStderr ()
bool canReadLineStdout ()
bool canReadLineStderr ()


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

bool CmdInterpreter::exec const QString &    cmd
 

runs a command returns false on failure and true on success

QString CmdInterpreter::readLineStderr  
 

read line from stderr

QString CmdInterpreter::readLineStdout  
 

read line from stdout

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 Wed Sep 10 03:46:24 2003 by doxygen1.2.18