Design Patterns
reverse_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_REVERSE_LIST_ITERATOR_H_
7 #define OPERATIONAL_ITERATOR_REVERSE_LIST_ITERATOR_H_
8 
9 #include "iterator_interface.h"
10 #include "list.h"
11 
12 namespace operational
13 {
14 namespace iterator
15 {
16 template<class Item>
18 {
19  public:
20  explicit ReverseListIterator(const List<Item>* list);
21  virtual ~ReverseListIterator() override;
22 
23  virtual void First() override;
24  virtual void Next() override;
25  virtual bool IsDone() const override;
26  virtual 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 
ReverseListIterator(const List< Item > *list)
Definition: reverse_list_iterator.h:30
Definition: application.cc:10
virtual void First() override
Definition: reverse_list_iterator.h:36
virtual void Next() override
Definition: reverse_list_iterator.h:39
Definition: list.h:17
virtual Item CurrentItem() const override
Definition: reverse_list_iterator.h:48
virtual ~ReverseListIterator() override
Definition: reverse_list_iterator.h:33
virtual bool IsDone() const override
Definition: reverse_list_iterator.h:42
Definition: iterator_interface.h:14
Definition: reverse_list_iterator.h:17