diff options
Diffstat (limited to 'src/iteratorimpl.h')
-rw-r--r-- | src/iteratorimpl.h | 52 |
1 files changed, 52 insertions, 0 deletions
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 <emiel.bruijntjes@copernica.com> + * @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<Value,Value> ¤t() const = 0; +}; + +/** + * End namespace + */ +} + |