Loading...
Searching...
No Matches
Nodes::Looper::value_slot Class Reference

Detailed Description

Where the value looper keeps a value: every one it records, holds or sends is copied, moved and let go of through this type and nowhere else.

A value is kept as a plain ossia::value. Numbers, booleans, impulses and vectors live inside it, so that keeping, copying and dropping them never allocates; a string, a list or a map owns heap memory, which is allocated when it is copied in and freed when it is let go of, on whatever thread does it, the audio thread included. A pooled allocator for those is a change of this type alone.

Public Member Functions

 value_slot (const value_slot &o)
 
 value_slot (value_slot &&o) noexcept
 
value_slot & operator= (const value_slot &o)
 
value_slot & operator= (value_slot &&o) noexcept
 
void set (const ossia::value &v)
 
void set (ossia::value &&v) noexcept
 
void reset () noexcept
 Lets go of what it holds.
 
const ossia::value & get () const noexcept
 
bool empty () const noexcept
 
bool impulse () const noexcept
 
bool same (const ossia::value &o) const noexcept
 
bool same (const value_slot &o) const noexcept
 

Static Public Member Functions

static bool same (const ossia::value &a, const ossia::value &b) noexcept
 

Member Function Documentation

◆ same()

static bool Nodes::Looper::value_slot::same ( const ossia::value &  a,
const ossia::value &  b 
)
inlinestaticnoexcept

The same value: of the same type and equal, a list or a map element by element. An impulse is never the same as anything else.


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