Loading...
Searching...
No Matches
juce::AbstractFifo::ScopedReadWrite< mode > Class Template Referencefinal

## Detailed Description

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

Class for a scoped reader/writer.

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

- juce_core/containers/juce_AbstractFifo.h

## Public Member Functions

| ScopedReadWrite ()=default
| Construct an unassigned reader/writer.
| ScopedReadWrite (AbstractFifo &f, int num) noexcept
| Construct a reader/writer and immediately call prepareRead/prepareWrite on the abstractFifo which was passed in.
| ScopedReadWrite (const ScopedReadWrite &)=delete
| ScopedReadWrite (ScopedReadWrite &&) noexcept
ScopedReadWrite & | operator= (const ScopedReadWrite &)=delete
ScopedReadWrite & | operator= (ScopedReadWrite &&) noexcept
| ~ScopedReadWrite () noexcept
| Calls finishedRead or finishedWrite if this is a non-null scoped reader/writer.
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.

## Public Attributes

int | startIndex1
int | blockSize1
int | startIndex2
int | blockSize2

## Constructors and Destructors

## 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 )

inline noexcept

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.

## 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 | ( |  | ) |

inline noexcept

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

## Member Functions

## 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

## 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.

## Member Data Documentation

## startIndex1

template<ReadOrWrite mode>

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

## blockSize1

template<ReadOrWrite mode>

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

## startIndex2

template<ReadOrWrite mode>

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

## blockSize2

template<ReadOrWrite mode>

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

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited