Ingen
0.5.1
|
A generic typed data container. More...
#include <Atom.hpp>
Public Member Functions | |
Atom (uint32_t size, LV2_URID type, const void *body) | |
Construct a raw atom. More... | |
Atom (const Atom ©) | |
Atom & | operator= (const Atom &other) |
bool | operator== (const Atom &other) const |
bool | operator!= (const Atom &other) const |
bool | operator< (const Atom &other) const |
uint32_t | size () const |
LV2_URID | type () const |
bool | is_valid () const |
const void * | get_body () const |
void * | get_body () |
template<typename T > | |
const T & | get () const |
template<typename T > | |
const T * | ptr () const |
const LV2_Atom * | atom () const |
Friends | |
class | Forge |
A generic typed data container.
An Atom holds a value with some type and size, both specified by a uint32_t. Values with size less than sizeof(void*) are stored inline: no dynamic allocation occurs so Atoms may be created in hard real-time threads. Otherwise, if the size is larger than sizeof(void*), the value will be dynamically allocated in a separate chunk of memory.
In either case, the data is stored in a binary compatible format to LV2_Atom (i.e., if the value is dynamically allocated, the header is repeated there).
|
inline |
Construct a raw atom.
Typically this is not used directly, use Forge methods to make atoms.