aboutsummaryrefslogtreecommitdiffstats
path: root/ext/atom.lv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-10 03:28:20 +0000
committerDavid Robillard <d@drobilla.net>2011-10-10 03:28:20 +0000
commitbfab1592ec2ac68c1c2ff8d1d7713ebaa81d8839 (patch)
treeec478013d61b5beab44ad131df3f65e6ec50eab9 /ext/atom.lv2
parent5caadbdd38342bb3f275e89f6dcd637d37893f65 (diff)
downloadlv2-bfab1592ec2ac68c1c2ff8d1d7713ebaa81d8839.tar.xz
Tidy.
Diffstat (limited to 'ext/atom.lv2')
-rw-r--r--ext/atom.lv2/atom-helpers.h17
-rw-r--r--ext/atom.lv2/atom.h4
2 files changed, 11 insertions, 10 deletions
diff --git a/ext/atom.lv2/atom-helpers.h b/ext/atom.lv2/atom-helpers.h
index b58fa09..71c16e9 100644
--- a/ext/atom.lv2/atom-helpers.h
+++ b/ext/atom.lv2/atom-helpers.h
@@ -16,10 +16,10 @@
/**
@file atom-helpers.h Helper functions for the LV2 Atom extension.
-
+
These functions are provided for convenience only, use of them is not
required for supporting atoms.
-
+
Note that these functions are all static inline which basically means:
do not take the address of these functions.
*/
@@ -68,8 +68,9 @@ lv2_object_iter_equals(const LV2_Object_Iter l, const LV2_Object_Iter r)
static inline LV2_Object_Iter
lv2_object_iter_next(const LV2_Object_Iter iter)
{
- return (LV2_Object_Iter)(
- (uint8_t*)iter + sizeof(LV2_Atom_Property) + lv2_atom_pad_size(iter->value.size));
+ return (LV2_Object_Iter)((uint8_t*)iter
+ + sizeof(LV2_Atom_Property)
+ + lv2_atom_pad_size(iter->value.size));
}
/** Return the property pointed to by @c iter */
@@ -83,7 +84,7 @@ lv2_object_iter_get(LV2_Object_Iter iter)
A macro for iterating over all properties of an Object.
@param obj The object to iterate over
@param iter The name of the iterator
-
+
This macro is used similarly to a for loop (which it expands to), e.g.:
<pre>
LV2_OBJECT_FOREACH(object, i) {
@@ -169,8 +170,8 @@ lv2_atom_is_a(LV2_Atom* object,
/** A single entry in an Object query. */
typedef struct {
- uint32_t key; ///< Set by the user to the desired key to query.
- const LV2_Atom* value; ///< Possibly set by query function to the found value
+ uint32_t key; ///< Key to query (input set by user)
+ const LV2_Atom* value; ///< Found value (output set by query function)
} LV2_Object_Query;
/**
@@ -191,7 +192,7 @@ lv2_object_query(const LV2_Atom* object, LV2_Object_Query* query)
// Count number of query keys so we can short-circuit when done
for (LV2_Object_Query* q = query; q->key; ++q)
++n_queries;
-
+
LV2_OBJECT_FOREACH(object, o) {
const LV2_Atom_Property* prop = lv2_object_iter_get(o);
for (LV2_Object_Query* q = query; q->key; ++q) {
diff --git a/ext/atom.lv2/atom.h b/ext/atom.lv2/atom.h
index d69c547..d6d2308 100644
--- a/ext/atom.lv2/atom.h
+++ b/ext/atom.lv2/atom.h
@@ -109,8 +109,8 @@ typedef struct _LV2_Atom_Property {
The body of an atom:Resource or atom:Blank.
*/
typedef struct _LV2_Object {
- uint32_t context; /**< ID of context graph, or 0 for the default context */
- uint32_t id; /**< ID for atom:Resource or blank ID for atom:Blank */
+ uint32_t context; /**< ID of context graph, or 0 for default */
+ uint32_t id; /**< URID (for Resource) or blank ID (for Blank) */
uint8_t properties[]; /**< Sequence of LV2_Atom_Property */
} LV2_Object;