Ingen  0.5.1
Public Member Functions | Friends | List of all members
Ingen::Atom Class Reference

A generic typed data container. More...

#include <Atom.hpp>

+ Inheritance diagram for Ingen::Atom:

Public Member Functions

 Atom (uint32_t size, LV2_URID type, const void *body)
 Construct a raw atom. More...
 Atom (const Atom &copy)
Atomoperator= (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


class Forge

Detailed Description

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

Constructor & Destructor Documentation

§ Atom()

Ingen::Atom::Atom ( uint32_t  size,
LV2_URID  type,
const void *  body 

Construct a raw atom.

Typically this is not used directly, use Forge methods to make atoms.

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