OST_COUNTER(3)
π ost::Counter< T > β the manual, bestie edition π
okay so real talk, this one lives in the Library Functions Manual and it's literally called ost::Counter< T >. It's a template, it counts things, it's giving main character energy for generic objects that just wanna keep tally. π
β¨ NAME β¨
ost::Counter< T > β the counter template, used for generic objects that act as automatic counters. no cap.
πΈ SYNOPSIS πΈ
#include <counter.h>
π Public Member Functions
Counter ()β build a counter and set it to zero. fresh start, iconic.Counter (const Counter &counter)β build a counter whose starting value is copied off another counter. bestie-to-bestie transfer π«ΆCounter (T initial)β build a counter with a starting value of the specified data type. you pick the vibe.T & operator= (T c)operator T ()
π Protected Attributes
T count
π¦ Detailed Description π¦
template<typename T>
class ost::Counter< T >
The counter template is used for generic objects which act as automatic counters.
Every single time the object is accessed, the underlying counted data type gets incremented. that's the whole bit. it just keeps going. β¨
Author: David Sugar dyfet@gnutelephony.org
Automatic counter template class. periodt.
π Constructor & Destructor Documentation π
template<typename T > ost::Counter< T >::Counter () [inline]
Construct and initialize a counter to zero. starts at nothing, ends at legend. π
References ost::Counter< T >::count.
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. (yes it's giving copy-paste but make it fashion π )
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. you get to choose, bestie π
References ost::Counter< T >::count.
π₯ Member Function Documentation π₯
template<typename T > ost::Counter< T >::operator T () [inline]
References ost::Counter< T >::count.
template<typename T > T& ost::Counter< T >::operator= (T c) [inline]
(that's it. that's the entry. no notes. π)
π Member Data Documentation π
template<typename T > T ost::Counter< T >::count [protected]
Referenced by ost::Counter< T >::Counter(), and ost::Counter< T >::operator T().
it's protected, so don't go poking it from outside. respect the boundaries, bestie. π
β Author β
Generated automatically by Doxygen for GNU CommonC++ from the source code. not me writing my own manpage, the robots did it fr fr π€β¨
and that's the whole page!! this one's from GNU CommonC++, dated Sun Dec 27 2020, and it's ost::Counter< T >(3) if you ever need to look it up again. slay, stay counted, mwah ππ¦π
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms