Collections¶
Lilv has several collection types for holding various types of value.
Each collection type supports a similar basic API, except LilvPlugins which is internal and thus lacks a free function:
void PREFIX_free (coll)
unsigned PREFIX_size (coll)
LilvIter* PREFIX_begin (coll)
The types of collection are:
LilvPlugins, with function prefixlilv_plugins_.LilvPluginClasses, with function prefixlilv_plugin_classes_.LilvScalePoints, with function prefixlilv_scale_points_.LilvNodes, with function prefixlilv_nodes_.LilvUIs, with function prefixlilv_uis_.
-
LILV_FOREACH(colltype, iter, collection)¶
Iterate over each element of a collection.
LILV_FOREACH(plugin_classes, i, classes) { LilvPluginClass c = lilv_plugin_classes_get(classes, i); // ... }
-
bool lilv_nodes_contains(const LilvNodes *nodes, const LilvNode *value)¶
Return whether
valuescontainsvalue.
-
LilvNodes *lilv_nodes_merge(const LilvNodes *a, const LilvNodes *b)¶
Return a new
LilvNodesthat contains all nodes from bothaandb.
-
const LilvPluginClass *lilv_plugin_classes_get_by_uri(const LilvPluginClasses *classes, const LilvNode *uri)¶
Get a plugin class from
classesby URI.Return value is shared (stored in
classes) and must not be freed or modified by the caller in any way.- Returns:
NULL if no plugin class with
uriis found inclasses.
-
const LilvPlugin *lilv_plugins_get_by_uri(const LilvPlugins *plugins, const LilvNode *uri)¶
Get a plugin from
pluginsby URI.Return value is shared (stored in
plugins) and must not be freed or modified by the caller in any way.- Returns:
NULL if no plugin with
uriis found inplugins.