1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/extensions/activeqt/container/qaxscript.cpp -->
7
<title>Qt 4.0: QAxScriptEngine Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QAxScriptEngine Class Reference</h1>
21
<p>The QAxScriptEngine class provides a wrapper around a script engine. <a href="#details">More...</a></p>
22
<pre>#include <QAxScriptEngine></pre><p>Part of the <a href="qaxcontainer.html">QAxContainer</a> module.</p>
23
<p>Inherits <a href="qaxobject.html">QAxObject</a>.</p>
25
<li><a href="qaxscriptengine-members.html">List of all members, including inherited members</a></li>
27
<a name="public-types"></a>
30
<li><div class="fn"/>enum <b><a href="qaxscriptengine.html#State-enum">State</a></b> { Uninitialized, Initialized, Started, Connected, Disconnected, Closed }</li>
32
<a name="public-functions"></a>
33
<h3>Public Functions</h3>
35
<li><div class="fn"/><b><a href="qaxscriptengine.html#QAxScriptEngine">QAxScriptEngine</a></b> ( const QString & <i>language</i>, QAxScript * <i>script</i> )</li>
36
<li><div class="fn"/><b><a href="qaxscriptengine.html#dtor.QAxScriptEngine">~QAxScriptEngine</a></b> ()</li>
37
<li><div class="fn"/>void <b><a href="qaxscriptengine.html#addItem">addItem</a></b> ( const QString & <i>name</i> )</li>
38
<li><div class="fn"/>bool <b><a href="qaxscriptengine.html#hasIntrospection">hasIntrospection</a></b> () const</li>
39
<li><div class="fn"/>bool <b><a href="qaxscriptengine.html#isValid">isValid</a></b> () const</li>
40
<li><div class="fn"/>long <b><a href="qaxscriptengine.html#queryInterface">queryInterface</a></b> ( const QUuid & <i>uuid</i>, void ** <i>iface</i> ) const</li>
41
<li><div class="fn"/>QString <b><a href="qaxscriptengine.html#scriptLanguage">scriptLanguage</a></b> () const</li>
42
<li><div class="fn"/>void <b><a href="qaxscriptengine.html#setState">setState</a></b> ( State <i>st</i> )</li>
43
<li><div class="fn"/>State <b><a href="qaxscriptengine.html#state">state</a></b> () const</li>
46
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
47
<li><div class="fn"/>18 public functions inherited from <a href="qaxbase.html#public-functions">QAxBase</a></li>
49
<h3>Additional Inherited Members</h3>
51
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
52
<li><div class="fn"/>1 property inherited from <a href="qaxbase.html#properties">QAxBase</a></li>
53
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
54
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
55
<li><div class="fn"/>3 signals inherited from <a href="qaxbase.html#signals">QAxBase</a></li>
56
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
57
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
58
<li><div class="fn"/>5 protected functions inherited from <a href="qaxbase.html#protected-functions">QAxBase</a></li>
60
<a name="details"></a>
62
<h2>Detailed Description</h2>
63
<p>The QAxScriptEngine class provides a wrapper around a script engine.</p>
64
<p>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 <a href="qaxscript.html">QAxScript</a> and <a href="qaxscriptmanager.html">QAxScriptManager</a> classes provide convenient functions to handle and call script code.</p>
65
<p>Direct access to the script engine is provided through <a href="qaxscriptengine.html#queryInterface">queryInterface</a>().</p>
66
<p><b>Warning:</b> This class is not available with the bcc5.5 and MingW compilers.</p>
67
<p>See also <a href="qaxscript.html">QAxScript</a>, <a href="qaxscriptmanager.html">QAxScriptManager</a>, <a href="qaxbase.html">QAxBase</a>, and <a href="activeqt.html">ActiveQt Framework</a>.</p>
69
<h2>Member Type Documentation</h2>
70
<h3 class="fn"><a name="State-enum"></a>enum QAxScriptEngine::State</h3>
71
<p>The State enumeration defines the different states a script engine can be in.</p>
72
<table border="1" cellpadding="2" cellspacing="1" width="100%">
73
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
74
<tr><td valign="top"><tt>QAxScriptEngine::Uninitialized</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The script has been created, but not yet initialized</td></tr>
75
<tr><td valign="top"><tt>QAxScriptEngine::Initialized</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">The script has been initialized, but is not running</td></tr>
76
<tr><td valign="top"><tt>QAxScriptEngine::Started</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The script can execute code, but does not yet handle events</td></tr>
77
<tr><td valign="top"><tt>QAxScriptEngine::Connected</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The script can execute code and is connected so that it can handle events</td></tr>
78
<tr><td valign="top"><tt>QAxScriptEngine::Disconnected</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The script is loaded, but is not connected to event sources</td></tr>
79
<tr><td valign="top"><tt>QAxScriptEngine::Closed</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">The script has been closed.</td></tr>
82
<h2>Member Function Documentation</h2>
83
<h3 class="fn"><a name="QAxScriptEngine"></a>QAxScriptEngine::QAxScriptEngine ( const <a href="qstring.html">QString</a> & <i>language</i>, <a href="qaxscript.html">QAxScript</a> * <i>script</i> )</h3>
84
<p>Constructs a <a href="qaxscriptengine.html">QAxScriptEngine</a> object interpreting script code in <i>language</i> provided by the code in <i>script</i>. This is usually done by the <a href="qaxscript.html">QAxScript</a> class when <a href="qaxscript.html#load">loading a script</a>.</p>
85
<p>Instances of <a href="qaxscriptengine.html">QAxScriptEngine</a> should always have both a language and a script.</p>
86
<h3 class="fn"><a name="dtor.QAxScriptEngine"></a>QAxScriptEngine::~QAxScriptEngine ()</h3>
87
<p>Destroys the <a href="qaxscriptengine.html">QAxScriptEngine</a> object, releasing all allocated resources.</p>
88
<h3 class="fn"><a name="addItem"></a>void QAxScriptEngine::addItem ( const <a href="qstring.html">QString</a> & <i>name</i> )</h3>
89
<p>Registers an item with the script engine. Script code can refer to this item using <i>name</i>.</p>
90
<h3 class="fn"><a name="hasIntrospection"></a>bool QAxScriptEngine::hasIntrospection () const</h3>
91
<p>Returns true if the script engine supports introspection; otherwise returns false.</p>
92
<h3 class="fn"><a name="isValid"></a>bool QAxScriptEngine::isValid () const</h3>
93
<p>Returns true if the script engine has been initialized correctly; otherwise returns false.</p>
94
<h3 class="fn"><a name="queryInterface"></a>long QAxScriptEngine::queryInterface ( const <a href="quuid.html">QUuid</a> & <i>uuid</i>, void ** <i>iface</i> ) const</h3>
95
<p>Requests the interface <i>uuid</i> from the script engine object and sets the value of <i>iface</i> to the provided interface, or to 0 if the requested interface could not be provided.</p>
96
<p>Returns the result of the QueryInterface implementation of the COM object.</p>
97
<h3 class="fn"><a name="scriptLanguage"></a><a href="qstring.html">QString</a> QAxScriptEngine::scriptLanguage () const</h3>
98
<p>Returns the scripting language, for example "VBScript", or "JScript".</p>
99
<h3 class="fn"><a name="setState"></a>void QAxScriptEngine::setState ( <a href="qaxscriptengine.html#State-enum">State</a> <i>st</i> )</h3>
100
<p>Sets the state of the script engine to <i>st</i>. Calling this function is usually not necessary.</p>
101
<h3 class="fn"><a name="state"></a><a href="qaxscriptengine.html#State-enum">State</a> QAxScriptEngine::state () const</h3>
102
<p>Returns the state of the script engine.</p>
103
<p /><address><hr /><div align="center">
104
<table width="100%" cellspacing="0" border="0"><tr class="address">
105
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
106
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
107
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
108
</tr></table></div></address></body>