The BPS scripting engine.
More...
#include <bpsscriptengine.h>
List of all members.
Signals |
| void | writelnDebug (const QString &aLine) |
| | This signal is emitted whenever a line shall be written to the debugger output.
|
| void | writelnStderr (const QString &aLine) |
| | This signal is emitted whenever a line shall be written to the standard error output (stderr).
|
| void | writelnStdout (const QString &aLine) |
| | This signal is emitted whenever a line shall be written to the standard output (stdout).
|
Public Member Functions |
| QString | adjustFileName (const QString &aFilename) const |
| | Adjusts filename and checks for existance.
|
| | BpsScriptEngine (QObject *aParent=0) |
| | Standard constructor for the BpsScriptEngine objects.
|
| BpsScriptEngine & | debug (const QString &aLine) |
| | Prints a line to debug output.
|
| QScriptValue | eval (const QString &aCode, const QString &aFilename, quint32 aLinenumber=1) |
| | Evaluates script code, using aFilename as file name and aLinenumber as starting line number.
|
| QScriptValue | eval (const QString &aFilename, quint32 aLinenumber=1) |
| | Evaluates a script stored in a file.
|
| BpsScriptEngine & | perror (const QString &aLine) |
| | Prints a line to stderr.
|
| BpsScriptEngine & | print (const QString &aLine) |
| | Prints a line to stdout.
|
Detailed Description
The BPS scripting engine.
It is derived from QScriptEnging and implements the BPS extensions.
Constructor & Destructor Documentation
| BpsScriptEngine::BpsScriptEngine |
( |
QObject * |
aParent = 0 | ) |
|
Standard constructor for the BpsScriptEngine objects.
- Parameters:
-
| [in] | aParent | Pointer to parent object. |
Member Function Documentation
| QString BpsScriptEngine::adjustFileName |
( |
const QString & |
aFilename | ) |
const |
Adjusts filename and checks for existance.
If the filename is provided without extension, .js will be appended. The file will also be searched in the plugins directory defined in HKLM/IBK Software AG/BPS2/plugins in case it is not found in first place.
- Parameters:
-
| [in] | aFilename | The file name to adjust. |
- Returns:
- The adjusted absolute file name
Prints a line to debug output.
- Parameters:
-
| [in] | aLine | The line to print. |
- Returns:
- Reference of current object.
| QScriptValue BpsScriptEngine::eval |
( |
const QString & |
aCode, |
|
|
const QString & |
aFilename, |
|
|
quint32 |
aLinenumber = 1 |
|
) |
| |
Evaluates script code, using aFilename as file name and aLinenumber as starting line number.
The script code will be evaluated in the current context. The evaluation can cause an exception in the engine; in this case the script exception will be converted and thrown as a BpsException.
- Parameters:
-
| [in] | aCode | The script code to evaluate. |
| [in] | aFilename | The file name reported in case of exceptions. |
| [in] | aLinenumber | The first line number to assume for the code fragment. |
- Returns:
- The value returned from the script code.
| QScriptValue BpsScriptEngine::eval |
( |
const QString & |
aFilename, |
|
|
quint32 |
aLinenumber = 1 |
|
) |
| |
Evaluates a script stored in a file.
If the filename is provided without extension, .js will be appended. The script code will be evaluated in the current context. The evaluation can cause an exception in the engine; in this case the script exception will be converted and thrown as a BpsException.
- Parameters:
-
| [in] | aFilename | The name of the file with the script code. |
| [in] | aLinenumber | The first line number to assume for the file. |
- Returns:
- The value returned from the script code.
Prints a line to stderr.
- Parameters:
-
| [in] | aLine | The line to print. |
- Returns:
- Reference of current object.
Prints a line to stdout.
- Parameters:
-
| [in] | aLine | The line to print. |
- Returns:
- Reference of current object.
| void BpsScriptEngine::writelnDebug |
( |
const QString & |
aLine | ) |
[signal] |
This signal is emitted whenever a line shall be written to the debugger output.
Connect this signal to a slot implementing that output.
- Parameters:
-
| [in] | aLine | The line that shall be written. |
| void BpsScriptEngine::writelnStderr |
( |
const QString & |
aLine | ) |
[signal] |
This signal is emitted whenever a line shall be written to the standard error output (stderr).
Connect this signal to a slot implementing that output.
- Parameters:
-
| [in] | aLine | The line that shall be written. |
| void BpsScriptEngine::writelnStdout |
( |
const QString & |
aLine | ) |
[signal] |
This signal is emitted whenever a line shall be written to the standard output (stdout).
Connect this signal to a slot implementing that output.
- Parameters:
-
| [in] | aLine | The line that shall be written. |
The documentation for this class was generated from the following file: