logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

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

GNU CommonC++                                    Sun Dec 27 2020                            ost::Counter<T>(3)

Constructor & Destructor Documentation

template<typenameT>ost::Counter<T>::Counter()[inline]
       Construct and initialize a counter to zero.

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

   template<typenameT>ost::Counter<T>::Counter(constCounter<T>&counter)[inline]
       Construct a counter with an initial value set for another counter.

       Parameterscounter to copy from.

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

   template<typenameT>ost::Counter<T>::Counter(Tinitial)[inline]
       Construct a counter with an initial value of the specified data type.

       Parametersinitial value to set.

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

Detailed Description

template<typenameT>
       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.

Member Data Documentation

template<typenameT>Tost::Counter<T>::count[protected]
       Referenced by ost::Counter< T >::Counter(), and ost::Counter< T >::operator T().

Member Function Documentation

template<typenameT>ost::Counter<T>::operatorT()[inline]
       References ost::Counter< T >::count.

   template<typenameT>T&ost::Counter<T>::operator=(Tc)[inline]

Name

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

Synopsis

       #include <counter.h>

   PublicMemberFunctionsCounter ()
           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)
       operatorT ()

   ProtectedAttributes
       T count

See Also