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::AtomicCounter - The AtomicCounter class offers thread-safe manipulation of an integer counter.

Author

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

GNU CommonC++                                    Sun Dec 27 2020                           ost::AtomicCounter(3)

Constructor & Destructor Documentation

ost::AtomicCounter::AtomicCounter()
       Initialize an atomic counter to 0.

   ost::AtomicCounter::AtomicCounter(intvalue)
       Initialize an atomic counter to a known value.

       Parametersvalue initial value.

   ost::AtomicCounter::~AtomicCounter()

Detailed Description

       The AtomicCounter class offers thread-safe manipulation of an integer counter.

       These are commonly used for building thread-safe 'reference' counters for C++ classes. The AtomicCounter
       depends on the platforms support for 'atomic' integer operations, and can alternately substitute a
       'mutex' if no atomic support exists.

       Author
           Sean Cavanaugh sean@dimensionalrift.com

       atomic counter operation.

Member Function Documentation

ost::AtomicCounter::operatorint()boolost::AtomicCounter::operator!(void)intost::AtomicCounter::operator+(intchange)intost::AtomicCounter::operator++(void)intost::AtomicCounter::operator+=(intchange)intost::AtomicCounter::operator-(intchange)intost::AtomicCounter::operator--(void)intost::AtomicCounter::operator-=(intchange)intost::AtomicCounter::operator=(intvalue)

Name

       ost::AtomicCounter - The AtomicCounter class offers thread-safe manipulation of an integer counter.

Synopsis

       #include <thread.h>

   PublicMemberFunctionsAtomicCounter ()
           Initialize an atomic counter to 0.
       AtomicCounter (int value)
           Initialize an atomic counter to a known value.
       ~AtomicCounter ()
       int operator++ (void)
       int operator-- (void)
       int operator+= (int change)
       int operator-= (int change)
       int operator+ (int change)
       int operator- (int change)
       int operator= (int value)
       bool operator! (void)
       operatorint ()

See Also