diff options
author | David Robillard <d@drobilla.net> | 2011-09-27 22:26:55 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-09-27 22:26:55 +0000 |
commit | 84ad1bf1317992127aac405feedbfd68c7be6697 (patch) | |
tree | 63884c6150f4b06c3faf2cdc086136fa2fde76da /src | |
parent | 5ea6caf8ec6e06b71f14e4a8ac33b29ada7a1518 (diff) | |
download | sord-84ad1bf1317992127aac405feedbfd68c7be6697.tar.gz sord-84ad1bf1317992127aac405feedbfd68c7be6697.tar.bz2 sord-84ad1bf1317992127aac405feedbfd68c7be6697.zip |
Add function sord_write_iter for writing a queried range.
git-svn-id: http://svn.drobilla.net/sord/trunk@162 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src')
-rw-r--r-- | src/syntax.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c index 93e1331..ac87ad4 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -181,6 +181,18 @@ sord_write(SordModel* model, { SordQuad pat = { 0, 0, 0, graph }; SordIter* iter = sord_find(model, pat); + return sord_write_iter(iter, writer); +} + +bool +sord_write_iter(SordIter* iter, + SerdWriter* writer) +{ + if (!iter) { + return false; + } + + SordModel* model = (SordModel*)sord_iter_get_model(iter); for (; !sord_iter_end(iter); sord_iter_next(iter)) { SordQuad tup; sord_iter_get(iter, tup); |