blob: 76184c180fa08bacc1d54739c1dab9f000a2050d [file]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>iceberg-cpp: iceberg::Iterator&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">iceberg-cpp
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceiceberg.html">iceberg</a></li><li class="navelem"><a class="el" href="classiceberg_1_1Iterator.html">Iterator</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classiceberg_1_1Iterator-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">iceberg::Iterator&lt; T &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">
<p>A pull-based iterator whose reads may fail.
<a href="classiceberg_1_1Iterator.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="iterator_8h_source.html">iterator.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a49d054c15c17888e7df33589cab1a23e" id="r_a49d054c15c17888e7df33589cab1a23e"><td class="memItemLeft" align="right" valign="top"><a id="a49d054c15c17888e7df33589cab1a23e" name="a49d054c15c17888e7df33589cab1a23e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Iterator</b> (const <a class="el" href="classiceberg_1_1Iterator.html">Iterator</a> &amp;)=delete</td></tr>
<tr class="separator:a49d054c15c17888e7df33589cab1a23e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e97c1f81f0942f8945f14c6b8a70a6e" id="r_a9e97c1f81f0942f8945f14c6b8a70a6e"><td class="memItemLeft" align="right" valign="top"><a id="a9e97c1f81f0942f8945f14c6b8a70a6e" name="a9e97c1f81f0942f8945f14c6b8a70a6e"></a>
<a class="el" href="classiceberg_1_1Iterator.html">Iterator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classiceberg_1_1Iterator.html">Iterator</a> &amp;)=delete</td></tr>
<tr class="separator:a9e97c1f81f0942f8945f14c6b8a70a6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8addb6bdc6658e0a2709eda47f4df873" id="r_a8addb6bdc6658e0a2709eda47f4df873"><td class="memItemLeft" align="right" valign="top"><a id="a8addb6bdc6658e0a2709eda47f4df873" name="a8addb6bdc6658e0a2709eda47f4df873"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Iterator</b> (<a class="el" href="classiceberg_1_1Iterator.html">Iterator</a> &amp;&amp;) noexcept=default</td></tr>
<tr class="separator:a8addb6bdc6658e0a2709eda47f4df873"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af389edaa5546f70ec25c78b5e621bac1" id="r_af389edaa5546f70ec25c78b5e621bac1"><td class="memItemLeft" align="right" valign="top"><a id="af389edaa5546f70ec25c78b5e621bac1" name="af389edaa5546f70ec25c78b5e621bac1"></a>
<a class="el" href="classiceberg_1_1Iterator.html">Iterator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classiceberg_1_1Iterator.html">Iterator</a> &amp;&amp;) noexcept=default</td></tr>
<tr class="separator:af389edaa5546f70ec25c78b5e621bac1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a5d3f0cf558d9105317ea80993f96c4" id="r_a0a5d3f0cf558d9105317ea80993f96c4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result</a>&lt; std::optional&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classiceberg_1_1Iterator.html#a0a5d3f0cf558d9105317ea80993f96c4">Next</a> ()</td></tr>
<tr class="memdesc:a0a5d3f0cf558d9105317ea80993f96c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the next value, or std::nullopt when the iterator is exhausted. <br /></td></tr>
<tr class="separator:a0a5d3f0cf558d9105317ea80993f96c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abae2fe7a3310a023ff0597aa68b986f2" id="r_abae2fe7a3310a023ff0597aa68b986f2"><td class="memItemLeft" align="right" valign="top"><a id="abae2fe7a3310a023ff0597aa68b986f2" name="abae2fe7a3310a023ff0597aa68b986f2"></a>
<a class="el" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result</a>&lt; std::vector&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ToVector</b> ()</td></tr>
<tr class="memdesc:abae2fe7a3310a023ff0597aa68b986f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Consume the remaining values into a vector. <br /></td></tr>
<tr class="separator:abae2fe7a3310a023ff0597aa68b986f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a1bbfc3019cd9a5e373f2a515e0533199" id="r_a1bbfc3019cd9a5e373f2a515e0533199"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result</a>&lt; std::optional&lt; T &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classiceberg_1_1Iterator.html#a1bbfc3019cd9a5e373f2a515e0533199">NextImpl</a> ()=0</td></tr>
<tr class="memdesc:a1bbfc3019cd9a5e373f2a515e0533199"><td class="mdescLeft">&#160;</td><td class="mdescRight">Produce the next value for <a class="el" href="classiceberg_1_1Iterator.html#a0a5d3f0cf558d9105317ea80993f96c4" title="Return the next value, or std::nullopt when the iterator is exhausted.">Next()</a>. <br /></td></tr>
<tr class="separator:a1bbfc3019cd9a5e373f2a515e0533199"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;typename T&gt;<br />
class iceberg::Iterator&lt; T &gt;</div><p>A pull-based iterator whose reads may fail. </p>
<p><a class="el" href="classiceberg_1_1Iterator.html" title="A pull-based iterator whose reads may fail.">Iterator</a> implementations own any resources needed to produce values. Destroying an iterator releases those resources, including when iteration stops before reaching the end. Iterators are not thread-safe unless an implementation explicitly says otherwise. Once <a class="el" href="classiceberg_1_1Iterator.html#a0a5d3f0cf558d9105317ea80993f96c4" title="Return the next value, or std::nullopt when the iterator is exhausted.">Next()</a> returns an error or std::nullopt, the iterator is terminal. Subsequent calls return the same terminal result without invoking the implementation again.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">T</td><td>Value returned by the iterator. </td></tr>
</table>
</dd>
</dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a0a5d3f0cf558d9105317ea80993f96c4" name="a0a5d3f0cf558d9105317ea80993f96c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a5d3f0cf558d9105317ea80993f96c4">&#9670;&#160;</a></span>Next()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result</a>&lt; std::optional&lt; T &gt; &gt; <a class="el" href="classiceberg_1_1Iterator.html">iceberg::Iterator</a>&lt; T &gt;::Next </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the next value, or std::nullopt when the iterator is exhausted. </p>
<p>After this method returns an error or std::nullopt, subsequent calls return the same terminal result without invoking <a class="el" href="classiceberg_1_1Iterator.html#a1bbfc3019cd9a5e373f2a515e0533199" title="Produce the next value for Next().">NextImpl()</a>. </p>
</div>
</div>
<a id="a1bbfc3019cd9a5e373f2a515e0533199" name="a1bbfc3019cd9a5e373f2a515e0533199"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1bbfc3019cd9a5e373f2a515e0533199">&#9670;&#160;</a></span>NextImpl()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="namespaceiceberg.html#a9d5594e371beb516b0120e07e69d3af6">Result</a>&lt; std::optional&lt; T &gt; &gt; <a class="el" href="classiceberg_1_1Iterator.html">iceberg::Iterator</a>&lt; T &gt;::NextImpl </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Produce the next value for <a class="el" href="classiceberg_1_1Iterator.html#a0a5d3f0cf558d9105317ea80993f96c4" title="Return the next value, or std::nullopt when the iterator is exhausted.">Next()</a>. </p>
<p>Implementations must return std::nullopt when exhausted. <a class="el" href="classiceberg_1_1Iterator.html#a0a5d3f0cf558d9105317ea80993f96c4" title="Return the next value, or std::nullopt when the iterator is exhausted.">Next()</a> makes the terminal state sticky, so implementations are not called after exhaustion or error. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>iceberg/<a class="el" href="type__fwd_8h_source.html">type_fwd.h</a></li>
<li>iceberg/util/<a class="el" href="iterator_8h_source.html">iterator.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>