|
| FixedSizeFunction () noexcept=default |
| Create an empty function. More...
|
|
template<typename Callable , typename Fn = Decay<Callable>, IntIfValidConversion< Callable > = 0> |
| FixedSizeFunction (Callable &&callable) |
| Forwards the passed Callable into the internal storage buffer. More...
|
|
| FixedSizeFunction (const FixedSizeFunction &)=delete |
|
| FixedSizeFunction (FixedSizeFunction &&other) noexcept |
| Move constructor. More...
|
|
template<size_t otherLen, typename std::enable_if<(otherLen< len), int >::type = 0> |
| FixedSizeFunction (FixedSizeFunction< otherLen, Ret(Args...)> &&other) noexcept |
| Converting constructor from smaller FixedSizeFunctions. More...
|
|
| FixedSizeFunction (std::nullptr_t) noexcept |
| Create an empty function. More...
|
|
| ~FixedSizeFunction () noexcept |
| Destructor. More...
|
|
| operator bool () const noexcept |
| Returns true if this instance currently holds a callable. More...
|
|
Ret | operator() (Args... args) const |
| If this instance is currently storing a callable object, calls that object, otherwise throws std::bad_function_call . More...
|
|
template<typename Callable , IntIfValidConversion< Callable > = 0> |
FixedSizeFunction & | operator= (Callable &&callable) |
| Assigns a new callable to this instance. More...
|
|
FixedSizeFunction & | operator= (const FixedSizeFunction &)=delete |
|
FixedSizeFunction & | operator= (FixedSizeFunction &&other) noexcept |
| Move assignment operator. More...
|
|
template<size_t otherLen, typename std::enable_if<(otherLen< len), int >::type = 0> |
FixedSizeFunction & | operator= (FixedSizeFunction< otherLen, Ret(Args...)> &&other) noexcept |
| Move assignment from smaller FixedSizeFunctions. More...
|
|
FixedSizeFunction & | operator= (std::nullptr_t) noexcept |
| Nulls this instance. More...
|
|
template<size_t len, typename Ret, typename... Args>
class juce::dsp::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.
@tags{DSP}
template<size_t len, typename Ret , typename... Args>
template<typename Callable , typename Fn = Decay<Callable>, IntIfValidConversion< Callable > = 0>
juce::dsp::FixedSizeFunction< len, Ret(Args...)>::FixedSizeFunction |
( |
Callable && |
callable | ) |
|
|
inline |
template<size_t len, typename Ret , typename... Args>
template<size_t otherLen, typename std::enable_if<(otherLen< len), int >::type = 0>
juce::dsp::FixedSizeFunction< len, Ret(Args...)>::FixedSizeFunction |
( |
FixedSizeFunction< otherLen, Ret(Args...)> && |
other | ) |
|
|
inlinenoexcept |
Converting constructor from smaller FixedSizeFunctions.