OpenShot Audio Library | OpenShotAudio 0.4.0

Loading...
Searching...
No Matches
Public Member Functions | List of all members
juce::FixedSizeFunction< len, Ret(Args...)> Class Template Reference

`#include <juce_FixedSizeFunction.h>`

## Public Member Functions
| FixedSizeFunction () noexcept=default
| FixedSizeFunction (std::nullptr_t) noexcept
| FixedSizeFunction (const FixedSizeFunction &)=delete
template<typename Callable , typename Fn = Decay<Callable>, IntIfValidConversion< Callable > = 0>
| FixedSizeFunction (Callable &&callable)
| FixedSizeFunction (FixedSizeFunction &&other) noexcept
template<size_t otherLen, std::enable_if_t<(otherLen< len), int > = 0>
| FixedSizeFunction (FixedSizeFunction< otherLen, Ret(Args...)> &&other) noexcept
FixedSizeFunction & | operator= (std::nullptr_t) noexcept
FixedSizeFunction & | operator= (const FixedSizeFunction &)=delete
template<typename Callable , IntIfValidConversion< Callable > = 0>
FixedSizeFunction & | operator= (Callable &&callable)
template<size_t otherLen, std::enable_if_t<(otherLen< len), int > = 0>
FixedSizeFunction & | operator= (FixedSizeFunction< otherLen, Ret(Args...)> &&other) noexcept
FixedSizeFunction & | operator= (FixedSizeFunction &&other) noexcept
| ~FixedSizeFunction () noexcept
Ret | operator() (Args... args) const
| operator bool () const noexcept

## Detailed Description

template<size_t len, typename Ret, typename... Args>
class juce::FixedSizeFunction< len, Ret(Args...)>

A type similar to `std::function` that holds a callable object.

Unlike `std::function`, the callable object will always be stored in a buffer of size `len` that is internal to the FixedSizeFunction instance. This in turn means that creating a FixedSizeFunction instance will never allocate, making FixedSizeFunctions suitable for use in realtime contexts.

Definition at line 99 of file juce_FixedSizeFunction.h.

## Constructor & Destructor Documentation

## ◆ FixedSizeFunction() [1/5]

template<size_t len, typename Ret , typename... Args>

juce::FixedSizeFunction< len, Ret(Args...)>::FixedSizeFunction | ( |  | ) |
| default noexcept

Create an empty function.

## ◆ FixedSizeFunction() [2/5]

template<size_t len, typename Ret , typename... Args>

juce::FixedSizeFunction< len, Ret(Args...)>::FixedSizeFunction | ( | std::nullptr_t |  | ) |
| inline noexcept

Create an empty function.

Definition at line 118 of file juce_FixedSizeFunction.h.

## ◆ FixedSizeFunction() [3/5]

template<size_t len, typename Ret , typename... Args>
template<typename Callable , typename Fn = Decay<Callable>, IntIfValidConversion< Callable > = 0>

juce::FixedSizeFunction< len, Ret(Args...)>::FixedSizeFunction | ( | Callable && | callable | ) |
| inline

Forwards the passed Callable into the internal storage buffer.

Definition at line 127 of file juce_FixedSizeFunction.h.

## ◆ FixedSizeFunction() [4/5]

template<size_t len, typename Ret , typename... Args>

juce::FixedSizeFunction< len, Ret(Args...)>::FixedSizeFunction | ( | FixedSizeFunction< len, Ret(Args...)> && | other | ) |
| inline noexcept

Move constructor.

Definition at line 142 of file juce_FixedSizeFunction.h.

## ◆ FixedSizeFunction() [5/5]

template<size_t len, typename Ret , typename... Args>
template<size_t otherLen, std::enable_if_t<(otherLen< len), int > = 0>

juce::FixedSizeFunction< len, Ret(Args...)>::FixedSizeFunction | ( | FixedSizeFunction< otherLen, Ret(Args...)> && | other | ) |
| inline noexcept

Converting constructor from smaller FixedSizeFunctions.

Definition at line 150 of file juce_FixedSizeFunction.h.

## ◆ ~FixedSizeFunction()

template<size_t len, typename Ret , typename... Args>

juce::FixedSizeFunction< len, Ret(Args...)>::~FixedSizeFunction | ( |  | ) |
| inline noexcept

Destructor.

Definition at line 188 of file juce_FixedSizeFunction.h.

## Member Function Documentation

## ◆ operator bool()

template<size_t len, typename Ret , typename... Args>

juce::FixedSizeFunction< len, Ret(Args...)>::operator bool | ( |  | ) | const
| inline explicit noexcept

Returns true if this instance currently holds a callable.

Definition at line 202 of file juce_FixedSizeFunction.h.

## ◆ operator()()

template<size_t len, typename Ret , typename... Args>

Ret juce::FixedSizeFunction< len, Ret(Args...)>::operator() | ( | Args... | args | ) | const
| inline

If this instance is currently storing a callable object, calls that object, otherwise throws `std::bad_function_call`.

Definition at line 193 of file juce_FixedSizeFunction.h.

## ◆ operator=() [1/4]

template<size_t len, typename Ret , typename... Args>
template<typename Callable , IntIfValidConversion< Callable > = 0>

FixedSizeFunction & juce::FixedSizeFunction< len, Ret(Args...)>::operator= | ( | Callable && | callable | ) |
| inline

Assigns a new callable to this instance.

Definition at line 166 of file juce_FixedSizeFunction.h.

## ◆ operator=() [2/4]

template<size_t len, typename Ret , typename... Args>

FixedSizeFunction & juce::FixedSizeFunction< len, Ret(Args...)>::operator= | ( | FixedSizeFunction< len, Ret(Args...)> && | other | ) |
| inline noexcept

Move assignment operator.

Definition at line 179 of file juce_FixedSizeFunction.h.

## ◆ operator=() [3/4]

template<size_t len, typename Ret , typename... Args>
template<size_t otherLen, std::enable_if_t<(otherLen< len), int > = 0>

FixedSizeFunction & juce::FixedSizeFunction< len, Ret(Args...)>::operator= | ( | FixedSizeFunction< otherLen, Ret(Args...)> && | other | ) |
| inline noexcept

Move assignment from smaller FixedSizeFunctions.

Definition at line 173 of file juce_FixedSizeFunction.h.

## ◆ operator=() [4/4]

template<size_t len, typename Ret , typename... Args>

FixedSizeFunction & juce::FixedSizeFunction< len, Ret(Args...)>::operator= | ( | std::nullptr_t |  | ) |
| inline noexcept

Nulls this instance.

Definition at line 157 of file juce_FixedSizeFunction.h.

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

- juce_FixedSizeFunction.h