File indexing completed on 2024-04-14 05:45:45

0001 /*
0002     This file is part of the Okteta Core library, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2009 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef OKTETA_BOOKMARKLISTCONSTITERATORADAPTER_HPP
0010 #define OKTETA_BOOKMARKLISTCONSTITERATORADAPTER_HPP
0011 
0012 // lib
0013 #include "bookmarksconstiteratoradapter.hpp"
0014 // Qt
0015 #include <QLinkedListIterator>
0016 
0017 namespace Okteta {
0018 class BookmarkList;
0019 
0020 class BookmarkListConstIteratorAdapter : public BookmarksConstIteratorAdapter
0021 {
0022 public:
0023     explicit BookmarkListConstIteratorAdapter(const BookmarkList& list);
0024     ~BookmarkListConstIteratorAdapter() override;
0025 
0026 public: // BookmarksConstIteratorAdapter API
0027     bool hasNext() const override;
0028     bool hasPrevious() const override;
0029     const Bookmark& peekNext() const override;
0030     const Bookmark& peekPrevious() const override;
0031 
0032     bool findNext(const Bookmark& bookmark) override;
0033     bool findPrevious(const Bookmark& bookmark) override;
0034     bool findNextFrom(Address offset) override;
0035     bool findPreviousFrom(Address offset) override;
0036     const Bookmark& next() override;
0037     const Bookmark& previous() override;
0038     void toBack() override;
0039     void toFront() override;
0040 
0041 private:
0042     QLinkedListIterator<Bookmark> mIterator;
0043 };
0044 
0045 }
0046 
0047 #endif