forked from KDE/okteta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbookmarklistconstiteratoradapter.hpp
57 lines (46 loc) · 1.48 KB
/
bookmarklistconstiteratoradapter.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
This file is part of the Okteta Core library, made within the KDE community.
SPDX-FileCopyrightText: 2009 Friedrich W. H. Kossebau <[email protected]>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#ifndef OKTETA_BOOKMARKLISTCONSTITERATORADAPTER_HPP
#define OKTETA_BOOKMARKLISTCONSTITERATORADAPTER_HPP
// lib
#include "bookmarksconstiteratoradapter.hpp"
// Qt
#include <QLinkedListIterator>
namespace Okteta {
class BookmarkList;
class BookmarkListConstIteratorAdapter : public BookmarksConstIteratorAdapter
{
public:
explicit BookmarkListConstIteratorAdapter(const BookmarkList& list);
~BookmarkListConstIteratorAdapter() override;
public: // BookmarksConstIteratorAdapter API
[[nodiscard]]
bool hasNext() const override;
[[nodiscard]]
bool hasPrevious() const override;
[[nodiscard]]
const Bookmark& peekNext() const override;
[[nodiscard]]
const Bookmark& peekPrevious() const override;
[[nodiscard]]
bool findNext(const Bookmark& bookmark) override;
[[nodiscard]]
bool findPrevious(const Bookmark& bookmark) override;
[[nodiscard]]
bool findNextFrom(Address offset) override;
[[nodiscard]]
bool findPreviousFrom(Address offset) override;
[[nodiscard]]
const Bookmark& next() override;
[[nodiscard]]
const Bookmark& previous() override;
void toBack() override;
void toFront() override;
private:
QLinkedListIterator<Bookmark> mIterator;
};
}
#endif