GATE
gate::AtomicInt64 Class Reference

#include <atomics.hpp>

Public Member Functions

 AtomicInt64 (int64_t init=0)
 
 AtomicInt64 (AtomicInt64 const &src)
 
AtomicInt64operator= (AtomicInt64 const &src)
 
int64_t get () const
 
int64_t set (int64_t newvalue)
 
int64_t changeIf (int64_t comparand, int64_t newvalue)
 
int64_t operator++ ()
 
int64_t operator++ (int)
 
int64_t operator-- ()
 
int64_t operator-- (int)
 
int64_t operator+= (int64_t value)
 
int64_t operator-= (int64_t value)
 

Detailed Description

< Atomic 64-bit integer

Constructor & Destructor Documentation

◆ AtomicInt64()

gate::AtomicInt64::AtomicInt64 ( int64_t init = 0)

Initialize atomic integer

Member Function Documentation

◆ changeIf()

int64_t gate::AtomicInt64::changeIf ( int64_t comparand,
int64_t newvalue )

Compares atomic integer with comparand and set its to newvalue if they match, returns previous value

◆ get()

int64_t gate::AtomicInt64::get ( ) const

Returns value of atomic integer

◆ operator++() [1/2]

int64_t gate::AtomicInt64::operator++ ( )

Increments atomic integer and returns its current value

◆ operator++() [2/2]

int64_t gate::AtomicInt64::operator++ ( int )

Increments atomic integer and returns its previous value

◆ operator+=()

int64_t gate::AtomicInt64::operator+= ( int64_t value)

Adds number to atomic integer and returns its updated value

◆ operator--() [1/2]

int64_t gate::AtomicInt64::operator-- ( )

Decrements atomic integer and returns its current value

◆ operator--() [2/2]

int64_t gate::AtomicInt64::operator-- ( int )

Decrements atomic integer and returns its previous value

◆ operator-=()

int64_t gate::AtomicInt64::operator-= ( int64_t value)

Substracts number to atomic integer and returns its updated value

◆ set()

int64_t gate::AtomicInt64::set ( int64_t newvalue)

Updates atomic integer to a new value and returns it previous value


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