blob: aa78931a9df238423e9e968b53073b319ef91c4a (
plain)
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
|
#pragma once
#include "backend/List.h"
#include <cstddef>
template <typename T>
class List;
template <typename T>
class ListIterator {
public:
ListIterator(List<T> & list, size_t index);
public:
T operator * () const;
ListIterator<T> & operator ++ ();
bool operator != (const ListIterator<T> &) const;
private:
List<T> & list;
size_t index;
};
template <typename T>
class ListRange {
public:
ListRange(List<T> & list);
public:
ListIterator<T> begin() const;
ListIterator<T> end() const;
size_t size() const;
private:
List<T> & list;
};
#include "ListIterator.hpp"
|