OST_COUNTER(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– 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