From b1f91277a29ddac92479106543ecfd62ff99d152 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Thu, 20 Mar 2014 16:20:45 +0100 Subject: added hashiterator, this is going to be one of the implementation classes for the upcoming value iterator --- src/iteratorimpl.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/iteratorimpl.h (limited to 'src/iteratorimpl.h') diff --git a/src/iteratorimpl.h b/src/iteratorimpl.h new file mode 100644 index 0000000..97c59e4 --- /dev/null +++ b/src/iteratorimpl.h @@ -0,0 +1,52 @@ +/** + * IteratorImpl.h + * + * Interface that describes what an implementation of an iterator should + * look like. This is an internal class that extension developers do not + * need. + * + * @author Emiel Bruijntjes + * @copyright 2014 Copernica BV + */ + +/** + * Set up namespace + */ +namespace Php { + +/** + * Class definition + */ +class IteratorImpl +{ + /** + * Increment position (pre-increment) + * @return bool + */ + virtual bool increment() = 0; + + /** + * Decrement position (pre-decrement) + * @return bool + */ + virtual bool decrement() = 0; + + /** + * Compare with other iterator + * @param that + * @return bool + */ + virtual bool equals(const IteratorImpl *that) const = 0; + + /** + * Derefecence, this returns a std::pair with the current key and value + * @return std::pair + */ + virtual const std::pair ¤t() const = 0; +}; + +/** + * End namespace + */ +} + -- cgit v1.2.3