JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::AbstractFifo::ScopedReadWrite< mode > Class Template Referencefinal

Class for a scoped reader/writer. More...

#include <juce_AbstractFifo.h>

Collaboration diagram for juce::AbstractFifo::ScopedReadWrite< mode >:

Public Member Functions

 ScopedReadWrite ()=default
 Construct an unassigned reader/writer. More...
 
 ScopedReadWrite (AbstractFifo &f, int num) noexcept
 Construct a reader/writer and immediately call prepareRead/prepareWrite on the abstractFifo which was passed in. More...
 
 ScopedReadWrite (const ScopedReadWrite &)=delete
 
 ScopedReadWrite (ScopedReadWrite &&) noexcept
 
 ~ScopedReadWrite () noexcept
 Calls finishedRead or finishedWrite if this is a non-null scoped reader/writer. More...
 
template<typename FunctionToApply >
void forEach (FunctionToApply &&func) const
 Calls the passed function with each index that was deemed valid for the current read/write operation. More...
 
ScopedReadWriteoperator= (const ScopedReadWrite &)=delete
 
ScopedReadWriteoperator= (ScopedReadWrite &&) noexcept
 

Public Attributes

int blockSize1
 
int blockSize2
 
int startIndex1
 
int startIndex2
 

Private Member Functions

void finish (AbstractFifo &f, int num) noexcept
 
void finish (AbstractFifo &f, int num) noexcept
 
void prepare (AbstractFifo &, int) noexcept
 
void prepare (AbstractFifo &f, int num) noexcept
 
void prepare (AbstractFifo &f, int num) noexcept
 
void swap (ScopedReadWrite &) noexcept
 

Static Private Member Functions

static void finish (AbstractFifo &, int) noexcept
 

Private Attributes

AbstractFifofifo = nullptr
 

Detailed Description

template<ReadOrWrite mode>
class juce::AbstractFifo::ScopedReadWrite< mode >

Class for a scoped reader/writer.

Constructor & Destructor Documentation

◆ ScopedReadWrite() [1/4]

template<ReadOrWrite mode>
juce::AbstractFifo::ScopedReadWrite< mode >::ScopedReadWrite ( )
default

Construct an unassigned reader/writer.

Doesn't do anything upon destruction.

◆ ScopedReadWrite() [2/4]

template<ReadOrWrite mode>
juce::AbstractFifo::ScopedReadWrite< mode >::ScopedReadWrite ( AbstractFifo f,
int  num 
)
inlinenoexcept

Construct a reader/writer and immediately call prepareRead/prepareWrite on the abstractFifo which was passed in.

This object will hold a pointer back to the fifo, so make sure that the fifo outlives this object.

References juce::gl::num.

◆ ScopedReadWrite() [3/4]

template<ReadOrWrite mode>
juce::AbstractFifo::ScopedReadWrite< mode >::ScopedReadWrite ( const ScopedReadWrite< mode > &  )
delete

◆ ScopedReadWrite() [4/4]

template<ReadOrWrite mode>
juce::AbstractFifo::ScopedReadWrite< mode >::ScopedReadWrite ( ScopedReadWrite< mode > &&  )
noexcept

◆ ~ScopedReadWrite()

template<ReadOrWrite mode>
juce::AbstractFifo::ScopedReadWrite< mode >::~ScopedReadWrite ( )
inlinenoexcept

Calls finishedRead or finishedWrite if this is a non-null scoped reader/writer.

Member Function Documentation

◆ finish() [1/3]

template<ReadOrWrite mode>
static void juce::AbstractFifo::ScopedReadWrite< mode >::finish ( AbstractFifo ,
int   
)
staticprivatenoexcept

◆ finish() [2/3]

void juce::AbstractFifo::ScopedReadWrite< AbstractFifo::ReadOrWrite::read >::finish ( AbstractFifo f,
int  num 
)
inlineprivatenoexcept

References juce::gl::f, and juce::gl::num.

◆ finish() [3/3]

void juce::AbstractFifo::ScopedReadWrite< AbstractFifo::ReadOrWrite::write >::finish ( AbstractFifo f,
int  num 
)
inlineprivatenoexcept

References juce::gl::f, and juce::gl::num.

◆ forEach()

template<ReadOrWrite mode>
template<typename FunctionToApply >
void juce::AbstractFifo::ScopedReadWrite< mode >::forEach ( FunctionToApply &&  func) const
inline

Calls the passed function with each index that was deemed valid for the current read/write operation.

References juce::gl::func.

◆ operator=() [1/2]

template<ReadOrWrite mode>
ScopedReadWrite& juce::AbstractFifo::ScopedReadWrite< mode >::operator= ( const ScopedReadWrite< mode > &  )
delete

◆ operator=() [2/2]

template<ReadOrWrite mode>
ScopedReadWrite& juce::AbstractFifo::ScopedReadWrite< mode >::operator= ( ScopedReadWrite< mode > &&  )
noexcept

◆ prepare() [1/3]

template<ReadOrWrite mode>
void juce::AbstractFifo::ScopedReadWrite< mode >::prepare ( AbstractFifo ,
int   
)
privatenoexcept

◆ prepare() [2/3]

void juce::AbstractFifo::ScopedReadWrite< AbstractFifo::ReadOrWrite::read >::prepare ( AbstractFifo f,
int  num 
)
inlineprivatenoexcept

References juce::gl::f, and juce::gl::num.

◆ prepare() [3/3]

void juce::AbstractFifo::ScopedReadWrite< AbstractFifo::ReadOrWrite::write >::prepare ( AbstractFifo f,
int  num 
)
inlineprivatenoexcept

References juce::gl::f, and juce::gl::num.

◆ swap()

template<ReadOrWrite mode>
void juce::AbstractFifo::ScopedReadWrite< mode >::swap ( ScopedReadWrite< mode > &  )
privatenoexcept

Member Data Documentation

◆ blockSize1

template<ReadOrWrite mode>
int juce::AbstractFifo::ScopedReadWrite< mode >::blockSize1

◆ blockSize2

template<ReadOrWrite mode>
int juce::AbstractFifo::ScopedReadWrite< mode >::blockSize2

◆ fifo

template<ReadOrWrite mode>
AbstractFifo* juce::AbstractFifo::ScopedReadWrite< mode >::fifo = nullptr
private

◆ startIndex1

template<ReadOrWrite mode>
int juce::AbstractFifo::ScopedReadWrite< mode >::startIndex1

◆ startIndex2

template<ReadOrWrite mode>
int juce::AbstractFifo::ScopedReadWrite< mode >::startIndex2

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