Function lv2_raw::atomutils::lv2_atom_object_query [] [src]

pub unsafe fn lv2_atom_object_query(
    obj: *mut LV2AtomObject,
    query: *mut LV2AtomObjectQuery
) -> i32

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: @code const LV2_Atom* name = NULL; const LV2_Atom* age = NULL; LV2_Atom_Object_Query q[] = { { urids.eg_name, &name }, { urids.eg_age, &age }, LV2_ATOM_OBJECT_QUERY_END }; lv2_atom_object_query(obj, q); // name and age are now set to the appropriate values in obj, or NULL. @endcode