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
< T, I
> Class Template Reference
</title>
4 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css">
6 <!-- Generated by Doxygen 1.5.8 -->
7 <div class=
"navigation" id=
"top">
10 <li><a href=
"index.html"><span>Main
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
Pages
</span></a></li>
19 <li><a href=
"classes.html"><span>Class
Index
</span></a></li>
20 <li><a href=
"hierarchy.html"><span>Class
Hierarchy
</span></a></li>
21 <li><a href=
"functions.html"><span>Class
Members
</span></a></li>
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>
27 <div class=
"contents">
28 <h1>Sylph::ForwardIterator
< T, I
> 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>
31 <code>#include
<<a class=
"el" href=
"_iterator_8h-source.html">Sylph/Core/Iterator.h
</a>></code>
33 <div class=
"dynheader">
34 Inheritance diagram for Sylph::ForwardIterator
< T, I
>:
</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>
42 <a href=
"class_sylph_1_1_forward_iterator-members.html">List of all members.
</a><table border=
"0" cellpadding=
"0" cellspacing=
"0">
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
</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"> </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
</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"> </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
</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"> </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
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"class_sylph_1_1_forward_iterator.html#6bc12e11b0e540d8788e8eab0cad19cd">equals
</a> (const I
&other) const =
0</td></tr>
56 <tr><td class=
"mdescLeft"> </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
</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"> </td><td class=
"mdescRight">Do not use or modify!
<br></td></tr>
63 <hr><a name=
"_details"></a><h2>Detailed Description
</h2>
64 <h3>template
<class T, class I
><br>
65 class Sylph::ForwardIterator
< T, I
></h3>
67 Facade used to simplify usage of forward iterators.
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" -->
74 <div class=
"memproto">
75 <div class=
"memtemplate">
76 template
<class T, class I
> </div>
77 <table class=
"memname">
79 <td class=
"memname">virtual reference
<a class=
"el" href=
"class_sylph_1_1_forward_iterator.html">Sylph::ForwardIterator
</a>< T, I
>::current
</td>
81 <td class=
"paramname"> </td>
82 <td> )
</td>
83 <td> const
<code> [pure virtual]
</code></td>
90 <b>OVERRIDE THIS METHOD
</b> Returns a reference to the object the iterator is currently pointing at.
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
< T
>::Array::iterator
</a>.
</p>
98 <a class=
"anchor" name=
"6bc12e11b0e540d8788e8eab0cad19cd"></a><!-- doxytag: member="Sylph::ForwardIterator::equals" ref="6bc12e11b0e540d8788e8eab0cad19cd" args="(const I &other) const =0" -->
100 <div class=
"memproto">
101 <div class=
"memtemplate">
102 template
<class T, class I
> </div>
103 <table class=
"memname">
105 <td class=
"memname">virtual bool
<a class=
"el" href=
"class_sylph_1_1_forward_iterator.html">Sylph::ForwardIterator
</a>< T, I
>::equals
</td>
107 <td class=
"paramtype">const I
& </td>
108 <td class=
"paramname"> <em>other
</em> </td>
109 <td> )
</td>
110 <td> const
<code> [pure virtual]
</code></td>
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> </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>
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>
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
<class T, class I
> </div>
133 <table class=
"memname">
135 <td class=
"memname">virtual bool
<a class=
"el" href=
"class_sylph_1_1_forward_iterator.html">Sylph::ForwardIterator
</a>< T, I
>::hasNext
</td>
137 <td class=
"paramname"> </td>
138 <td> )
</td>
139 <td> const
<code> [pure virtual]
</code></td>
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
< T
>::Array::iterator
</a>.
</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
<class T, class I
> </div>
159 <table class=
"memname">
161 <td class=
"memname">virtual void
<a class=
"el" href=
"class_sylph_1_1_forward_iterator.html">Sylph::ForwardIterator
</a>< T, I
>::next
</td>
163 <td class=
"paramname"> </td>
164 <td> )
</td>
165 <td> const
<code> [pure virtual]
</code></td>
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
< T
>::Array::iterator
</a>.
</p>
180 <hr size=
"1" class=
"unhidden"><address style=
"text-align: right;"><small>
181 Documentation for LibSylph by Doxygen