QAxScriptEngine Class
QAxScriptEngine 클래스는 스크립트 엔진에 대한 래퍼를 제공합니다. 더 보기...
헤더: | #include <QAxScriptEngine> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS AxContainer) target_link_libraries(mytarget PRIVATE Qt6::AxContainer) |
qmake: | QT += axcontainer |
상속합니다: | QAxObject |
공용 타입
enum | State { Uninitialized, Initialized, Started, Connected, Disconnected, Closed } |
공용 함수
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 |
재구현된 보호 함수
virtual bool | initialize(IUnknown **ptr) override |
상세 설명
QAxScriptEngine 클래스의 모든 인스턴스는 특정 스크립트 언어의 스크립트 코드에 대한 인터프리터를 나타냅니다. 이 클래스는 일반적으로 직접 사용되지 않습니다. QAxScript 및 QAxScriptManager 클래스는 스크립트 코드를 처리하고 호출하기 위한 편리한 함수를 제공합니다.
스크립트 엔진에 대한 직접 액세스는 queryInterface()를 통해 제공됩니다.
경고: 이 클래스는 bcc5.5 컴파일러에서 사용할 수 없습니다.
QAxScript, QAxScriptManager, QAxBase 및 ActiveQt 프레임워크도참조하세요 .
멤버 유형 문서
enum QAxScriptEngine::State
상태 열거형은 스크립트 엔진이 있을 수 있는 다양한 상태를 정의합니다.
Constant | 값 | 설명 |
---|---|---|
QAxScriptEngine::Uninitialized | 0 | 스크립트가 생성되었지만 아직 초기화되지 않았습니다. |
QAxScriptEngine::Initialized | 5 | 스크립트가 초기화되었지만 실행 중이 아닙니다. |
QAxScriptEngine::Started | 1 | 스크립트가 코드를 실행할 수 있지만 아직 이벤트를 처리하지 않습니다. |
QAxScriptEngine::Connected | 2 | 스크립트가 코드를 실행할 수 있으며 이벤트를 처리할 수 있도록 연결되어 있습니다. |
QAxScriptEngine::Disconnected | 3 | 스크립트가 로드되었지만 이벤트 소스에 연결되어 있지 않습니다. |
QAxScriptEngine::Closed | 4 | 스크립트가 닫혔습니다. |
멤버 함수 문서
QAxScriptEngine::QAxScriptEngine(const QString &language, QAxScript *script)
script 의 코드에서 제공한 language 에서 스크립트 코드를 해석하는 QAxScriptEngine 객체를 생성합니다. 이는 일반적으로 loading a script 에서 QAxScript 클래스에 의해 수행됩니다.
QAxScriptEngine의 인스턴스는 항상 언어와 스크립트를 모두 가져야 합니다.
[override virtual noexcept]
QAxScriptEngine::~QAxScriptEngine()
QAxScriptEngine 객체를 파괴하여 할당된 모든 리소스를 해제합니다.
void QAxScriptEngine::addItem(const QString &name)
스크립트 엔진에 항목을 등록합니다. 스크립트 코드는 name 을 사용하여 이 항목을 참조할 수 있습니다.
bool QAxScriptEngine::hasIntrospection() const
스크립트 엔진이 인트로스펙션을 지원하면 true를 반환하고, 그렇지 않으면 false를 반환합니다.
[override virtual protected]
bool QAxScriptEngine::initialize(IUnknown **ptr)
다시 구현합니다: QAxBase::initialize(IUnknown **ptr).
bool QAxScriptEngine::isValid() const
스크립트 엔진이 올바르게 초기화되면 참을 반환하고, 그렇지 않으면 거짓을 반환합니다.
long QAxScriptEngine::queryInterface(const QUuid &uuid, void **iface) const
스크립트 엔진 객체에서 uuid 인터페이스를 요청하고 iface 값을 제공된 인터페이스로 설정하거나 요청된 인터페이스를 제공할 수 없는 경우 0으로 설정합니다.
COM 객체의 QueryInterface 구현 결과를 반환합니다.
QString QAxScriptEngine::scriptLanguage() const
스크립팅 언어(예: "VBScript" 또는 "JScript")를 반환합니다.
void QAxScriptEngine::setState(QAxScriptEngine::State st)
스크립트 엔진의 상태를 st 로 설정합니다. 일반적으로 이 함수를 호출할 필요는 없습니다.
state()도 참조하세요 .
QAxScriptEngine::State QAxScriptEngine::state() const
스크립트 엔진의 상태를 반환합니다.
setState()도 참조하세요 .
© 2025 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 the GNU 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.