#include <counter.h>
Public Member Functions | |
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 () | |
Protected Attributes | |
T | count |
Each time the object is accessed, the underlying counted data type is incremented.
ost::Counter< T >::Counter | ( | ) | [inline] |
ost::Counter< T >::Counter | ( | const Counter< T > & | counter | ) | [inline] |
Construct a counter with an initial value set for another counter.
counter | to copy from. |
References ost::Counter< T >::count.
ost::Counter< T >::Counter | ( | T | initial | ) | [inline] |
Construct a counter with an initial value of the specified data type.
initial | value to set. |
References ost::Counter< T >::count.
T& ost::Counter< T >::operator= | ( | T | c | ) | [inline] |
ost::Counter< T >::operator T | ( | ) | [inline] |
References ost::Counter< T >::count.
T ost::Counter< T >::count [protected] |
Referenced by ost::Counter< T >::Counter(), and ost::Counter< T >::operator T().