GpgFrontend-Doxygen/docs/html/classGpgFrontend_1_1Thread_1_1TaskRunner.html

277 lines
16 KiB
HTML
Raw Normal View History

<!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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GpgFrontend Project: GpgFrontend::Thread::TaskRunner 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.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">GpgFrontend Project
</div>
<div id="projectbrief">A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<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>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classGpgFrontend_1_1Thread_1_1TaskRunner.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="summary">
<a href="#pub-slots">Public Slots</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classGpgFrontend_1_1Thread_1_1TaskRunner-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">GpgFrontend::Thread::TaskRunner Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for GpgFrontend::Thread::TaskRunner:</div>
<div class="dyncontent">
<div class="center"><img src="classGpgFrontend_1_1Thread_1_1TaskRunner__inherit__graph.png" border="0" usemap="#GpgFrontend_1_1Thread_1_1TaskRunner_inherit__map" alt="Inheritance graph"/></div>
<map name="GpgFrontend_1_1Thread_1_1TaskRunner_inherit__map" id="GpgFrontend_1_1Thread_1_1TaskRunner_inherit__map">
<area shape="rect" title=" " alt="" coords="5,131,164,296"/>
<area shape="rect" title=" " alt="" coords="46,5,123,83"/>
</map>
</div>
<div class="dynheader">
Collaboration diagram for GpgFrontend::Thread::TaskRunner:</div>
<div class="dyncontent">
<div class="center"><img src="classGpgFrontend_1_1Thread_1_1TaskRunner__coll__graph.png" border="0" usemap="#GpgFrontend_1_1Thread_1_1TaskRunner_coll__map" alt="Collaboration graph"/></div>
<map name="GpgFrontend_1_1Thread_1_1TaskRunner_coll__map" id="GpgFrontend_1_1Thread_1_1TaskRunner_coll__map">
<area shape="rect" title=" " alt="" coords="253,1565,412,1701"/>
<area shape="rect" title=" " alt="" coords="71,1411,149,1488"/>
<area shape="rect" title=" " alt="" coords="173,1396,335,1503"/>
<area shape="rect" href="classGpgFrontend_1_1Thread_1_1Task.html" title=" " alt="" coords="362,1021,525,1333"/>
<area shape="rect" title=" " alt="" coords="476,1403,664,1495"/>
<area shape="rect" title=" " alt="" coords="686,881,761,959"/>
<area shape="rect" title=" " alt="" coords="322,881,415,959"/>
<area shape="rect" title="STL class." alt="" coords="211,881,297,959"/>
<area shape="rect" title="STL class." alt="" coords="169,668,307,760"/>
<area shape="rect" title=" " alt="" coords="440,881,663,959"/>
<area shape="rect" href="classGpgFrontend_1_1Thread_1_1Task_1_1DataObject.html" title="DataObject to be passed to the callback function." alt="" coords="488,624,647,804"/>
<area shape="rect" title=" " alt="" coords="448,392,641,499"/>
<area shape="rect" href="structGpgFrontend_1_1Thread_1_1Task_1_1DataObject_1_1Destructor.html" title=" " alt="" coords="357,145,516,267"/>
<area shape="rect" title="STL class." alt="" coords="541,167,663,245"/>
<area shape="rect" title=" " alt="" coords="365,5,404,83"/>
<area shape="rect" title="STL class." alt="" coords="249,523,406,600"/>
<area shape="rect" title="STL class." alt="" coords="5,167,140,245"/>
<area shape="rect" title="STL class." alt="" coords="773,291,901,368"/>
<area shape="rect" title=" " alt="" coords="53,5,92,83"/>
<area shape="rect" title="STL class." alt="" coords="360,1411,452,1488"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-slots"></a>
Public Slots</h2></td></tr>
<tr class="memitem:a4fae01eb0a5b296b8c4c6bf8408f1c6b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#a4fae01eb0a5b296b8c4c6bf8408f1c6b">PostTask</a> (<a class="el" href="classGpgFrontend_1_1Thread_1_1Task.html">Task</a> *task)</td></tr>
<tr class="separator:a4fae01eb0a5b296b8c4c6bf8408f1c6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:ad3c8612cbe60112f9b14e616fb0a4acf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#ad3c8612cbe60112f9b14e616fb0a4acf">TaskRunner</a> ()</td></tr>
<tr class="memdesc:ad3c8612cbe60112f9b14e616fb0a4acf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a new <a class="el" href="classGpgFrontend_1_1Thread_1_1Task.html">Task</a> Runner object. <a href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#ad3c8612cbe60112f9b14e616fb0a4acf">More...</a><br /></td></tr>
<tr class="separator:ad3c8612cbe60112f9b14e616fb0a4acf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3e57b59d537e2a75e741d4a5418ae6d"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#ac3e57b59d537e2a75e741d4a5418ae6d">~TaskRunner</a> () override</td></tr>
<tr class="memdesc:ac3e57b59d537e2a75e741d4a5418ae6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the <a class="el" href="classGpgFrontend_1_1Thread_1_1Task.html">Task</a> Runner object. <a href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#ac3e57b59d537e2a75e741d4a5418ae6d">More...</a><br /></td></tr>
<tr class="separator:ac3e57b59d537e2a75e741d4a5418ae6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66d2cce41130ada199636815c52332a6"><td class="memItemLeft" align="right" valign="top"><a id="a66d2cce41130ada199636815c52332a6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>run</b> () override</td></tr>
<tr class="separator:a66d2cce41130ada199636815c52332a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a774775e9a91d33072b27dcf78cead6e2"><td class="memItemLeft" align="right" valign="top"><a id="a774775e9a91d33072b27dcf78cead6e2"></a>
std::queue&lt; <a class="el" href="classGpgFrontend_1_1Thread_1_1Task.html">Task</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#a774775e9a91d33072b27dcf78cead6e2">tasks</a></td></tr>
<tr class="memdesc:a774775e9a91d33072b27dcf78cead6e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The task queue. <br /></td></tr>
<tr class="separator:a774775e9a91d33072b27dcf78cead6e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d92421bbbfcf3136335a5173d1b2a22"><td class="memItemLeft" align="right" valign="top"><a id="a6d92421bbbfcf3136335a5173d1b2a22"></a>
std::map&lt; std::string, <a class="el" href="classGpgFrontend_1_1Thread_1_1Task.html">Task</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#a6d92421bbbfcf3136335a5173d1b2a22">pending_tasks_</a></td></tr>
<tr class="memdesc:a6d92421bbbfcf3136335a5173d1b2a22"><td class="mdescLeft">&#160;</td><td class="mdescRight">The pending tasks. <br /></td></tr>
<tr class="separator:a6d92421bbbfcf3136335a5173d1b2a22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e72f1ce00d41c225a4304f1ed20b3f1"><td class="memItemLeft" align="right" valign="top"><a id="a5e72f1ce00d41c225a4304f1ed20b3f1"></a>
std::mutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#a5e72f1ce00d41c225a4304f1ed20b3f1">tasks_mutex_</a></td></tr>
<tr class="memdesc:a5e72f1ce00d41c225a4304f1ed20b3f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The task queue mutex. <br /></td></tr>
<tr class="separator:a5e72f1ce00d41c225a4304f1ed20b3f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ad3c8612cbe60112f9b14e616fb0a4acf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3c8612cbe60112f9b14e616fb0a4acf">&#9670;&nbsp;</a></span>TaskRunner()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">GpgFrontend::Thread::TaskRunner::TaskRunner </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct a new <a class="el" href="classGpgFrontend_1_1Thread_1_1Task.html">Task</a> Runner object. </p>
<p>Copyright (C) 2021 Saturneric</p>
<p>This file is part of <a class="el" href="namespaceGpgFrontend.html">GpgFrontend</a>.</p>
<p><a class="el" href="namespaceGpgFrontend.html">GpgFrontend</a> is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p><a class="el" href="namespaceGpgFrontend.html">GpgFrontend</a> is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with <a class="el" href="namespaceGpgFrontend.html">GpgFrontend</a>. If not, see <a href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>.</p>
<p>The initial version of the source code is inherited from the gpg4usb project, which is under GPL-3.0-or-later.</p>
<p>The source code version of this software was modified and released by Saturneric<a href="#" onclick="location.href='mai'+'lto:'+'eri'+'c@'+'bkt'+'us'+'.co'+'m'; return false;">eric@<span style="display: none;">.nosp@m.</span>bktu<span style="display: none;">.nosp@m.</span>s.com</a><a href="#" onclick="location.href='mai'+'lto:'+'eri'+'c@'+'bkt'+'us'+'.co'+'m'; return false;">eric@<span style="display: none;">.nosp@m.</span>bktu<span style="display: none;">.nosp@m.</span>s.com</a> starting on May 12, 2021. </p>
</div>
</div>
<a id="ac3e57b59d537e2a75e741d4a5418ae6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3e57b59d537e2a75e741d4a5418ae6d">&#9670;&nbsp;</a></span>~TaskRunner()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">GpgFrontend::Thread::TaskRunner::~TaskRunner </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy the <a class="el" href="classGpgFrontend_1_1Thread_1_1Task.html">Task</a> Runner object. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a4fae01eb0a5b296b8c4c6bf8408f1c6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4fae01eb0a5b296b8c4c6bf8408f1c6b">&#9670;&nbsp;</a></span>PostTask</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void GpgFrontend::Thread::TaskRunner::PostTask </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classGpgFrontend_1_1Thread_1_1Task.html">Task</a> *&#160;</td>
<td class="paramname"><em>task</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">slot</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">task</td><td></td></tr>
</table>
</dd>
</dl>
<p class="reference">References <a class="el" href="classGpgFrontend_1_1Thread_1_1Task.html#a50b91d27874af31ef13c493b00824ccf">GpgFrontend::Thread::Task::GetUUID()</a>, <a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#a6d92421bbbfcf3136335a5173d1b2a22">pending_tasks_</a>, <a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#a774775e9a91d33072b27dcf78cead6e2">tasks</a>, and <a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html#a5e72f1ce00d41c225a4304f1ed20b3f1">tasks_mutex_</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/core/thread/<a class="el" href="TaskRunner_8h_source.html">TaskRunner.h</a></li>
<li>src/core/thread/TaskRunner.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespaceGpgFrontend.html">GpgFrontend</a></li><li class="navelem"><a class="el" href="namespaceGpgFrontend_1_1Thread.html">Thread</a></li><li class="navelem"><a class="el" href="classGpgFrontend_1_1Thread_1_1TaskRunner.html">TaskRunner</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
</ul>
</div>
</body>
</html>