tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tracktion::engine::AtomicWrapper< Type, Constrainer > Struct Template Reference

Wraps an atomic with an interface compatible with var so it can be used within CachedValues in a thread safe way. More...

#include "tracktion_AtomicWrapper.h"

Public Member Functions

 AtomicWrapper ()=default
 Constructor.
 
template<typename OtherType >
 AtomicWrapper (const OtherType &other)
 Constructs a copy of another wrapper type.
 
 AtomicWrapper (const AtomicWrapper &other)
 Constructs a copy of another AtomicWrapper.
 
AtomicWrapperoperator= (const AtomicWrapper &other) noexcept
 Assigns another AtomicWrapper's underlying value to this one atomically.
 
bool operator== (const AtomicWrapper &other) const noexcept
 Compares the unerlaying value of another wrapper with this one.
 
bool operator!= (const AtomicWrapper &other) const noexcept
 Compares the unerlaying value of another wrapper with this one.
 
 operator juce::var () const noexcept
 Returns the underlying value as a var.
 
 operator Type () const noexcept
 Returns the underlying value.
 

Detailed Description

template<typename Type, typename Constrainer = DummyConstrainer<Type>>
struct tracktion::engine::AtomicWrapper< Type, Constrainer >

Wraps an atomic with an interface compatible with var so it can be used within CachedValues in a thread safe way.

Optionally supply a Constrainer to limit the value in some way.

Definition at line 39 of file tracktion_AtomicWrapper.h.

Constructor & Destructor Documentation

◆ AtomicWrapper() [1/2]

template<typename Type , typename Constrainer = DummyConstrainer<Type>>
template<typename OtherType >
tracktion::engine::AtomicWrapper< Type, Constrainer >::AtomicWrapper ( const OtherType &  other)

Constructs a copy of another wrapper type.

Definition at line 47 of file tracktion_AtomicWrapper.h.

◆ AtomicWrapper() [2/2]

template<typename Type , typename Constrainer = DummyConstrainer<Type>>
tracktion::engine::AtomicWrapper< Type, Constrainer >::AtomicWrapper ( const AtomicWrapper< Type, Constrainer > &  other)

Constructs a copy of another AtomicWrapper.

Definition at line 53 of file tracktion_AtomicWrapper.h.

Member Function Documentation

◆ operator juce::var()

template<typename Type , typename Constrainer = DummyConstrainer<Type>>
tracktion::engine::AtomicWrapper< Type, Constrainer >::operator juce::var ( ) const
noexcept

Returns the underlying value as a var.

Definition at line 79 of file tracktion_AtomicWrapper.h.

◆ operator Type()

template<typename Type , typename Constrainer = DummyConstrainer<Type>>
tracktion::engine::AtomicWrapper< Type, Constrainer >::operator Type ( ) const
noexcept

Returns the underlying value.

Definition at line 85 of file tracktion_AtomicWrapper.h.

◆ operator!=()

template<typename Type , typename Constrainer = DummyConstrainer<Type>>
bool tracktion::engine::AtomicWrapper< Type, Constrainer >::operator!= ( const AtomicWrapper< Type, Constrainer > &  other) const
noexcept

Compares the unerlaying value of another wrapper with this one.

Definition at line 72 of file tracktion_AtomicWrapper.h.

◆ operator=()

template<typename Type , typename Constrainer = DummyConstrainer<Type>>
AtomicWrapper & tracktion::engine::AtomicWrapper< Type, Constrainer >::operator= ( const AtomicWrapper< Type, Constrainer > &  other)
noexcept

Assigns another AtomicWrapper's underlying value to this one atomically.

Definition at line 59 of file tracktion_AtomicWrapper.h.

◆ operator==()

template<typename Type , typename Constrainer = DummyConstrainer<Type>>
bool tracktion::engine::AtomicWrapper< Type, Constrainer >::operator== ( const AtomicWrapper< Type, Constrainer > &  other) const
noexcept

Compares the unerlaying value of another wrapper with this one.

Definition at line 66 of file tracktion_AtomicWrapper.h.


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