Updated documentation
[libs.git] / docs / html / class_sylph_1_1_forward_iterator.html
blob21953f9ebaf4a43cb004f06335bba2219ce0de59
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3 <title>LibSylph: Sylph::ForwardIterator&lt; T, I &gt; Class Template Reference</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
5 </head><body>
6 <!-- Generated by Doxygen 1.5.8 -->
7 <div class="navigation" id="top">
8 <div class="tabs">
9 <ul>
10 <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
12 <li class="current"><a href="classes.html"><span>Classes</span></a></li>
13 <li><a href="files.html"><span>Files</span></a></li>
14 <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
15 </ul>
16 </div>
17 <div class="tabs">
18 <ul>
19 <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
20 <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
21 <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
22 </ul>
23 </div>
24 <div class="navpath"><a class="el" href="namespace_sylph.html">Sylph</a>::<a class="el" href="class_sylph_1_1_forward_iterator.html">ForwardIterator</a>
25 </div>
26 </div>
27 <div class="contents">
28 <h1>Sylph::ForwardIterator&lt; T, I &gt; Class Template Reference</h1><!-- doxytag: class="Sylph::ForwardIterator" --><!-- doxytag: inherits="Sylph::Object" -->Facade used to simplify usage of forward iterators.
29 <a href="#_details">More...</a>
30 <p>
31 <code>#include &lt;<a class="el" href="_iterator_8h-source.html">Sylph/Core/Iterator.h</a>&gt;</code>
32 <p>
33 <div class="dynheader">
34 Inheritance diagram for Sylph::ForwardIterator&lt; T, I &gt;:</div>
35 <div class="dynsection">
36 <p><center><img src="class_sylph_1_1_forward_iterator__inherit__graph.png" border="0" usemap="#_sylph_1_1_forward_iterator_3_01_t_00_01_i_01_4__inherit__map" alt="Inheritance graph"></center>
37 <map name="_sylph_1_1_forward_iterator_3_01_t_00_01_i_01_4__inherit__map">
38 <area shape="rect" id="node2" href="class_sylph_1_1_object.html" title="The root of all classes." alt="" coords="60,5,172,35"></map>
39 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
41 <p>
42 <a href="class_sylph_1_1_forward_iterator-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
43 <tr><td></td></tr>
44 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
45 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual reference&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_forward_iterator.html#0cfbb6d989c3cbbd37947fb1fa68ee24">current</a> () const =0</td></tr>
47 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><b>OVERRIDE THIS METHOD</b> Returns a reference to the object the iterator is currently pointing at. <a href="#0cfbb6d989c3cbbd37947fb1fa68ee24"></a><br></td></tr>
48 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_forward_iterator.html#c51a9015adb5e22568530c70efd6ff40">next</a> () const =0</td></tr>
50 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><b>OVERRIDE THIS METHOD</b> Sets the iterator one place forward. <a href="#c51a9015adb5e22568530c70efd6ff40"></a><br></td></tr>
51 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_forward_iterator.html#0c368995da59e9b3a2074bfccf8ac708">hasNext</a> () const =0</td></tr>
53 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><b>OVERRIDE THIS METHOD</b> Tells wheter there are any objects left in the collection. <a href="#0c368995da59e9b3a2074bfccf8ac708"></a><br></td></tr>
54 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_forward_iterator.html#6bc12e11b0e540d8788e8eab0cad19cd">equals</a> (const I &amp;other) const =0</td></tr>
56 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><b>OVERRIDE THIS METHOD</b> Tells wheter this Iterator is equal to any other Iterator over the same type of collection. <a href="#6bc12e11b0e540d8788e8eab0cad19cd"></a><br></td></tr>
57 <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
58 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1448ef46fc3bf3ac2e65ed03eba0cb33"></a><!-- doxytag: member="Sylph::ForwardIterator::_end_reached_" ref="1448ef46fc3bf3ac2e65ed03eba0cb33" args="" -->
59 bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sylph_1_1_forward_iterator.html#1448ef46fc3bf3ac2e65ed03eba0cb33">_end_reached_</a></td></tr>
61 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Do not use or modify! <br></td></tr>
62 </table>
63 <hr><a name="_details"></a><h2>Detailed Description</h2>
64 <h3>template&lt;class T, class I&gt;<br>
65 class Sylph::ForwardIterator&lt; T, I &gt;</h3>
67 Facade used to simplify usage of forward iterators.
68 <p>
69 This class provides several methods to override, which will be used to make a correct implementation of a forward iterator.<p>
70 Note that this class already correctly implements the difference between a const_iterator and a normal iterator, i.e. a const <a class="el" href="class_sylph_1_1_forward_iterator.html" title="Facade used to simplify usage of forward iterators.">ForwardIterator</a> conforms as a const_iterator, and a non-const <a class="el" href="class_sylph_1_1_forward_iterator.html" title="Facade used to simplify usage of forward iterators.">ForwardIterator</a> conforms as a non-const iterator. Therefore, when implementing this class, make sure that you flag any fields that can be changed (such as indices or pointers to the current item) as <code>mutable</code>. <p>
71 In order for your own types to be correctly identified as a <a class="el" href="class_sylph_1_1_forward_iterator.html" title="Facade used to simplify usage of forward iterators.">ForwardIterator</a>, please use the <code>S_FORWARD_ITERATOR(</code><em>iterator-name, type-name, object-to-iterate-over</em><code>)</code> <hr><h2>Member Function Documentation</h2>
72 <a class="anchor" name="0cfbb6d989c3cbbd37947fb1fa68ee24"></a><!-- doxytag: member="Sylph::ForwardIterator::current" ref="0cfbb6d989c3cbbd37947fb1fa68ee24" args="() const =0" -->
73 <div class="memitem">
74 <div class="memproto">
75 <div class="memtemplate">
76 template&lt;class T, class I&gt; </div>
77 <table class="memname">
78 <tr>
79 <td class="memname">virtual reference <a class="el" href="class_sylph_1_1_forward_iterator.html">Sylph::ForwardIterator</a>&lt; T, I &gt;::current </td>
80 <td>(</td>
81 <td class="paramname"> </td>
82 <td>&nbsp;)&nbsp;</td>
83 <td> const<code> [pure virtual]</code></td>
84 </tr>
85 </table>
86 </div>
87 <div class="memdoc">
89 <p>
90 <b>OVERRIDE THIS METHOD</b> Returns a reference to the object the iterator is currently pointing at.
91 <p>
92 Note that no beyond-the-end checking needs to be done, this is all done automagically for you. <dl class="return" compact><dt><b>Returns:</b></dt><dd>The object this iterator is currently pointing at. </dd></dl>
94 <p>Implemented in <a class="el" href="class_sylph_1_1_array_1_1iterator.html#22bfc5f805fcbc5917ae279f451e110f">Sylph::Array&lt; T &gt;::Array::iterator</a>.</p>
96 </div>
97 </div><p>
98 <a class="anchor" name="6bc12e11b0e540d8788e8eab0cad19cd"></a><!-- doxytag: member="Sylph::ForwardIterator::equals" ref="6bc12e11b0e540d8788e8eab0cad19cd" args="(const I &amp;other) const =0" -->
99 <div class="memitem">
100 <div class="memproto">
101 <div class="memtemplate">
102 template&lt;class T, class I&gt; </div>
103 <table class="memname">
104 <tr>
105 <td class="memname">virtual bool <a class="el" href="class_sylph_1_1_forward_iterator.html">Sylph::ForwardIterator</a>&lt; T, I &gt;::equals </td>
106 <td>(</td>
107 <td class="paramtype">const I &amp;&nbsp;</td>
108 <td class="paramname"> <em>other</em> </td>
109 <td>&nbsp;)&nbsp;</td>
110 <td> const<code> [pure virtual]</code></td>
111 </tr>
112 </table>
113 </div>
114 <div class="memdoc">
117 <b>OVERRIDE THIS METHOD</b> Tells wheter this Iterator is equal to any other Iterator over the same type of collection.
119 <dl compact><dt><b>Parameters:</b></dt><dd>
120 <table border="0" cellspacing="2" cellpadding="0">
121 <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>An other <a class="el" href="class_sylph_1_1_forward_iterator.html" title="Facade used to simplify usage of forward iterators.">ForwardIterator</a> to compare this one against. </td></tr>
122 </table>
123 </dl>
124 <dl class="return" compact><dt><b>Returns:</b></dt><dd><em>true</em> iff the two iterators are completely equal (i.e. they iteratate over the same collection and currently point to the same object), false otherwise. </dd></dl>
126 </div>
127 </div><p>
128 <a class="anchor" name="0c368995da59e9b3a2074bfccf8ac708"></a><!-- doxytag: member="Sylph::ForwardIterator::hasNext" ref="0c368995da59e9b3a2074bfccf8ac708" args="() const =0" -->
129 <div class="memitem">
130 <div class="memproto">
131 <div class="memtemplate">
132 template&lt;class T, class I&gt; </div>
133 <table class="memname">
134 <tr>
135 <td class="memname">virtual bool <a class="el" href="class_sylph_1_1_forward_iterator.html">Sylph::ForwardIterator</a>&lt; T, I &gt;::hasNext </td>
136 <td>(</td>
137 <td class="paramname"> </td>
138 <td>&nbsp;)&nbsp;</td>
139 <td> const<code> [pure virtual]</code></td>
140 </tr>
141 </table>
142 </div>
143 <div class="memdoc">
146 <b>OVERRIDE THIS METHOD</b> Tells wheter there are any objects left in the collection.
148 This method should not take the past-the-end item into account. <dl class="return" compact><dt><b>Returns:</b></dt><dd><em>true</em> true if there are any next items, <em>false</em> if there are no more items left. </dd></dl>
150 <p>Implemented in <a class="el" href="class_sylph_1_1_array_1_1iterator.html#6dcf01f3b483a19c96faf73c8c829ce9">Sylph::Array&lt; T &gt;::Array::iterator</a>.</p>
152 </div>
153 </div><p>
154 <a class="anchor" name="c51a9015adb5e22568530c70efd6ff40"></a><!-- doxytag: member="Sylph::ForwardIterator::next" ref="c51a9015adb5e22568530c70efd6ff40" args="() const =0" -->
155 <div class="memitem">
156 <div class="memproto">
157 <div class="memtemplate">
158 template&lt;class T, class I&gt; </div>
159 <table class="memname">
160 <tr>
161 <td class="memname">virtual void <a class="el" href="class_sylph_1_1_forward_iterator.html">Sylph::ForwardIterator</a>&lt; T, I &gt;::next </td>
162 <td>(</td>
163 <td class="paramname"> </td>
164 <td>&nbsp;)&nbsp;</td>
165 <td> const<code> [pure virtual]</code></td>
166 </tr>
167 </table>
168 </div>
169 <div class="memdoc">
172 <b>OVERRIDE THIS METHOD</b> Sets the iterator one place forward.
174 Note that no beyond-the-end checking needs to be done, this is all done automagically for you.
175 <p>Implemented in <a class="el" href="class_sylph_1_1_array_1_1iterator.html#3c1145de7f34e2f9ad853369e418be0a">Sylph::Array&lt; T &gt;::Array::iterator</a>.</p>
177 </div>
178 </div><p>
179 </div>
180 <hr size="1" class="unhidden"><address style="text-align: right;"><small>
181 Documentation for LibSylph by Doxygen
182 </body>
183 </html>