QAxScriptEngine Class
The QAxScriptEngine class provides a wrapper around a script engine. More...
Header: | #include <QAxScriptEngine> |
qmake: | QT += axcontainer |
Inherits: | QAxObject |
Public Types
enum | State { Uninitialized, Initialized, Started, Connected, Disconnected, Closed } |
Public Functions
QAxScriptEngine(const QString &language, QAxScript *script) | |
virtual | ~QAxScriptEngine() override |
void | addItem(const QString &name) |
bool | hasIntrospection() const |
bool | isValid() const |
long | queryInterface(const QUuid &uuid, void **iface) const |
QString | scriptLanguage() const |
void | setState(QAxScriptEngine::State st) |
QAxScriptEngine::State | state() const |
- 1 public function inherited from QAxObject
- 31 public functions inherited from QObject
- 19 public functions inherited from QAxBase
Reimplemented Protected Functions
virtual bool | initialize(IUnknown **ptr) override |
- 1 protected function inherited from QAxObject
- 9 protected functions inherited from QObject
- 5 protected functions inherited from QAxBase
Additional Inherited Members
- 1 property inherited from QObject
- 1 property inherited from QAxBase
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 3 signals inherited from QAxBase
- 9 static public members inherited from QObject
- 1 protected function inherited from QAxObject
- 9 protected functions inherited from QObject
- 5 protected functions inherited from QAxBase
Detailed Description
The QAxScriptEngine class provides a wrapper around a script engine.
Every instance of the QAxScriptEngine class represents an interpreter for script code in a particular scripting language. The class is usually not used directly. The QAxScript and QAxScriptManager classes provide convenient functions to handle and call script code.
Direct access to the script engine is provided through queryInterface().
Warning: This class is not available with the bcc5.5 compiler.
See also QAxScript, QAxScriptManager, QAxBase, and ActiveQt Framework.
Member Type Documentation
enum QAxScriptEngine::State
The State enumeration defines the different states a script engine can be in.
Constant | Value | Description |
---|---|---|
QAxScriptEngine::Uninitialized |
0 |
The script has been created, but not yet initialized |
QAxScriptEngine::Initialized |
5 |
The script has been initialized, but is not running |
QAxScriptEngine::Started |
1 |
The script can execute code, but does not yet handle events |
QAxScriptEngine::Connected |
2 |
The script can execute code and is connected so that it can handle events |
QAxScriptEngine::Disconnected |
3 |
The script is loaded, but is not connected to event sources |
QAxScriptEngine::Closed |
4 |
The script has been closed. |
Member Function Documentation
QAxScriptEngine::QAxScriptEngine(const QString &language, QAxScript *script)
Constructs a QAxScriptEngine object interpreting script code in language provided by the code in script. This is usually done by the QAxScript class when loading a script.
Instances of QAxScriptEngine should always have both a language and a script.
[override virtual]
QAxScriptEngine::~QAxScriptEngine()
Destroys the QAxScriptEngine object, releasing all allocated resources.
void QAxScriptEngine::addItem(const QString &name)
Registers an item with the script engine. Script code can refer to this item using name.
bool QAxScriptEngine::hasIntrospection() const
Returns true if the script engine supports introspection; otherwise returns false.
[override virtual protected]
bool QAxScriptEngine::initialize(IUnknown **ptr)
Reimplemented from QAxBase::initialize().
bool QAxScriptEngine::isValid() const
Returns true if the script engine has been initialized correctly; otherwise returns false.
long QAxScriptEngine::queryInterface(const QUuid &uuid, void **iface) const
Requests the interface uuid from the script engine object and sets the value of iface to the provided interface, or to 0 if the requested interface could not be provided.
Returns the result of the QueryInterface implementation of the COM object.
QString QAxScriptEngine::scriptLanguage() const
Returns the scripting language, for example "VBScript", or "JScript".
void QAxScriptEngine::setState(QAxScriptEngine::State st)
Sets the state of the script engine to st. Calling this function is usually not necessary.
See also state().
QAxScriptEngine::State QAxScriptEngine::state() const
Returns the state of the script engine.
See also setState().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.12/qaxscriptengine.html