diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-04-01 15:21:13 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-04-01 15:21:13 (GMT) |
commit | de20cde3d47c58a69c25afe75e4c476d61dbe631 (patch) | |
tree | 3a293a9effd1e75fc51a16da348b000001756267 /addon/doxmlparser/src/baseiterator.h | |
parent | 21587da40824d8609575284f0ee0fac90c972f27 (diff) | |
download | Doxygen-de20cde3d47c58a69c25afe75e4c476d61dbe631.zip Doxygen-de20cde3d47c58a69c25afe75e4c476d61dbe631.tar.gz Doxygen-de20cde3d47c58a69c25afe75e4c476d61dbe631.tar.bz2 |
Release-1.2.15
Diffstat (limited to 'addon/doxmlparser/src/baseiterator.h')
-rw-r--r-- | addon/doxmlparser/src/baseiterator.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/addon/doxmlparser/src/baseiterator.h b/addon/doxmlparser/src/baseiterator.h index 847d1ef..bbcf7cf 100644 --- a/addon/doxmlparser/src/baseiterator.h +++ b/addon/doxmlparser/src/baseiterator.h @@ -32,4 +32,19 @@ template<class Intf,class ElemIntf,class ElemImpl> class BaseIterator : virtual void release() { delete this; } }; +template<class Intf,class ElemIntf,class ElemImpl,class Intermediate> + class BaseIteratorVia : + public Intf, public QListIterator<ElemImpl> +{ + public: + BaseIteratorVia(const QList<ElemImpl> &list) : QListIterator<ElemImpl>(list) {} + virtual ~BaseIteratorVia() {} + virtual ElemIntf *toFirst() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::toFirst()); } + virtual ElemIntf *toLast() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::toLast()); } + virtual ElemIntf *toNext() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::operator++()); } + virtual ElemIntf *toPrev() { return static_cast<Intermediate *>(QListIterator<ElemImpl>::operator--()); } + virtual ElemIntf *current() const { return static_cast<Intermediate *>(QListIterator<ElemImpl>::current()); } + virtual void release() { delete this; } +}; + #endif |