Design Patterns
skip_list.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_H_
7 #define OPERATIONAL_ITERATOR_SKIP_LIST_H_
8 
9 #include "list.h"
10 
11 namespace operational
12 {
13 namespace iterator
14 {
15 template<class Item>
16 class SkipList : public List<Item>
17 {
18  public:
19  explicit SkipList(long size);
20  explicit SkipList(List<Item>& list);
21  ~SkipList() override;
22 
23  virtual IteratorInterface<Item> *CreateIterator() const override;
24 };
25 
26 template<class Item>
27 SkipList<Item>::SkipList(long size) : List<Item>(size) { }
28 
29 template<class Item>
30 SkipList<Item>::SkipList(List<Item>& list) : List<Item>(list) { }
31 
32 template<class Item>
34 
35 template<class Item>
37 {
38  return nullptr;
39 }
40 }
41 }
42 
43 #endif
44 
virtual IteratorInterface< Item > * CreateIterator() const override
Definition: skip_list.h:36
Definition: application.cc:10
Definition: list.h:17
~SkipList() override
Definition: skip_list.h:33
SkipList(long size)
Definition: skip_list.h:27
Definition: skip_list.h:16
Definition: iterator_interface.h:14