Design Patterns
skip_list_iterator.h
Go to the documentation of this file.
1 // Based on "Design Patterns: Elements of Reusable Object-Oriented Software"
2 // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
3 //
4 // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan.
5 
6 #ifndef OPERATIONAL_ITERATOR_SKIP_LIST_ITERATOR_H_
7 #define OPERATIONAL_ITERATOR_SKIP_LIST_ITERATOR_H_
8 
9 #include "list.h"
10 #include "list_iterator.h"
11 
12 namespace operational
13 {
14 namespace iterator
15 {
16 template<class Item>
17 class SkipListIterator : public ListIterator<Item>
18 {
19  public:
20  explicit SkipListIterator(const List<Item>* list);
21  ~SkipListIterator() override;
22 
23  void First() override;
24  void Next() override;
25  bool IsDone() const override;
26  Item CurrentItem() const override;
27 };
28 
29 template<class Item>
31 
32 template<class Item>
34 
35 template<class Item>
37 
38 template<class Item>
40 
41 template<class Item>
43 {
44  return false;
45 }
46 
47 template<class Item>
49 {
50  return {};
51 }
52 }
53 }
54 
55 #endif
56 
Definition: skip_list_iterator.h:17
void First() override
Definition: skip_list_iterator.h:36
Item CurrentItem() const override
Definition: skip_list_iterator.h:48
Definition: application.cc:10
Definition: list.h:17
bool IsDone() const override
Definition: skip_list_iterator.h:42
~SkipListIterator() override
Definition: skip_list_iterator.h:30
void Next() override
Definition: skip_list_iterator.h:39
Definition: list_iterator.h:17
SkipListIterator(const List< Item > *list)
Definition: skip_list_iterator.h:33