File indexing completed on 2024-04-21 16:33:50

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_BOOKMARKSCONSTITERATORADAPTER_HPP
0010 #define OKTETA_BOOKMARKSCONSTITERATORADAPTER_HPP
0011 
0012 // lib
0013 #include "address.hpp"
0014 // Qt
0015 #include <QSharedData>
0016 
0017 namespace Okteta {
0018 
0019 class Bookmark;
0020 
0021 class BookmarksConstIteratorAdapter : public QSharedData
0022 {
0023 protected:
0024     BookmarksConstIteratorAdapter();
0025 
0026 public:
0027     BookmarksConstIteratorAdapter(const BookmarksConstIteratorAdapter&) = delete;
0028 
0029     virtual ~BookmarksConstIteratorAdapter();
0030 
0031 public:
0032     virtual bool hasNext() const = 0;
0033     virtual bool hasPrevious() const = 0;
0034     virtual const Bookmark& peekNext() const = 0;
0035     virtual const Bookmark& peekPrevious() const = 0;
0036 
0037 public:
0038     virtual bool findNext(const Bookmark& bookmark) = 0;
0039     virtual bool findPrevious(const Bookmark& bookmark) = 0;
0040     virtual bool findNextFrom(Address offset) = 0;
0041     virtual bool findPreviousFrom(Address offset) = 0;
0042     virtual const Bookmark& next() = 0;
0043     virtual const Bookmark& previous() = 0;
0044     virtual void toBack() = 0;
0045     virtual void toFront() = 0;
0046 };
0047 
0048 inline BookmarksConstIteratorAdapter::BookmarksConstIteratorAdapter() = default;
0049 inline BookmarksConstIteratorAdapter::~BookmarksConstIteratorAdapter() = default;
0050 
0051 }
0052 
0053 #endif