From d457446041b634e650d95539ad44f553c1eee6e1 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 23 Nov 2012 06:14:56 +0000 Subject: Add lilv_world_ask() for simply checking if a statement exists. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4862 a436a847-0d15-0410-975c-d299462d15a1 --- lilv/lilv.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lilv') diff --git a/lilv/lilv.h b/lilv/lilv.h index 1d05883..52e3576 100644 --- a/lilv/lilv.h +++ b/lilv/lilv.h @@ -649,6 +649,23 @@ lilv_world_find_nodes(LilvWorld* world, const LilvNode* predicate, const LilvNode* object); +/** + Return true iff a statement matching a certain pattern exists. + + This is useful for checking if particular statement exists without having to + bother with collections and memory management. + + @param subject Subject of statement, or NULL for anything. + @param predicate Predicate (key) of statement, or NULL for anything. + @param object Object (value) of statement, or NULL for anything. +*/ +LILV_API +bool +lilv_world_ask(LilvWorld* world, + const LilvNode* subject, + const LilvNode* predicate, + const LilvNode* object); + /** @} @name Plugin -- cgit v1.2.1