JUCE  v5.2.0-514-g49784a029
JUCE API
juce::AtomicBase< Type > Class Template Reference

#include <juce_Atomic.h>

Inheritance diagram for juce::AtomicBase< Type >:
Collaboration diagram for juce::AtomicBase< Type >:

Public Types

typedef AtomicHelpers::DiffTypeHelper< Type >::Type DiffType
 

Public Member Functions

 AtomicBase () noexcept
 
 AtomicBase (const Type v) noexcept
 
 AtomicBase (const AtomicBase &other) noexcept
 
bool compareAndSetBool (Type, Type) noexcept
 
Type compareAndSetValue (Type, Type) noexcept
 
Type exchange (Type) noexcept
 
Type get () const noexcept
 
AtomicBaseoperator= (const AtomicBase< Type > &other) noexcept
 
AtomicBaseoperator= (const Type newValue) noexcept
 
void set (Type newValue) noexcept
 

Static Public Member Functions

static void memoryBarrier () noexcept
 

Public Attributes

volatile Type value
 The raw value that this class operates on. More...
 

Protected Member Functions

template<typename ValueType >
ValueType negateValue (ValueType n) noexcept
 This templated negate function will negate pointers as well as integers. More...
 
template<typename PointerType >
PointerType * negateValue (PointerType *n) noexcept
 This templated negate function will negate pointers as well as integers. More...
 
Type operator++ (int)
 
Type operator-- (int)
 

Static Protected Member Functions

static Type castFrom32Bit (int32 value) noexcept
 
static Type castFrom64Bit (int64 value) noexcept
 
template<typename Dest , typename Source >
static Dest castTo (Source value) noexcept
 
static int32 castTo32Bit (Type value) noexcept
 
static int64 castTo64Bit (Type value) noexcept
 

Member Typedef Documentation

◆ DiffType

template<typename Type>
typedef AtomicHelpers::DiffTypeHelper<Type>::Type juce::AtomicBase< Type >::DiffType

Constructor & Destructor Documentation

◆ AtomicBase() [1/3]

template<typename Type>
juce::AtomicBase< Type >::AtomicBase ( )
inlinenoexcept

◆ AtomicBase() [2/3]

template<typename Type>
juce::AtomicBase< Type >::AtomicBase ( const Type  v)
inlineexplicitnoexcept

◆ AtomicBase() [3/3]

template<typename Type>
juce::AtomicBase< Type >::AtomicBase ( const AtomicBase< Type > &  other)
inlinenoexcept

Member Function Documentation

◆ castFrom32Bit()

template<typename Type>
static Type juce::AtomicBase< Type >::castFrom32Bit ( int32  value)
inlinestaticprotectednoexcept

◆ castFrom64Bit()

template<typename Type>
static Type juce::AtomicBase< Type >::castFrom64Bit ( int64  value)
inlinestaticprotectednoexcept

◆ castTo()

template<typename Type>
template<typename Dest , typename Source >
static Dest juce::AtomicBase< Type >::castTo ( Source  value)
inlinestaticprotectednoexcept

◆ castTo32Bit()

template<typename Type>
static int32 juce::AtomicBase< Type >::castTo32Bit ( Type  value)
inlinestaticprotectednoexcept

◆ castTo64Bit()

template<typename Type>
static int64 juce::AtomicBase< Type >::castTo64Bit ( Type  value)
inlinestaticprotectednoexcept

◆ compareAndSetBool()

template<typename Type>
bool juce::AtomicBase< Type >::compareAndSetBool ( Type  newValue,
Type  valueToCompare 
)
inlinenoexcept

◆ compareAndSetValue()

template<typename Type>
Type juce::AtomicBase< Type >::compareAndSetValue ( Type  newValue,
Type  valueToCompare 
)
inlinenoexcept

◆ exchange()

template<typename Type>
Type juce::AtomicBase< Type >::exchange ( Type  newValue)
inlinenoexcept

◆ get()

template<typename Type >
Type juce::AtomicBase< Type >::get ( ) const
inlinenoexcept

◆ memoryBarrier()

template<typename Type >
void juce::AtomicBase< Type >::memoryBarrier ( )
inlinestaticnoexcept

◆ negateValue() [1/2]

template<typename Type>
template<typename ValueType >
ValueType juce::AtomicBase< Type >::negateValue ( ValueType  n)
inlineprotectednoexcept

This templated negate function will negate pointers as well as integers.

◆ negateValue() [2/2]

template<typename Type>
template<typename PointerType >
PointerType* juce::AtomicBase< Type >::negateValue ( PointerType *  n)
inlineprotectednoexcept

This templated negate function will negate pointers as well as integers.

◆ operator++()

template<typename Type>
Type juce::AtomicBase< Type >::operator++ ( int  )
protected

◆ operator--()

template<typename Type>
Type juce::AtomicBase< Type >::operator-- ( int  )
protected

◆ operator=() [1/2]

template<typename Type>
AtomicBase& juce::AtomicBase< Type >::operator= ( const AtomicBase< Type > &  other)
inlinenoexcept

◆ operator=() [2/2]

template<typename Type>
AtomicBase& juce::AtomicBase< Type >::operator= ( const Type  newValue)
inlinenoexcept

◆ set()

template<typename Type>
void juce::AtomicBase< Type >::set ( Type  newValue)
inlinenoexcept

Member Data Documentation

◆ value

template<typename Type>
volatile Type juce::AtomicBase< Type >::value

The raw value that this class operates on.

This is exposed publicly in case you need to manipulate it directly for performance reasons.

Referenced by juce::LeakedObjectDetector< OwnerClass >::LeakCounter::~LeakCounter().


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