#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include "lv2_atom.h"
#include <stdbool.h>
Go to the source code of this file.
◆ LV2_ATOM_OBJECT_BODY_FOREACH
| #define LV2_ATOM_OBJECT_BODY_FOREACH |
( |
| body, |
|
|
| size, |
|
|
| iter ) |
Value:
static const LV2_Atom_Property_Body * lv2_atom_object_begin(const LV2_Atom_Object_Body *body)
Definition atom-util.h:248
static bool lv2_atom_object_is_end(const LV2_Atom_Object_Body *body, uint32_t size, const LV2_Atom_Property_Body *i)
Definition atom-util.h:255
static const LV2_Atom_Property_Body * lv2_atom_object_next(const LV2_Atom_Property_Body *i)
Definition atom-util.h:264
Like LV2_ATOM_OBJECT_FOREACH but for a headerless object body.
◆ LV2_ATOM_OBJECT_FOREACH
| #define LV2_ATOM_OBJECT_FOREACH |
( |
| obj, |
|
|
| iter ) |
Value:A macro for iterating over all properties of an Object.
- Parameters
-
| obj | The object to iterate over |
| iter | The name of the iterator |
This macro is used similarly to a for loop (which it expands to), e.g.:
}
register unsigned i
Definition inflate.c:1575
#define LV2_ATOM_OBJECT_FOREACH(obj, iter)
Definition atom-util.h:285
◆ LV2_ATOM_SEQUENCE_BODY_FOREACH
| #define LV2_ATOM_SEQUENCE_BODY_FOREACH |
( |
| body, |
|
|
| size, |
|
|
| iter ) |
Value:
static const LV2_Atom_Event * lv2_atom_sequence_next(const LV2_Atom_Event *i)
Definition atom-util.h:113
static const LV2_Atom_Event * lv2_atom_sequence_begin(const LV2_Atom_Sequence_Body *body)
Definition atom-util.h:83
static bool lv2_atom_sequence_is_end(const LV2_Atom_Sequence_Body *body, uint32_t size, const LV2_Atom_Event *i)
Definition atom-util.h:104
Like LV2_ATOM_SEQUENCE_FOREACH but for a headerless sequence body.
◆ LV2_ATOM_SEQUENCE_FOREACH
| #define LV2_ATOM_SEQUENCE_FOREACH |
( |
| seq, |
|
|
| iter ) |
Value:A macro for iterating over all events in a Sequence.
- Parameters
-
| seq | The sequence to iterate over |
| iter | The name of the iterator |
This macro is used similarly to a for loop (which it expands to), e.g.:
}
#define LV2_ATOM_SEQUENCE_FOREACH(seq, iter)
Definition atom-util.h:132
◆ LV2_ATOM_TUPLE_BODY_FOREACH
| #define LV2_ATOM_TUPLE_BODY_FOREACH |
( |
| body, |
|
|
| size, |
|
|
| iter ) |
Value:
static const LV2_Atom * lv2_atom_tuple_next(const LV2_Atom *i)
Definition atom-util.h:211
static bool lv2_atom_tuple_is_end(const void *body, uint32_t size, const LV2_Atom *i)
Definition atom-util.h:204
Like LV2_ATOM_TUPLE_FOREACH but for a headerless tuple body.
◆ LV2_ATOM_TUPLE_FOREACH
| #define LV2_ATOM_TUPLE_FOREACH |
( |
| tuple, |
|
|
| iter ) |
Value:
#define LV2_ATOM_BODY(atom)
Definition atom.h:98
static const LV2_Atom * lv2_atom_tuple_begin(const LV2_Atom_Tuple *tup)
Definition atom-util.h:197
A macro for iterating over all properties of a Tuple.
- Parameters
-
| tuple | The tuple to iterate over |
| iter | The name of the iterator |
This macro is used similarly to a for loop (which it expands to), e.g.:
LV2_ATOMO_TUPLE_FOREACH(tuple, elem) {
}
◆ lv2_atom_equals()
Return true iff a is equal to b.
◆ lv2_atom_is_null()
Return true iff atom is null.
◆ lv2_atom_object_begin()
Return a pointer to the first property in body.
◆ lv2_atom_object_body_get()
◆ lv2_atom_object_get()
Variable argument version of lv2_atom_object_query().
This is nicer-looking in code, but a bit more error-prone since it is not type safe and the argument list must be terminated.
The arguments should be a series of uint32_t key and const LV2_Atom** value pairs, terminated by a zero key. The value pointers MUST be initialized to NULL. For example:
0);
static char ** uris
Definition atom-test-utils.c:27
static const char * name
Definition pugl.h:1582
static int lv2_atom_object_get(const LV2_Atom_Object *object,...)
Definition atom-util.h:420
◆ lv2_atom_object_is_end()
Return true iff i has reached the end of obj.
◆ lv2_atom_object_next()
Return an iterator to the property following i.
◆ lv2_atom_object_query()
Get an object's values for various keys.
The value pointer of each item in query will be set to the location of the corresponding value in object. Every value pointer in query MUST be initialised to NULL. This function reads object in a single linear sweep. By allocating query on the stack, objects can be "queried" quickly without allocating any memory. This function is realtime safe.
This function can only do "flat" queries, it is not smart enough to match variables in nested objects.
For example:
{ urids.eg_name, &
name },
{ urids.eg_age, &age },
};
static const LV2_Atom_Object_Query LV2_ATOM_OBJECT_QUERY_END
Definition atom-util.h:308
static int lv2_atom_object_query(const LV2_Atom_Object *object, LV2_Atom_Object_Query *query)
Definition atom-util.h:336
Definition atom-util.h:303
register uch * q
Definition fileio.c:817
◆ lv2_atom_pad_size()
◆ lv2_atom_sequence_append_event()
Append an event at the end of sequence.
- Parameters
-
| seq | Sequence to append to. |
| capacity | Total capacity of the sequence atom (e.g. as set by the host for sequence output ports). |
| Event | Event to write. |
- Returns
- A pointer to the newly written event in
seq, or NULL on failure (insufficient space).
◆ lv2_atom_sequence_begin()
Get an iterator pointing to the first event in a Sequence body.
◆ lv2_atom_sequence_clear()
Clear all events from sequence.
This simply resets the size field, the other fields are left untouched.
◆ lv2_atom_sequence_end()
Get an iterator pointing to the end of a Sequence body.
◆ lv2_atom_sequence_is_end()
Return true iff i has reached the end of body.
◆ lv2_atom_sequence_next()
Return an iterator to the element following i.
◆ lv2_atom_total_size()
Return the total size of atom, including the header.
◆ lv2_atom_tuple_begin()
Get an iterator pointing to the first element in tup.
◆ lv2_atom_tuple_is_end()
Return true iff i has reached the end of body.
◆ lv2_atom_tuple_next()
Return an iterator to the element following i.
◆ LV2_ATOM_OBJECT_QUERY_END