aboutsummaryrefslogtreecommitdiffstats
path: root/src/range.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-05-12 13:28:47 +0200
committerDavid Robillard <d@drobilla.net>2020-06-21 18:12:04 +0200
commite58e51850bc388ef666ebdf29d213878f5ec0629 (patch)
tree1faee34b2488d6d94634d602c9d56f083662db48 /src/range.h
parent23ac6850e10baa32ade25f8a090329672ce99318 (diff)
downloadserd-e58e51850bc388ef666ebdf29d213878f5ec0629.tar.gz
serd-e58e51850bc388ef666ebdf29d213878f5ec0629.tar.bz2
serd-e58e51850bc388ef666ebdf29d213878f5ec0629.zip
Add model
Diffstat (limited to 'src/range.h')
-rw-r--r--src/range.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/range.h b/src/range.h
new file mode 100644
index 00000000..97e33b5c
--- /dev/null
+++ b/src/range.h
@@ -0,0 +1,35 @@
+/*
+ Copyright 2011-2020 David Robillard <http://drobilla.net>
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+
+#ifndef SERD_RANGE_H
+#define SERD_RANGE_H
+
+#include "serd/serd.h"
+
+#include <stdbool.h>
+
+struct SerdRangeImpl {
+ SerdIter* begin; ///< Iterator to first statement in range
+ SerdIter* end; ///< Iterator to end of range
+};
+
+SerdRange*
+serd_range_new(SerdIter* begin, SerdIter* end);
+
+bool
+serd_range_scan_next(SerdRange* range);
+
+#endif // SERD_RANGE_H