<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>GNU CommonC++: ost::Counter< T > Class Template Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.6 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li id="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul></div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div> <div class="nav"> <a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_counter.html">Counter</a></div> <h1>ost::Counter< T > Class Template Reference</h1><!-- doxytag: class="ost::Counter" -->The counter template is used for generic objects which act as automatic counters.Automatic counter template class. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="counter_8h-source.html">counter.h</a>></code> <p> <a href="classost_1_1_counter-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_counter.html#0ca3f00d6579ac58b73a3eefad7bd500">Counter</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct and initialize a counter to zero. <a href="#0ca3f00d6579ac58b73a3eefad7bd500"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_counter.html#72566efdf6945f365cf2cea829cfe8e6">Counter</a> (const <a class="el" href="classost_1_1_counter.html">Counter</a> &counter)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a counter with an initial value set for another counter. <a href="#72566efdf6945f365cf2cea829cfe8e6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_counter.html#98e9b0cb62a7573bcd43c95603e9d68e">Counter</a> (T initial)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct a counter with an initial value of the specified data type. <a href="#98e9b0cb62a7573bcd43c95603e9d68e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">T & </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_counter.html#882ad1e55337322c5411df8ecd54760d">operator=</a> (T c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_counter.html#94c990fddd398cbfeeaff42cb08f0a61">operator T</a> ()</td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_counter.html#1bdf329c488d8c1e51bcfe859084998f">count</a></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> <h3>template<typename T><br> class ost::Counter< T ></h3> The counter template is used for generic objects which act as automatic counters.Automatic counter template class. <p> Each time the object is accessed, the underlying counted data type is incremented.<p> <dl compact><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl> <p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="0ca3f00d6579ac58b73a3eefad7bd500"></a><!-- doxytag: member="ost::Counter::Counter" ref="0ca3f00d6579ac58b73a3eefad7bd500" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="mdPrefix" colspan="4"> template<typename T> </td> </tr> <tr> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_counter.html">ost::Counter</a>< T >::<a class="el" href="classost_1_1_counter.html">Counter</a> </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Construct and initialize a counter to zero. <p> </td> </tr> </table> <a class="anchor" name="72566efdf6945f365cf2cea829cfe8e6"></a><!-- doxytag: member="ost::Counter::Counter" ref="72566efdf6945f365cf2cea829cfe8e6" args="(const Counter &counter)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="mdPrefix" colspan="4"> template<typename T> </td> </tr> <tr> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_counter.html">ost::Counter</a>< T >::<a class="el" href="classost_1_1_counter.html">Counter</a> </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classost_1_1_counter.html">Counter</a>< T > & </td> <td class="mdname1" valign="top" nowrap> <em>counter</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Construct a counter with an initial value set for another counter. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>counter</em> </td><td>to copy from. </td></tr> </table> </dl> </td> </tr> </table> <a class="anchor" name="98e9b0cb62a7573bcd43c95603e9d68e"></a><!-- doxytag: member="ost::Counter::Counter" ref="98e9b0cb62a7573bcd43c95603e9d68e" args="(T initial)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="mdPrefix" colspan="4"> template<typename T> </td> </tr> <tr> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_counter.html">ost::Counter</a>< T >::<a class="el" href="classost_1_1_counter.html">Counter</a> </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">T </td> <td class="mdname1" valign="top" nowrap> <em>initial</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Construct a counter with an initial value of the specified data type. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>initial</em> </td><td>value to set. </td></tr> </table> </dl> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="94c990fddd398cbfeeaff42cb08f0a61"></a><!-- doxytag: member="ost::Counter::operator T" ref="94c990fddd398cbfeeaff42cb08f0a61" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="mdPrefix" colspan="4"> template<typename T> </td> </tr> <tr> <td class="md" nowrap valign="top"><a class="el" href="classost_1_1_counter.html">ost::Counter</a>< T >::operator T </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <a class="anchor" name="882ad1e55337322c5411df8ecd54760d"></a><!-- doxytag: member="ost::Counter::operator=" ref="882ad1e55337322c5411df8ecd54760d" args="(T c)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="mdPrefix" colspan="4"> template<typename T> </td> </tr> <tr> <td class="md" nowrap valign="top">T& <a class="el" href="classost_1_1_counter.html">ost::Counter</a>< T >::operator= </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">T </td> <td class="mdname1" valign="top" nowrap> <em>c</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="1bdf329c488d8c1e51bcfe859084998f"></a><!-- doxytag: member="ost::Counter::count" ref="1bdf329c488d8c1e51bcfe859084998f" args="" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="mdPrefix" colspan="4"> template<typename T> </td> </tr> <tr> <td class="md" nowrap valign="top">T <a class="el" href="classost_1_1_counter.html">ost::Counter</a>< T >::<a class="el" href="classost_1_1_counter.html#1bdf329c488d8c1e51bcfe859084998f">count</a><code> [protected]</code> </td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="counter_8h-source.html">counter.h</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Mon Jun 19 10:50:56 2006 for GNU CommonC++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address> </body> </html>