Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QAxScriptEngine Class

TheQAxScriptEngine class provides a wrapper around a script engine.More...

Header:#include <QAxScriptEngine>
Inherits:QAxObject

Public Types

enumState { Uninitialized, Initialized, Started, Connected, Disconnected, Closed }

Public Functions

QAxScriptEngine(const QString & language, QAxScript * script)
~QAxScriptEngine()
voidaddItem(const QString & name)
boolhasIntrospection() const
boolisValid() const
longqueryInterface(const QUuid & uuid, void ** iface) const
QStringscriptLanguage() const
voidsetState(State st)
Statestate() const
  • 1 public function inherited fromQAxObject
  • 29 public functions inherited fromQObject
  • 19 public functions inherited fromQAxBase

Reimplemented Protected Functions

virtual boolinitialize(IUnknown ** ptr)
  • 1 protected function inherited fromQAxObject
  • 8 protected functions inherited fromQObject
  • 5 protected functions inherited fromQAxBase

Additional Inherited Members

  • 1 property inherited fromQObject
  • 1 property inherited fromQAxBase
  • 1 public slot inherited fromQObject
  • 1 signal inherited fromQObject
  • 3 signals inherited fromQAxBase
  • 7 static public members inherited fromQObject
  • 1 protected function inherited fromQAxObject
  • 8 protected functions inherited fromQObject
  • 5 protected functions inherited fromQAxBase

Detailed Description

TheQAxScriptEngine class provides a wrapper around a script engine.

Every instance of theQAxScriptEngine class represents an interpreter for script code in a particular scripting language. The class is usually not used directly. TheQAxScript andQAxScriptManager classes provide convenient functions to handle and call script code.

Direct access to the script engine is provided throughqueryInterface().

Warning: This class is not available with the bcc5.5 and MingW compilers.

See alsoQAxScript,QAxScriptManager,QAxBase, andActiveQt Framework.

Member Type Documentation

enum QAxScriptEngine::State

The State enumeration defines the different states a script engine can be in.

ConstantValueDescription
QAxScriptEngine::Uninitialized0The script has been created, but not yet initialized
QAxScriptEngine::Initialized5The script has been initialized, but is not running
QAxScriptEngine::Started1The script can execute code, but does not yet handle events
QAxScriptEngine::Connected2The script can execute code and is connected so that it can handle events
QAxScriptEngine::Disconnected3The script is loaded, but is not connected to event sources
QAxScriptEngine::Closed4The script has been closed.

Member Function Documentation

QAxScriptEngine::QAxScriptEngine(constQString & language,QAxScript * script)

Constructs aQAxScriptEngine object interpreting script code inlanguage provided by the code inscript. This is usually done by theQAxScript class whenloading a script.

Instances ofQAxScriptEngine should always have both a language and a script.

QAxScriptEngine::~QAxScriptEngine()

Destroys theQAxScriptEngine object, releasing all allocated resources.

void QAxScriptEngine::addItem(constQString & name)

Registers an item with the script engine. Script code can refer to this item usingname.

bool QAxScriptEngine::hasIntrospection() const

Returns true if the script engine supports introspection; otherwise returns false.

[virtual protected]bool QAxScriptEngine::initialize(IUnknown ** ptr)

Reimplemented fromQAxBase::initialize().

bool QAxScriptEngine::isValid() const

Returns true if the script engine has been initialized correctly; otherwise returns false.

long QAxScriptEngine::queryInterface(constQUuid & uuid,void ** iface) const

Requests the interfaceuuid from the script engine object and sets the value ofiface 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(State st)

Sets the state of the script engine tost. Calling this function is usually not necessary.

See alsostate().

State QAxScriptEngine::state() const

Returns the state of the script engine.

See alsosetState().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp