summaryrefslogtreecommitdiffstats
path: root/qtscriptclassic/doc/html/qscriptclasspropertyiterator.html
blob: af2548d2caa017d816f2f9b688107d1c536180d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qscriptclasspropertyiterator.cpp -->
<head>
  <title>QScriptClassPropertyIterator Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
</tr></table><h1 class="title">QScriptClassPropertyIterator Class Reference<br /><span class="small-subtitle">[<a href="http://qt.nokia.com/doc/4.6/qtscript.html">QtScript</a> module]</span>
</h1>
<p>The QScriptClassPropertyIterator class provides an iterator interface for custom Qt Script objects. <a href="#details">More...</a></p>
<pre> #include &lt;QScriptClassPropertyIterator&gt;</pre><p><b>This class is not part of the Qt GUI Framework Edition.</b></p>
<p>This class was introduced in qtscriptclassic 4.4.</p>
<ul>
<li><a href="qscriptclasspropertyiterator-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#dtor.QScriptClassPropertyIterator">~QScriptClassPropertyIterator</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QScriptValue::PropertyFlags </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#flags">flags</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#hasNext">hasNext</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#hasPrevious">hasPrevious</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual uint </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#id">id</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QScriptString </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#name">name</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#next">next</a></b> () = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QScriptValue </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#object">object</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#previous">previous</a></b> () = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#toBack">toBack</a></b> () = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#toFront">toFront</a></b> () = 0</td></tr>
</table>
<hr />
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qscriptclasspropertyiterator.html#QScriptClassPropertyIterator">QScriptClassPropertyIterator</a></b> ( const QScriptValue &amp; <i>object</i> )</td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QScriptClassPropertyIterator class provides an iterator interface for custom Qt Script objects.</p>
<p>This class is only relevant if you have subclassed <a href="qscriptclass.html">QScriptClass</a> and want to provide enumeration of your custom properties (e.g&#x2e; when objects of your class are used with <a href="qscriptvalueiterator.html">QScriptValueIterator</a>, or with the for-in statement in scripts).</p>
<p>The <a href="qscriptclasspropertyiterator.html#object">object</a>() function returns the Qt Script object the iterator is traversing.</p>
<p><a href="qscriptclasspropertyiterator.html#toFront">toFront</a>(), <a href="qscriptclasspropertyiterator.html#hasNext">hasNext</a>() and <a href="qscriptclasspropertyiterator.html#next">next</a>() provide forward iteration.</p>
<p><a href="qscriptclasspropertyiterator.html#toBack">toBack</a>(), <a href="qscriptclasspropertyiterator.html#hasPrevious">hasPrevious</a>() and <a href="qscriptclasspropertyiterator.html#previous">previous</a>() provide backward iteration.</p>
<p><a href="qscriptclasspropertyiterator.html#name">name</a>(), <a href="qscriptclasspropertyiterator.html#id">id</a>() and <a href="qscriptclasspropertyiterator.html#flags">flags</a>() return information about the last property that was jumped over using <a href="qscriptclasspropertyiterator.html#next">next</a>() or <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<p>See also <a href="qscriptclass.html#newIterator">QScriptClass::newIterator</a>() and <a href="qscriptvalueiterator.html">QScriptValueIterator</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QScriptClassPropertyIterator"></a>QScriptClassPropertyIterator::QScriptClassPropertyIterator ( const <a href="qscriptvalue.html">QScriptValue</a> &amp; <i>object</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Constructs an iterator for traversing <i>object</i>.</p>
<p>Subclasses should ensure that the iterator is set to the front of the sequence of properties (before the first property).</p>
<h3 class="fn"><a name="dtor.QScriptClassPropertyIterator"></a>QScriptClassPropertyIterator::~QScriptClassPropertyIterator ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Destroys the iterator.</p>
<h3 class="fn"><a name="flags"></a><a href="qscriptvalue.html#PropertyFlag-enum">QScriptValue::PropertyFlags</a> QScriptClassPropertyIterator::flags () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the flags of the last property that was jumped over using <a href="qscriptclasspropertyiterator.html#next">next</a>() or <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<p>The default implementation calls the propertyFlags() function of <a href="qscriptclasspropertyiterator.html#object">object</a>() with argument <a href="qscriptclasspropertyiterator.html#name">name</a>().</p>
<h3 class="fn"><a name="hasNext"></a>bool QScriptClassPropertyIterator::hasNext () const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Returns true if there is at least one item ahead of the iterator (i.e&#x2e; the iterator is <i>not</i> at the back of the property sequence); otherwise returns false.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#next">next</a>() and <a href="qscriptclasspropertyiterator.html#hasPrevious">hasPrevious</a>().</p>
<h3 class="fn"><a name="hasPrevious"></a>bool QScriptClassPropertyIterator::hasPrevious () const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Returns true if there is at least one item behind the iterator (i.e&#x2e; the iterator is <i>not</i> at the front of the property sequence); otherwise returns false.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#previous">previous</a>() and <a href="qscriptclasspropertyiterator.html#hasNext">hasNext</a>().</p>
<h3 class="fn"><a name="id"></a><a href="http://qt.nokia.com/doc/4.6/qtglobal.html#uint-typedef">uint</a> QScriptClassPropertyIterator::id () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the id of the last property that was jumped over using <a href="qscriptclasspropertyiterator.html#next">next</a>() or <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<p>The default implementation returns 0.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#name">name</a>().</p>
<h3 class="fn"><a name="name"></a><a href="qscriptstring.html">QScriptString</a> QScriptClassPropertyIterator::name () const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Returns the name of the last property that was jumped over using <a href="qscriptclasspropertyiterator.html#next">next</a>() or <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<p>See also <a href="qscriptclasspropertyiterator.html#id">id</a>().</p>
<h3 class="fn"><a name="next"></a>void QScriptClassPropertyIterator::next ()&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Advances the iterator by one position.</p>
<p>Calling this function on an iterator located at the back of the container leads to undefined results.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#hasNext">hasNext</a>(), <a href="qscriptclasspropertyiterator.html#previous">previous</a>(), and <a href="qscriptclasspropertyiterator.html#name">name</a>().</p>
<h3 class="fn"><a name="object"></a><a href="qscriptvalue.html">QScriptValue</a> QScriptClassPropertyIterator::object () const</h3>
<p>Returns the Qt Script object this iterator is traversing.</p>
<h3 class="fn"><a name="previous"></a>void QScriptClassPropertyIterator::previous ()&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Moves the iterator back by one position.</p>
<p>Calling this function on an iterator located at the front of the container leads to undefined results.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#hasPrevious">hasPrevious</a>(), <a href="qscriptclasspropertyiterator.html#next">next</a>(), and <a href="qscriptclasspropertyiterator.html#name">name</a>().</p>
<h3 class="fn"><a name="toBack"></a>void QScriptClassPropertyIterator::toBack ()&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Moves the iterator to the back of the <a href="qscriptvalue.html">QScriptValue</a> (after the last property).</p>
<p>See also <a href="qscriptclasspropertyiterator.html#toFront">toFront</a>() and <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<h3 class="fn"><a name="toFront"></a>void QScriptClassPropertyIterator::toFront ()&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
<p>Moves the iterator to the front of the <a href="qscriptvalue.html">QScriptValue</a> (before the first property).</p>
<p>See also <a href="qscriptclasspropertyiterator.html#toBack">toBack</a>() and <a href="qscriptclasspropertyiterator.html#next">next</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
</tr></table></div></address></body>
</html>