DOKK / manpages / debian 10 / libcommoncpp2-doc / ost_Counter.3.en
ost::Counter< T >(3) Library Functions Manual ost::Counter< T >(3)

ost::Counter< T > - The counter template is used for generic objects which act as automatic counters.

#include <counter.h>


Counter ()
Construct and initialize a counter to zero. Counter (const Counter &counter)
Construct a counter with an initial value set for another counter. Counter (T initial)
Construct a counter with an initial value of the specified data type. T & operator= (T c)
operator T ()


T count

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.

Author:

David Sugar dyfet@gnutelephony.org Automatic counter template class.

template<typename T > ost::Counter< T >::Counter () [inline]

Construct and initialize a counter to zero.

template<typename T > ost::Counter< T >::Counter (const Counter< T > & counter) [inline]

Construct a counter with an initial value set for another counter.

Parameters:

counter to copy from.

References ost::Counter< T >::count.

template<typename T > ost::Counter< T >::Counter (T initial) [inline]

Construct a counter with an initial value of the specified data type.

Parameters:

initial value to set.

template<typename T > ost::Counter< T >::operator T () [inline]

Referenced by ost::Counter< T >::Counter().

Generated automatically by Doxygen for GNU CommonC++ from the source code.

Wed Oct 31 2018 GNU CommonC++