remwharead/docs/classremwharead_1_1Export_1_1ExportBase.html
2019-11-02 08:13:06 +01:00

262 lines
18 KiB
HTML

<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>remwharead: remwharead::Export::ExportBase Class 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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">remwharead
&#160;<span id="projectnumber">0.8.5</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>remwharead</b></li><li class="navelem"><b>Export</b></li><li class="navelem"><a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</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="#pro-attribs">Protected Attributes</a> &#124;
<a href="classremwharead_1_1Export_1_1ExportBase-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">remwharead::Export::ExportBase Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Base class for exports.
<a href="classremwharead_1_1Export_1_1ExportBase.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="export_8hpp_source.html">remwharead/export/export.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for remwharead::Export::ExportBase:</div>
<div class="dyncontent">
<div class="center">
<img src="classremwharead_1_1Export_1_1ExportBase.png" usemap="#remwharead::Export::ExportBase_map" alt=""/>
<map id="remwharead::Export::ExportBase_map" name="remwharead::Export::ExportBase_map">
<area href="classremwharead_1_1Export_1_1AsciiDoc.html" title="Export as AsciiDoc document." alt="remwharead::Export::AsciiDoc" shape="rect" coords="0,56,194,80"/>
<area href="classremwharead_1_1Export_1_1Bookmarks.html" title="Export as Netscape bookmark file." alt="remwharead::Export::Bookmarks" shape="rect" coords="204,56,398,80"/>
<area href="classremwharead_1_1Export_1_1CSV.html" title="Export as Comma Separated Values." alt="remwharead::Export::CSV" shape="rect" coords="408,56,602,80"/>
<area href="classremwharead_1_1Export_1_1JSON.html" title="Export as JSON array." alt="remwharead::Export::JSON" shape="rect" coords="612,56,806,80"/>
<area href="classremwharead_1_1Export_1_1RSS.html" title="Export as RSS feed." alt="remwharead::Export::RSS" shape="rect" coords="816,56,1010,80"/>
<area href="classremwharead_1_1Export_1_1Simple.html" title="Export as simple list." alt="remwharead::Export::Simple" shape="rect" coords="1020,56,1214,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af376271c3dc90d8918171456ae4ff975"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classremwharead_1_1Export_1_1ExportBase.html#af376271c3dc90d8918171456ae4ff975">ExportBase</a> (const list&lt; <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> &gt; &amp;entries, ostream &amp;out=cout)</td></tr>
<tr class="memdesc:af376271c3dc90d8918171456ae4ff975"><td class="mdescLeft">&#160;</td><td class="mdescRight">Export list of <a class="el" href="structremwharead_1_1Database_1_1entry.html" title="Describes a database entry.">Database::entry</a>. <a href="#af376271c3dc90d8918171456ae4ff975">More...</a><br /></td></tr>
<tr class="separator:af376271c3dc90d8918171456ae4ff975"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11762caeee454debe00225c5596a4ae7"><td class="memItemLeft" align="right" valign="top"><a id="a11762caeee454debe00225c5596a4ae7"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ExportBase</b> (const <a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &amp;)=delete</td></tr>
<tr class="separator:a11762caeee454debe00225c5596a4ae7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a283306ba9c9555db5df5ee3e78e24231"><td class="memItemLeft" align="right" valign="top"><a id="a283306ba9c9555db5df5ee3e78e24231"></a>
<a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &amp;)=delete</td></tr>
<tr class="separator:a283306ba9c9555db5df5ee3e78e24231"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50544901e2847dbc2dc4c009607ef7b8"><td class="memItemLeft" align="right" valign="top"><a id="a50544901e2847dbc2dc4c009607ef7b8"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ExportBase</b> (<a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &amp;&amp;)=delete</td></tr>
<tr class="separator:a50544901e2847dbc2dc4c009607ef7b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84f9a443bc610d4f00ed8a9f4683262c"><td class="memItemLeft" align="right" valign="top"><a id="a84f9a443bc610d4f00ed8a9f4683262c"></a>
<a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &amp;&amp;)=delete</td></tr>
<tr class="separator:a84f9a443bc610d4f00ed8a9f4683262c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee596eaefecdb1c21c37f5e3d129ed56"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classremwharead_1_1Export_1_1ExportBase.html#aee596eaefecdb1c21c37f5e3d129ed56">print</a> () const =0</td></tr>
<tr class="memdesc:aee596eaefecdb1c21c37f5e3d129ed56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print output to std::ostream. <a href="#aee596eaefecdb1c21c37f5e3d129ed56">More...</a><br /></td></tr>
<tr class="separator:aee596eaefecdb1c21c37f5e3d129ed56"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a8d4245d0b37d82a3a8d95507d30ea671"><td class="memItemLeft" align="right" valign="top">list&lt; <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classremwharead_1_1Export_1_1ExportBase.html#a8d4245d0b37d82a3a8d95507d30ea671">sort_entries</a> (list&lt; <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> &gt; entries) const</td></tr>
<tr class="memdesc:a8d4245d0b37d82a3a8d95507d30ea671"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sort entries from newest to oldest and remove duplicates. <a href="#a8d4245d0b37d82a3a8d95507d30ea671">More...</a><br /></td></tr>
<tr class="separator:a8d4245d0b37d82a3a8d95507d30ea671"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a799001a9c7aba96eff66ca9180ead164"><td class="memItemLeft" align="right" valign="top"><a id="a799001a9c7aba96eff66ca9180ead164"></a>
const list&lt; <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>_entries</b></td></tr>
<tr class="separator:a799001a9c7aba96eff66ca9180ead164"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc2eddcda442fc3688f7ba024f7120ad"><td class="memItemLeft" align="right" valign="top"><a id="acc2eddcda442fc3688f7ba024f7120ad"></a>
ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>_out</b></td></tr>
<tr class="separator:acc2eddcda442fc3688f7ba024f7120ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for exports. </p>
<dl class="section since"><dt>Since</dt><dd>0.6.0 </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="af376271c3dc90d8918171456ae4ff975"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af376271c3dc90d8918171456ae4ff975">&#9670;&nbsp;</a></span>ExportBase()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">remwharead::Export::ExportBase::ExportBase </td>
<td>(</td>
<td class="paramtype">const list&lt; <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>entries</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ostream &amp;&#160;</td>
<td class="paramname"><em>out</em> = <code>cout</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Export list of <a class="el" href="structremwharead_1_1Database_1_1entry.html" title="Describes a database entry.">Database::entry</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entries</td><td>List of <a class="el" href="structremwharead_1_1Database_1_1entry.html" title="Describes a database entry.">Database::entry</a> to export. </td></tr>
<tr><td class="paramname">out</td><td>Output stream. </td></tr>
</table>
</dd>
</dl>
<div class="fragment"><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; : _entries(<a class="code" href="classremwharead_1_1Export_1_1ExportBase.html#a8d4245d0b37d82a3a8d95507d30ea671">sort_entries</a>(entries))</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; , _out(out)</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;{}</div><div class="ttc" id="classremwharead_1_1Export_1_1ExportBase_html_a8d4245d0b37d82a3a8d95507d30ea671"><div class="ttname"><a href="classremwharead_1_1Export_1_1ExportBase.html#a8d4245d0b37d82a3a8d95507d30ea671">remwharead::Export::ExportBase::sort_entries</a></div><div class="ttdeci">list&lt; Database::entry &gt; sort_entries(list&lt; Database::entry &gt; entries) const</div><div class="ttdoc">Sort entries from newest to oldest and remove duplicates.</div><div class="ttdef"><b>Definition:</b> export.cpp:28</div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aee596eaefecdb1c21c37f5e3d129ed56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee596eaefecdb1c21c37f5e3d129ed56">&#9670;&nbsp;</a></span>print()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void remwharead::Export::ExportBase::print </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Print output to std::ostream. </p>
<p>Implemented in <a class="el" href="classremwharead_1_1Export_1_1AsciiDoc.html#a20ce832d0cea815b048bbe5c51496a77">remwharead::Export::AsciiDoc</a>, <a class="el" href="classremwharead_1_1Export_1_1CSV.html#a107c3390677129f00a6f45b924e2a539">remwharead::Export::CSV</a>, <a class="el" href="classremwharead_1_1Export_1_1JSON.html#a41905480c6183304ba625ff6f5f0a601">remwharead::Export::JSON</a>, <a class="el" href="classremwharead_1_1Export_1_1RSS.html#a91c18ab8ac1ccc18f24988320b576670">remwharead::Export::RSS</a>, <a class="el" href="classremwharead_1_1Export_1_1Bookmarks.html#af92b6e7c8bf46032dcf65267ce83d043">remwharead::Export::Bookmarks</a>, and <a class="el" href="classremwharead_1_1Export_1_1Simple.html#af688d80f3d7903d59ef730311e32b7f8">remwharead::Export::Simple</a>.</p>
</div>
</div>
<a id="a8d4245d0b37d82a3a8d95507d30ea671"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d4245d0b37d82a3a8d95507d30ea671">&#9670;&nbsp;</a></span>sort_entries()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">list&lt; <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> &gt; remwharead::Export::ExportBase::sort_entries </td>
<td>(</td>
<td class="paramtype">list&lt; <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> &gt;&#160;</td>
<td class="paramname"><em>entries</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sort entries from newest to oldest and remove duplicates. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entries</td><td>List of <a class="el" href="structremwharead_1_1Database_1_1entry.html" title="Describes a database entry.">Database::entry</a> to sort.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Sorted list of <a class="el" href="structremwharead_1_1Database_1_1entry.html" title="Describes a database entry.">Database::entry</a>. </dd></dl>
<div class="fragment"><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;{</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; entries.sort([](<span class="keyword">const</span> <span class="keyword">auto</span> &amp;a, <span class="keyword">const</span> <span class="keyword">auto</span> &amp;b)</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; {</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <span class="keywordflow">return</span> (a.datetime &gt; b.datetime);</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; });</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; entries.unique();</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keywordflow">return</span> entries;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/export/<a class="el" href="export_8hpp_source.html">export.hpp</a></li>
<li>src/lib/export/export.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>