.TH "ost::Counter< T >" 3 "Sun Dec 27 2020" "GNU CommonC++" \" -*- nroff -*- .ad l .nh .SH NAME ost::Counter< T > \- The counter template is used for generic objects which act as automatic counters\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBCounter\fP ()" .br .RI "Construct and initialize a counter to zero\&. " .ti -1c .RI "\fBCounter\fP (const \fBCounter\fP &counter)" .br .RI "Construct a counter with an initial value set for another counter\&. " .ti -1c .RI "\fBCounter\fP (T initial)" .br .RI "Construct a counter with an initial value of the specified data type\&. " .ti -1c .RI "T & \fBoperator=\fP (T c)" .br .ti -1c .RI "\fBoperator T\fP ()" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "T \fBcount\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template .br class ost::Counter< T >" The counter template is used for generic objects which act as automatic counters\&. Each time the object is accessed, the underlying counted data type is incremented\&. .PP \fBAuthor\fP .RS 4 David Sugar dyfet@gnutelephony.org .RE .PP Automatic counter template class\&. .SH "Constructor & Destructor Documentation" .PP .SS "template \fBost::Counter\fP< T >::\fBCounter\fP ()\fC [inline]\fP" .PP Construct and initialize a counter to zero\&. .PP References ost::Counter< T >::count\&. .SS "template \fBost::Counter\fP< T >::\fBCounter\fP (const \fBCounter\fP< T > & counter)\fC [inline]\fP" .PP Construct a counter with an initial value set for another counter\&. .PP \fBParameters\fP .RS 4 \fIcounter\fP to copy from\&. .RE .PP .PP References ost::Counter< T >::count\&. .SS "template \fBost::Counter\fP< T >::\fBCounter\fP (T initial)\fC [inline]\fP" .PP Construct a counter with an initial value of the specified data type\&. .PP \fBParameters\fP .RS 4 \fIinitial\fP value to set\&. .RE .PP .PP References ost::Counter< T >::count\&. .SH "Member Function Documentation" .PP .SS "template \fBost::Counter\fP< T >::operator T ()\fC [inline]\fP" .PP References ost::Counter< T >::count\&. .SS "template T& \fBost::Counter\fP< T >::operator= (T c)\fC [inline]\fP" .SH "Member Data Documentation" .PP .SS "template T \fBost::Counter\fP< T >::count\fC [protected]\fP" .PP Referenced by ost::Counter< T >::Counter(), and ost::Counter< T >::operator T()\&. .SH "Author" .PP Generated automatically by Doxygen for GNU CommonC++ from the source code\&.