summaryrefslogtreecommitdiffstats
path: root/qtsoap/doc/html/qtsoapstruct.html
blob: 4d9ac860aaaa290ae59c70ecaf4daed77a21244c (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?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>QtSoapStruct 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">QtSoapStruct Class Reference</h1>
<p>The QtSoapStruct class is an implementation of the SOAP struct type. <a href="#details">More...</a></p>
<pre> #include &lt;QtSoapStruct&gt;</pre><p>Inherits <a href="qtsoaptype.html">QtSoapType</a>.</p>
<ul>
<li><a href="qtsoapstruct-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="qtsoapstruct.html#QtSoapStruct">QtSoapStruct</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#QtSoapStruct-2">QtSoapStruct</a></b> ( const QtSoapQName &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#QtSoapStruct-3">QtSoapStruct</a></b> ( const QtSoapStruct &amp; <i>copy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#dtor.QtSoapStruct">~QtSoapStruct</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QtSoapType &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#at">at</a></b> ( const QtSoapQName &amp; <i>key</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QtSoapType &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#at-2">at</a></b> ( const QtSoapQName &amp; <i>key</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#insert">insert</a></b> ( QtSoapType * <i>item</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QtSoapStruct &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#operator-eq">operator=</a></b> ( const QtSoapStruct &amp; <i>copy</i> )</td></tr>
</table>
<hr />
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#count">count</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#parse">parse</a></b> ( QDomNode <i>node</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QDomElement </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#toDomElement">toDomElement</a></b> ( QDomDocument <i>doc</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QtSoapType &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#operator-5b-5d">operator[]</a></b> ( const QtSoapQName &amp; <i>key</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const QtSoapType &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#operator-5b-5d-2">operator[]</a></b> ( const QtSoapQName &amp; <i>key</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QtSoapType &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#operator-5b-5d-3">operator[]</a></b> ( const QString &amp; <i>key</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const QtSoapType &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#operator-5b-5d-4">operator[]</a></b> ( const QString &amp; <i>key</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QtSoapType &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#operator-5b-5d-5">operator[]</a></b> ( int <i>i</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const QtSoapType &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapstruct.html#operator-5b-5d-6">operator[]</a></b> ( int <i>i</i> ) const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>25 public functions inherited from <a href="qtsoaptype.html#public-functions">QtSoapType</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>2 static public members inherited from <a href="qtsoaptype.html#static-public-members">QtSoapType</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QtSoapStruct class is an implementation of the SOAP struct type.</p>
<p>A SOAP struct is a dictionary of QtSoapTypes where entries are looked up by name. Entries in a struct can be of any <a href="qtsoaptype.html">QtSoapType</a> type, such as <a href="qtsoaparray.html">QtSoapArray</a>, QtSoapStruct or <a href="qtsoapsimpletype.html">QtSoapSimpleType</a>.</p>
<p>The struct can be created in several ways. <a href="qtsoapstruct.html#parse">parse</a>() generates a struct by analyzing a <a href="http://qt.nokia.com/doc/4.6/qdomnode.html">QDomNode</a>. <a href="qtsoapstruct.html#insert">insert</a>() is used to add items manually.</p>
<pre> QtSoapStruct myStruct(QtSoapQName(&quot;myStruct&quot;));

 myStruct.insert(new QtSoapSimpleType(QtSoapQName(&quot;item1&quot;), 5));
 myStruct.insert(new QtSoapSimpleType(QtSoapQName(&quot;item2&quot;), &quot;hello&quot;));
 myStruct.insert(new QtSoapSimpleType(QtSoapQName(&quot;item3&quot;), true));</pre>
<p>Use the operator[]() or <a href="qtsoapstruct.html#at">at</a>() when looking up entries in a struct by name. If the names are unknown, <a href="qtsoapstructiterator.html">QtSoapStructIterator</a> lets you iterate through all the items.</p>
<pre> QtSoapType &amp;helloItem = myStruct[&quot;Hello&quot;];</pre>
<p><a href="qtsoapstruct.html#toDomElement">toDomElement</a>() converts the QtSoapStruct to a DomElement.</p>
<p>See also <a href="qtsoapstructiterator.html">QtSoapStructIterator</a>, <a href="qtsoaptype.html">QtSoapType</a>, <a href="qtsoaparray.html">QtSoapArray</a>, and <a href="qtsoapsimpletype.html">QtSoapSimpleType</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QtSoapStruct"></a>QtSoapStruct::QtSoapStruct ()</h3>
<p>Constructs an empty <a href="qtsoapstruct.html">QtSoapStruct</a>.</p>
<h3 class="fn"><a name="QtSoapStruct-2"></a>QtSoapStruct::QtSoapStruct ( const <a href="qtsoapqname.html">QtSoapQName</a> &amp; <i>name</i> )</h3>
<p>Constructs an empty <a href="qtsoapstruct.html">QtSoapStruct</a> and sets its <a href="qtsoaptype.html#Type-enum">QName</a> (qualified name) to <i>name</i>.</p>
<h3 class="fn"><a name="QtSoapStruct-3"></a>QtSoapStruct::QtSoapStruct ( const QtSoapStruct &amp; <i>copy</i> )</h3>
<p>Constructs a <a href="qtsoapstruct.html">QtSoapStruct</a> that is a copy of <i>copy</i>.</p>
<h3 class="fn"><a name="dtor.QtSoapStruct"></a>QtSoapStruct::~QtSoapStruct ()</h3>
<p>Destructs the <a href="qtsoapstruct.html">QtSoapStruct</a>.</p>
<h3 class="fn"><a name="at"></a><a href="qtsoaptype.html">QtSoapType</a> &amp; QtSoapStruct::at ( const <a href="qtsoapqname.html">QtSoapQName</a> &amp; <i>key</i> )</h3>
<p>Returns a reference to the item in this struct whose <a href="qtsoaptype.html#Type-enum">QName</a> (qualified name) is <i>key</i>. If no such item exists, an empty <a href="qtsoaptype.html">QtSoapType</a> is returned.</p>
<h3 class="fn"><a name="at-2"></a>const <a href="qtsoaptype.html">QtSoapType</a> &amp; QtSoapStruct::at ( const <a href="qtsoapqname.html">QtSoapQName</a> &amp; <i>key</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns a reference to the item in this struct whose <a href="qtsoaptype.html#Type-enum">QName</a> (qualified name) is <i>key</i>. If no such item exists, an empty <a href="qtsoaptype.html">QtSoapType</a> is returned.</p>
<h3 class="fn"><a name="clear"></a>void QtSoapStruct::clear ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#clear">QtSoapType::clear</a>().</p>
<p>Removes all items from the struct.</p>
<h3 class="fn"><a name="count"></a>int QtSoapStruct::count () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#count">QtSoapType::count</a>().</p>
<p>Returns the number of items in this struct.</p>
<h3 class="fn"><a name="insert"></a>void QtSoapStruct::insert ( <a href="qtsoaptype.html">QtSoapType</a> * <i>item</i> )</h3>
<p>Inserts the <a href="qtsoaptype.html">QtSoapType</a> <i>item</i> into this struct. Any existing item with the same <a href="qtsoaptype.html#Type-enum">QName</a> (qualified name) will be erased.</p>
<h3 class="fn"><a name="isValid"></a>bool QtSoapStruct::isValid () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#isValid">QtSoapType::isValid</a>().</p>
<h3 class="fn"><a name="parse"></a>bool QtSoapStruct::parse ( <a href="http://qt.nokia.com/doc/4.6/qdomnode.html">QDomNode</a> <i>node</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#parse">QtSoapType::parse</a>().</p>
<p>Inspects <i>node</i> and constructs the equivalent <a href="qtsoapstruct.html">QtSoapStruct</a> if <i>node</i> qualifies as a SOAP struct. Returns true if it does; otherwise returns false.</p>
<h3 class="fn"><a name="toDomElement"></a><a href="http://qt.nokia.com/doc/4.6/qdomelement.html">QDomElement</a> QtSoapStruct::toDomElement ( <a href="http://qt.nokia.com/doc/4.6/qdomdocument.html">QDomDocument</a> <i>doc</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#toDomElement">QtSoapType::toDomElement</a>().</p>
<p>Generates the <a href="http://qt.nokia.com/doc/4.6/qdomelement.html">QDomElement</a> representation of this struct. The returned <a href="http://qt.nokia.com/doc/4.6/qdomelement.html">QDomElement</a> is created using <i>doc</i>.</p>
<h3 class="fn"><a name="operator-eq"></a>QtSoapStruct &amp; QtSoapStruct::operator= ( const QtSoapStruct &amp; <i>copy</i> )</h3>
<p>Makes this struct a copy of <i>copy</i>.</p>
<h3 class="fn"><a name="operator-5b-5d"></a><a href="qtsoaptype.html">QtSoapType</a> &amp; QtSoapStruct::operator[] ( const <a href="qtsoapqname.html">QtSoapQName</a> &amp; <i>key</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#operator-5b-5d-2">QtSoapType::operator[]</a>().</p>
<p>Returns a reference to the item in this struct whose <a href="qtsoaptype.html#Type-enum">QName</a> (qualified name) is <i>key</i>. If no such item exists, an empty <a href="qtsoaptype.html">QtSoapType</a> is returned.</p>
<h3 class="fn"><a name="operator-5b-5d-2"></a>const <a href="qtsoaptype.html">QtSoapType</a> &amp; QtSoapStruct::operator[] ( const <a href="qtsoapqname.html">QtSoapQName</a> &amp; <i>key</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#operator-5b-5d-5">QtSoapType::operator[]</a>().</p>
<p>This is an overloaded function.</p>
<p>Returns a reference to the item in this struct whose <a href="qtsoaptype.html#Type-enum">QName</a> (qualified name) is <i>key</i>. If no such item exists, an empty <a href="qtsoaptype.html">QtSoapType</a> is returned.</p>
<h3 class="fn"><a name="operator-5b-5d-3"></a><a href="qtsoaptype.html">QtSoapType</a> &amp; QtSoapStruct::operator[] ( const <a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> &amp; <i>key</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#operator-5b-5d-3">QtSoapType::operator[]</a>().</p>
<p>This is an overloaded function.</p>
<p>Returns a reference to the item in this struct whose <a href="qtsoaptype.html#Type-enum">QName</a> (qualified name) is <i>key</i>. If no such item exists, an empty <a href="qtsoaptype.html">QtSoapType</a> is returned.</p>
<h3 class="fn"><a name="operator-5b-5d-4"></a>const <a href="qtsoaptype.html">QtSoapType</a> &amp; QtSoapStruct::operator[] ( const <a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> &amp; <i>key</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#operator-5b-5d-6">QtSoapType::operator[]</a>().</p>
<p>This is an overloaded function.</p>
<p>Returns a reference to the item in this struct whose <a href="qtsoaptype.html#Type-enum">QName</a> (qualified name) is <i>key</i>. If no such item exists, an empty <a href="qtsoaptype.html">QtSoapType</a> is returned.</p>
<h3 class="fn"><a name="operator-5b-5d-5"></a><a href="qtsoaptype.html">QtSoapType</a> &amp; QtSoapStruct::operator[] ( int <i>i</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#operator-5b-5d">QtSoapType::operator[]</a>().</p>
<p>This is an overloaded function.</p>
<p>Returns a reference to item number <i>i</i> in this struct. If no such item exists, an empty <a href="qtsoaptype.html">QtSoapType</a> is returned.</p>
<p>The items are ordered in the sequence in which they were inserted, starting from 0.</p>
<h3 class="fn"><a name="operator-5b-5d-6"></a>const <a href="qtsoaptype.html">QtSoapType</a> &amp; QtSoapStruct::operator[] ( int <i>i</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qtsoaptype.html#operator-5b-5d-4">QtSoapType::operator[]</a>().</p>
<p>This is an overloaded function.</p>
<p>Returns a reference to item number <i>i</i> in this struct. If no such item exists, an empty <a href="qtsoaptype.html">QtSoapType</a> is returned.</p>
<p>The items are ordered in the sequence in which they were inserted, starting from 0.</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>