<!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::base::ProvideNumericId< TDerived, TNumericIdType > Struct 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="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_1base_1_1ProvideNumericId.html','');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#pri-static-methods">Static Private Member Functions</a> | <a href="#pri-attribs">Private Attributes</a> | <a href="structzypp_1_1base_1_1ProvideNumericId-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">zypp::base::ProvideNumericId< TDerived, TNumericIdType > Struct Template Reference</div> </div> </div><!--header--> <div class="contents"> <p>Base class for objects providing a numeric Id. <a href="structzypp_1_1base_1_1ProvideNumericId.html#details">More...</a></p> <p><code>#include <<a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.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:a6e57f025245d03d49981b7f323020fa3"><td class="memItemLeft" align="right" valign="top">TNumericIdType </td><td class="memItemRight" valign="bottom"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html#a6e57f025245d03d49981b7f323020fa3">numericId</a> () const</td></tr> <tr class="separator:a6e57f025245d03d49981b7f323020fa3"><td class="memSeparator" colspan="2"> </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:a973e1bfc9d0456f9be42361ad2e3fb99"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html#a973e1bfc9d0456f9be42361ad2e3fb99">ProvideNumericId</a> ()</td></tr> <tr class="memdesc:a973e1bfc9d0456f9be42361ad2e3fb99"><td class="mdescLeft"> </td><td class="mdescRight">Default ctor. <a href="#a973e1bfc9d0456f9be42361ad2e3fb99">More...</a><br /></td></tr> <tr class="separator:a973e1bfc9d0456f9be42361ad2e3fb99"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a79a672dbce1e46ebae649d26327034d4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html#a79a672dbce1e46ebae649d26327034d4">ProvideNumericId</a> (const <a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a> &)</td></tr> <tr class="memdesc:a79a672dbce1e46ebae649d26327034d4"><td class="mdescLeft"> </td><td class="mdescRight">Copy ctor. <a href="#a79a672dbce1e46ebae649d26327034d4">More...</a><br /></td></tr> <tr class="separator:a79a672dbce1e46ebae649d26327034d4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7c43ce3f85055d478fbb00e0288f5af9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html#a7c43ce3f85055d478fbb00e0288f5af9">operator=</a> (const <a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a> &)</td></tr> <tr class="memdesc:a7c43ce3f85055d478fbb00e0288f5af9"><td class="mdescLeft"> </td><td class="mdescRight">Assign. <a href="#a7c43ce3f85055d478fbb00e0288f5af9">More...</a><br /></td></tr> <tr class="separator:a7c43ce3f85055d478fbb00e0288f5af9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2c157596c3cb1e9bb03274e29de5a31c"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html#a2c157596c3cb1e9bb03274e29de5a31c">~ProvideNumericId</a> ()</td></tr> <tr class="memdesc:a2c157596c3cb1e9bb03274e29de5a31c"><td class="mdescLeft"> </td><td class="mdescRight">Dtor. <a href="#a2c157596c3cb1e9bb03274e29de5a31c">More...</a><br /></td></tr> <tr class="separator:a2c157596c3cb1e9bb03274e29de5a31c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a550b1c880aa731cc4def5853653986ca"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html#a550b1c880aa731cc4def5853653986ca">ProvideNumericId</a> (const void *const)</td></tr> <tr class="memdesc:a550b1c880aa731cc4def5853653986ca"><td class="mdescLeft"> </td><td class="mdescRight">No-Id ctor (0). <a href="#a550b1c880aa731cc4def5853653986ca">More...</a><br /></td></tr> <tr class="separator:a550b1c880aa731cc4def5853653986ca"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a> Static Private Member Functions</h2></td></tr> <tr class="memitem:a1898fd176c3a32cf896773fbe385527e"><td class="memItemLeft" align="right" valign="top">static TNumericIdType </td><td class="memItemRight" valign="bottom"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html#a1898fd176c3a32cf896773fbe385527e">nextId</a> ()</td></tr> <tr class="memdesc:a1898fd176c3a32cf896773fbe385527e"><td class="mdescLeft"> </td><td class="mdescRight">Provide the next Id to use. <a href="#a1898fd176c3a32cf896773fbe385527e">More...</a><br /></td></tr> <tr class="separator:a1898fd176c3a32cf896773fbe385527e"><td class="memSeparator" colspan="2"> </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:a09fb40074cbc55da2f498ea24a247722"><td class="memItemLeft" align="right" valign="top">const TNumericIdType </td><td class="memItemRight" valign="bottom"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html#a09fb40074cbc55da2f498ea24a247722">_numericId</a></td></tr> <tr class="separator:a09fb40074cbc55da2f498ea24a247722"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><h3>template<class TDerived, class TNumericIdType><br /> struct zypp::base::ProvideNumericId< TDerived, TNumericIdType ></h3> <p>Base class for objects providing a numeric Id. </p> <p>The ctor creates a NumericId from some static counter.</p> <p>The only assertion is that <code>0</code> is not used as an Id, <b>unless</b> the derived class explicitly requests this by using <a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html#a550b1c880aa731cc4def5853653986ca">ProvideNumericId( const void *const )</a>.</p> <p>Why should you want to use <code>0</code> as an Id? E.g if your class provides some (singleton) No-object. Might be desirable to make the No-object have No-Id.</p> <div class="fragment"><div class="line"><span class="keyword">struct </span>Foo : <span class="keyword">public</span> base::ProvideNumericId<Foo,unsigned></div><div class="line">{};</div><div class="line">Foo foo;</div><div class="line">foo.numericId(); <span class="comment">// returns foo's NumericId.</span></div></div><!-- fragment --> <p class="definition">Definition at line <a class="el" href="ProvideNumericId_8h_source.html#l00045">45</a> of file <a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.h</a>.</p> </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> <a id="a973e1bfc9d0456f9be42361ad2e3fb99"></a> <h2 class="memtitle"><span class="permalink"><a href="#a973e1bfc9d0456f9be42361ad2e3fb99">◆ </a></span>ProvideNumericId() <span class="overload">[1/3]</span></h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class TDerived, class TNumericIdType> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">zypp::base::ProvideNumericId</a>< TDerived, TNumericIdType >::<a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a> </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 class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Default ctor. </p> <p class="definition">Definition at line <a class="el" href="ProvideNumericId_8h_source.html#l00054">54</a> of file <a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.h</a>.</p> </div> </div> <a id="a79a672dbce1e46ebae649d26327034d4"></a> <h2 class="memtitle"><span class="permalink"><a href="#a79a672dbce1e46ebae649d26327034d4">◆ </a></span>ProvideNumericId() <span class="overload">[2/3]</span></h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class TDerived, class TNumericIdType> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">zypp::base::ProvideNumericId</a>< TDerived, TNumericIdType >::<a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a> </td> <td>(</td> <td class="paramtype">const <a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a>< TDerived, TNumericIdType > & </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 class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Copy ctor. </p> <p class="definition">Definition at line <a class="el" href="ProvideNumericId_8h_source.html#l00058">58</a> of file <a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.h</a>.</p> </div> </div> <a id="a2c157596c3cb1e9bb03274e29de5a31c"></a> <h2 class="memtitle"><span class="permalink"><a href="#a2c157596c3cb1e9bb03274e29de5a31c">◆ </a></span>~ProvideNumericId()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class TDerived, class TNumericIdType> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">zypp::base::ProvideNumericId</a>< TDerived, TNumericIdType >::~<a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a> </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 class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Dtor. </p> <p class="definition">Definition at line <a class="el" href="ProvideNumericId_8h_source.html#l00065">65</a> of file <a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.h</a>.</p> </div> </div> <a id="a550b1c880aa731cc4def5853653986ca"></a> <h2 class="memtitle"><span class="permalink"><a href="#a550b1c880aa731cc4def5853653986ca">◆ </a></span>ProvideNumericId() <span class="overload">[3/3]</span></h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class TDerived, class TNumericIdType> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">zypp::base::ProvideNumericId</a>< TDerived, TNumericIdType >::<a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a> </td> <td>(</td> <td class="paramtype">const void * const </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 class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>No-Id ctor (0). </p> <p>Explicitly request Id <code>0</code>. Use it with care! </p> <p class="definition">Definition at line <a class="el" href="ProvideNumericId_8h_source.html#l00071">71</a> of file <a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.h</a>.</p> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a id="a6e57f025245d03d49981b7f323020fa3"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6e57f025245d03d49981b7f323020fa3">◆ </a></span>numericId()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class TDerived, class TNumericIdType> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">TNumericIdType <a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">zypp::base::ProvideNumericId</a>< TDerived, TNumericIdType >::numericId </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">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <dl class="section return"><dt>Returns</dt><dd>The objects numeric Id. </dd></dl> <p class="definition">Definition at line <a class="el" href="ProvideNumericId_8h_source.html#l00049">49</a> of file <a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.h</a>.</p> </div> </div> <a id="a7c43ce3f85055d478fbb00e0288f5af9"></a> <h2 class="memtitle"><span class="permalink"><a href="#a7c43ce3f85055d478fbb00e0288f5af9">◆ </a></span>operator=()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class TDerived, class TNumericIdType> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a>& <a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">zypp::base::ProvideNumericId</a>< TDerived, TNumericIdType >::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</a>< TDerived, TNumericIdType > & </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 class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Assign. </p> <p class="definition">Definition at line <a class="el" href="ProvideNumericId_8h_source.html#l00062">62</a> of file <a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.h</a>.</p> </div> </div> <a id="a1898fd176c3a32cf896773fbe385527e"></a> <h2 class="memtitle"><span class="permalink"><a href="#a1898fd176c3a32cf896773fbe385527e">◆ </a></span>nextId()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class TDerived, class TNumericIdType> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static TNumericIdType <a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">zypp::base::ProvideNumericId</a>< TDerived, TNumericIdType >::nextId </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 class="mlabel">static</span><span class="mlabel">private</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Provide the next Id to use. </p> <p class="definition">Definition at line <a class="el" href="ProvideNumericId_8h_source.html#l00076">76</a> of file <a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.h</a>.</p> </div> </div> <h2 class="groupheader">Member Data Documentation</h2> <a id="a09fb40074cbc55da2f498ea24a247722"></a> <h2 class="memtitle"><span class="permalink"><a href="#a09fb40074cbc55da2f498ea24a247722">◆ </a></span>_numericId</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class TDerived, class TNumericIdType> </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">const TNumericIdType <a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">zypp::base::ProvideNumericId</a>< TDerived, TNumericIdType >::_numericId</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">private</span></span> </td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="ProvideNumericId_8h_source.html#l00083">83</a> of file <a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.h</a>.</p> </div> </div> <hr/>The documentation for this struct was generated from the following file:<ul> <li>zypp/base/<a class="el" href="ProvideNumericId_8h_source.html">ProvideNumericId.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="namespacezypp_1_1base.html">base</a></li><li class="navelem"><a class="el" href="structzypp_1_1base_1_1ProvideNumericId.html">ProvideNumericId</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>