<!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>libzypp: zypp::Repository::EraseFromPool Struct 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> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</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">libzypp  <span id="projectnumber">17.9.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <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&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',false,false,'search.php','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&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('structzypp_1_1Repository_1_1EraseFromPool.html','');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="structzypp_1_1Repository_1_1EraseFromPool-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">zypp::Repository::EraseFromPool Struct Reference</div> </div> </div><!--header--> <div class="contents"> <p>Functor removing <a class="el" href="classzypp_1_1Repository.html">Repository</a> from it's Pool. <a href="structzypp_1_1Repository_1_1EraseFromPool.html#details">More...</a></p> <p><code>#include <<a class="el" href="Repository_8h_source.html">Repository.h</a>></code></p> <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:afa57ccd93ba1f33fd3e2595b02ac14cd"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="structzypp_1_1Repository_1_1EraseFromPool.html#afa57ccd93ba1f33fd3e2595b02ac14cd">operator()</a> (<a class="el" href="classzypp_1_1Repository.html">Repository</a> repository_r) const</td></tr> <tr class="separator:afa57ccd93ba1f33fd3e2595b02ac14cd"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Functor removing <a class="el" href="classzypp_1_1Repository.html">Repository</a> from it's Pool. </p> <p>E.g. used as dispose function in. <a class="el" href="classzypp_1_1AutoDispose.html">AutoDispose</a> to provide a convenient and exception safe temporary <a class="el" href="classzypp_1_1Repository.html">Repository</a>. </p><div class="fragment"><div class="line">sat::Pool satpool;</div><div class="line"><a class="code" href="group__ZYPP__BASE__LOGGER__MACROS.html#ga552f8ec9d8e5b4efa04839a129104818">MIL</a> << <span class="stringliteral">"1 "</span> << satpool << endl;</div><div class="line">{</div><div class="line"> AutoDispose<Repository> tmprepo( (Repository::EraseFromPool()) );</div><div class="line"> *tmprepo = satpool.reposInsert( <span class="stringliteral">"A"</span> );</div><div class="line"> tmprepo->addSolv( <span class="stringliteral">"sl10.1-beta7-packages.solv"</span> );</div><div class="line"> <a class="code" href="group__ZYPP__BASE__LOGGER__MACROS.html#ga49606be7356624568932ec81c0d429f4">DBG</a> << <span class="stringliteral">"2 "</span> << satpool << endl;</div><div class="line"> <span class="comment">// Calling 'tmprepo.resetDispose();' here</span></div><div class="line"> <span class="comment">// would keep the Repo.</span></div><div class="line">}</div><div class="line"><a class="code" href="group__ZYPP__BASE__LOGGER__MACROS.html#ga552f8ec9d8e5b4efa04839a129104818">MIL</a> << <span class="stringliteral">"3 "</span> << satpool << endl;</div></div><!-- fragment --> <div class="fragment"><div class="line">1 sat::pool(){0<a class="code" href="RepoManager_8cc.html#aad7c5866e4bbeb43f56ace5be352b6c4">repos</a>|2solv}</div><div class="line">2 sat::pool(){1<a class="code" href="RepoManager_8cc.html#aad7c5866e4bbeb43f56ace5be352b6c4">repos</a>|2612solv}</div><div class="line">3 sat::pool(){0<a class="code" href="RepoManager_8cc.html#aad7c5866e4bbeb43f56ace5be352b6c4">repos</a>|2solv}</div></div><!-- fragment --><p> Leaving the block without calling <code>tmprepo.resetDispose();</code> before, will automatically remove the Repo from it's Pool. </p> <p class="definition">Definition at line <a class="el" href="Repository_8h_source.html#l00430">430</a> of file <a class="el" href="Repository_8h_source.html">Repository.h</a>.</p> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="afa57ccd93ba1f33fd3e2595b02ac14cd"></a> <h2 class="memtitle"><span class="permalink"><a href="#afa57ccd93ba1f33fd3e2595b02ac14cd">◆ </a></span>operator()()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void zypp::Repository::EraseFromPool::operator() </td> <td>(</td> <td class="paramtype"><a class="el" href="classzypp_1_1Repository.html">Repository</a> </td> <td class="paramname"><em>repository_r</em></td><td>)</td> <td> const</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 class="definition">Definition at line <a class="el" href="Repository_8h_source.html#l00432">432</a> of file <a class="el" href="Repository_8h_source.html">Repository.h</a>.</p> </div> </div> <hr/>The documentation for this struct was generated from the following file:<ul> <li>zypp/<a class="el" href="Repository_8h_source.html">Repository.h</a></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="namespacezypp.html">zypp</a></li><li class="navelem"><a class="el" href="classzypp_1_1Repository.html">Repository</a></li><li class="navelem"><a class="el" href="structzypp_1_1Repository_1_1EraseFromPool.html">EraseFromPool</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.15 </li> </ul> </div> </body> </html>