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
|
<?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">
<!-- qtsoap.cpp -->
<head>
<title>QtSoapArrayIterator 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"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
</tr></table><h1 class="title">QtSoapArrayIterator Class Reference</h1>
<p>The QtSoapArrayIterator class provides an iterator for traversing the items in a <a href="qtsoaparray.html">QtSoapArray</a>. <a href="#details">More...</a></p>
<pre> #include <QtSoapArrayIterator></pre><ul>
<li><a href="qtsoaparrayiterator-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"></td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#QtSoapArrayIterator">QtSoapArrayIterator</a></b> ( QtSoapArray & <i>array</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#QtSoapArrayIterator-2">QtSoapArrayIterator</a></b> ( const QtSoapArrayIterator & <i>copy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#dtor.QtSoapArrayIterator">~QtSoapArrayIterator</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#atEnd">atEnd</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QtSoapType * </td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#current">current</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QtSoapType * </td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#data">data</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#pos">pos</a></b> ( int * <i>pos0</i>, int * <i>pos1</i> = 0, int * <i>pos2</i> = 0, int * <i>pos3</i> = 0, int * <i>pos4</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#pos-2">pos</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#operator-not-eq">operator!=</a></b> ( const QtSoapArrayIterator & <i>j</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#operator-2b-2b">operator++</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QtSoapArrayIterator & </td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#operator-eq">operator=</a></b> ( const QtSoapArrayIterator & <i>copy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtsoaparrayiterator.html#operator-eq-eq">operator==</a></b> ( const QtSoapArrayIterator & <i>j</i> ) const</td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QtSoapArrayIterator class provides an iterator for traversing the items in a <a href="qtsoaparray.html">QtSoapArray</a>.</p>
<p>The items are traversed in ascending order of index position, depth first.</p>
<pre><span class="comment"> // Construct a 2x2 array of Strings.</span>
QtSoapArray array("Array of strings", String, 2, 2);
array.insert(0, 0, new QtSoapSimpleType(Q4SoapQName("top left"), "top left");
array.insert(0, 1, new QtSoapSimpleType(Q4SoapQName("top right"), "top right");
array.insert(1, 0, new QtSoapSimpleType(Q4SoapQName("bottom left"), "bottom left");
array.insert(1, 1, new QtSoapSimpleType(Q4SoapQName("bottom right"), "bottom right");
<span class="comment"> // Traverse all items.</span>
QtSoapArrayIterator it(array);
while (!it.current()) {
<span class="comment">// Find the position of the current element.</span>
int pos1, pos2;
it.pos(&pos1, &pos2);
qDebug() << "Position (" << pos1 << ", " << pos2 << ") is "
<< "the " << it.current()->toString() << " coordinate of the grid." << endl;
++it;
}</pre>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QtSoapArrayIterator"></a>QtSoapArrayIterator::QtSoapArrayIterator ( <a href="qtsoaparray.html">QtSoapArray</a> & <i>array</i> )</h3>
<p>Constructs a <a href="qtsoaparrayiterator.html">QtSoapArrayIterator</a> on <i>array</i>, initializing the iterator to point to the first element.</p>
<h3 class="fn"><a name="QtSoapArrayIterator-2"></a>QtSoapArrayIterator::QtSoapArrayIterator ( const QtSoapArrayIterator & <i>copy</i> )</h3>
<p>Constructs a <a href="qtsoaparrayiterator.html">QtSoapArrayIterator</a> that is a copy of <i>copy</i>.</p>
<h3 class="fn"><a name="dtor.QtSoapArrayIterator"></a>QtSoapArrayIterator::~QtSoapArrayIterator ()</h3>
<p>Destructs the <a href="qtsoaparrayiterator.html">QtSoapArrayIterator</a>.</p>
<h3 class="fn"><a name="atEnd"></a>bool QtSoapArrayIterator::atEnd () const</h3>
<p>Returns false if this iterator points to an item in the array, otherwise true.</p>
<h3 class="fn"><a name="current"></a>const <a href="qtsoaptype.html">QtSoapType</a> * QtSoapArrayIterator::current () const</h3>
<p>Returns a reference to the item that the iterator is currently pointing to.</p>
<h3 class="fn"><a name="data"></a><a href="qtsoaptype.html">QtSoapType</a> * QtSoapArrayIterator::data ()</h3>
<p>Returns a reference to the item that the iterator is currently pointing to.</p>
<h3 class="fn"><a name="pos"></a>void QtSoapArrayIterator::pos ( int * <i>pos0</i>, int * <i>pos1</i> = 0, int * <i>pos2</i> = 0, int * <i>pos3</i> = 0, int * <i>pos4</i> = 0 ) const</h3>
<p>Populates the arguments <i>pos0</i>, <i>pos1</i>, <i>pos2</i>, <i>pos3</i> and <i>pos4</i> with the coordinate of the current position of the iterator. For a one dimensional array, only <i>pos0</i> is populated. For a two dimensional array, <i>pos0</i> and <i>pos1</i> are populated, and so on.</p>
<p>Any of the arguments that are 0-pointers are ignored.</p>
<h3 class="fn"><a name="pos-2"></a>int QtSoapArrayIterator::pos () const</h3>
<p>This is an overloaded function.</p>
<p>Returns the ordinal position of the iterator. Works for arrays of any dimension, but is only useful for one dimensional arrays.</p>
<h3 class="fn"><a name="operator-not-eq"></a>bool QtSoapArrayIterator::operator!= ( const QtSoapArrayIterator & <i>j</i> ) const</h3>
<p>Returns true if this Iterator's position is not equal to the position of <i>j</i>; otherwise returns false.</p>
<h3 class="fn"><a name="operator-2b-2b"></a>void QtSoapArrayIterator::operator++ ()</h3>
<p>Moves the iterator position to the next item in the array.</p>
<h3 class="fn"><a name="operator-eq"></a>QtSoapArrayIterator & QtSoapArrayIterator::operator= ( const QtSoapArrayIterator & <i>copy</i> )</h3>
<p>Assignment operator of <a href="qtsoaparrayiterator.html">QtSoapArrayIterator</a>. Makes this iterator a copy of <i>copy</i>.</p>
<h3 class="fn"><a name="operator-eq-eq"></a>bool QtSoapArrayIterator::operator== ( const QtSoapArrayIterator & <i>j</i> ) const</h3>
<p>Returns true if this Iterator's position is equal to the position of <i>j</i>; otherwise returns false.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%" align="left">Copyright © 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>
|