FastJet  3.4.0
Public Member Functions | List of all members
fastjet::thread_safety_helpers::AtomicCounter< T > Class Template Reference

(would) provides a thread-safe counter (with CXX11 features) More...

#include <fastjet/internal/thread_safety_helpers.hh>

Public Member Functions

 AtomicCounter ()
 default ctor
 
 AtomicCounter (const T &count)
 ctor with initialisation
 
 AtomicCounter (const AtomicCounter &other)
 copy ctor
 
 operator T () const
 for a more friendly usage, overload the type cast More...
 
get () const
 get the count
 
void set (const T new_value)
 set the counter to a given value
 
step ()
 step the counter and return the value just before it was stepped
 
operator++ ()
 override the ++ operator prefix version
 
operator++ (int)
 override the ++ operator postfix version
 

Detailed Description

template<typename T>
class fastjet::thread_safety_helpers::AtomicCounter< T >

(would) provides a thread-safe counter (with CXX11 features)

Definition at line 179 of file thread_safety_helpers.hh.

Member Function Documentation

◆ operator T()

template<typename T >
fastjet::thread_safety_helpers::AtomicCounter< T >::operator T ( ) const
inline

for a more friendly usage, overload the type cast

This will (likely) allow a transparent usage w or wo C++11 features enabled

Definition at line 194 of file thread_safety_helpers.hh.


The documentation for this class was generated from the following file: