<!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/Counter.h Source File</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('Counter_8h_source.html','');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">Counter.h</div> </div> </div><!--header--> <div class="contents"> <a href="Counter_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*---------------------------------------------------------------------\</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">| ____ _ __ __ ___ |</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">| |__ / \ / / . \ . \ |</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">| / / \ V /| _/ _/ |</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">| / /__ | | | | | | |</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">| /_____||_| |_| |_| |</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">| |</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">\---------------------------------------------------------------------*/</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#ifndef ZYPP_BASE_COUNTER_H</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#define ZYPP_BASE_COUNTER_H</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include <iosfwd></span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="keyword">namespace </span><a class="code" href="namespacezypp.html">zypp</a></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> { </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="comment">//</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="comment">// CLASS NAME : Counter</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <span class="comment">//</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"></span> <span class="keyword">template</span><<span class="keyword">class</span> TInt></div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classzypp_1_1Counter.html"> 28</a></span>  <span class="keyword">class </span><a class="code" href="classzypp_1_1Counter.html">Counter</a></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classzypp_1_1Counter.html#a8a2efbe13fd6bf98de4881af316c24ee"> 31</a></span>  <a class="code" href="classzypp_1_1Counter.html#a8a2efbe13fd6bf98de4881af316c24ee">Counter</a>( TInt value_r = TInt(0) )</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  : <a class="code" href="classzypp_1_1Counter.html#a89a339837f145a53bc88a902279aceaa">_value</a>( TInt( value_r ) )</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  {}</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classzypp_1_1Counter.html#a43c32f4b03bfe34394d0d4c0aa58a47f"> 35</a></span>  <span class="keyword">operator</span> TInt &()</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  { <span class="keywordflow">return</span> <a class="code" href="classzypp_1_1Counter.html#a89a339837f145a53bc88a902279aceaa">_value</a>; }</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classzypp_1_1Counter.html#aab49d8985958dcb9d854aacd5af84443"> 38</a></span>  <span class="keyword">operator</span> <span class="keyword">const</span> TInt &() <span class="keyword">const</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  { <span class="keywordflow">return</span> <a class="code" href="classzypp_1_1Counter.html#a89a339837f145a53bc88a902279aceaa">_value</a>; }</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classzypp_1_1Counter.html#a89a339837f145a53bc88a902279aceaa"> 42</a></span>  TInt <a class="code" href="classzypp_1_1Counter.html#a89a339837f145a53bc88a902279aceaa">_value</a>;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  };</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> } <span class="comment">// namespace zypp</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment"></span><span class="preprocessor">#endif // ZYPP_BASE_COUNTER_H</span></div><div class="ttc" id="classzypp_1_1Counter_html_a89a339837f145a53bc88a902279aceaa"><div class="ttname"><a href="classzypp_1_1Counter.html#a89a339837f145a53bc88a902279aceaa">zypp::Counter::_value</a></div><div class="ttdeci">TInt _value</div><div class="ttdef"><b>Definition:</b> <a href="Counter_8h_source.html#l00042">Counter.h:42</a></div></div> <div class="ttc" id="classzypp_1_1Counter_html_a8a2efbe13fd6bf98de4881af316c24ee"><div class="ttname"><a href="classzypp_1_1Counter.html#a8a2efbe13fd6bf98de4881af316c24ee">zypp::Counter::Counter</a></div><div class="ttdeci">Counter(TInt value_r=TInt(0))</div><div class="ttdef"><b>Definition:</b> <a href="Counter_8h_source.html#l00031">Counter.h:31</a></div></div> <div class="ttc" id="namespacezypp_html"><div class="ttname"><a href="namespacezypp.html">zypp</a></div><div class="ttdoc">Easy-to use interface to the ZYPP dependency resolver.</div><div class="ttdef"><b>Definition:</b> <a href="CodePitfalls_8doc_source.html#l00001">CodePitfalls.doc:1</a></div></div> <div class="ttc" id="classzypp_1_1Counter_html"><div class="ttname"><a href="classzypp_1_1Counter.html">zypp::Counter</a></div><div class="ttdoc">Integral type with initial value 0.</div><div class="ttdef"><b>Definition:</b> <a href="Counter_8h_source.html#l00028">Counter.h:28</a></div></div> </div><!-- fragment --></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="dir_c187b43c6f283d9fc95eff3f44ce072a.html">zypp</a></li><li class="navelem"><a class="el" href="dir_76651d3a0256a4372f696a008d71ee69.html">base</a></li><li class="navelem"><a class="el" href="Counter_8h.html">Counter.h</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>