22 #ifndef COMMON_LIST_INTERN_H 23 #define COMMON_LIST_INTERN_H 25 #include "common/scummsys.h" 29 template<
typename T>
class List;
32 namespace ListInternal {
45 Node(
const T &x) : _data(x) {}
70 Self operator++(
int) {
82 Self operator--(
int) {
87 ValueRef operator*()
const {
89 return static_cast<NodePtr
>(_node)->_data;
91 ValuePtr operator->()
const {
92 return &(operator*());
95 bool operator==(
const Self &x)
const {
96 return _node == x._node;
99 bool operator!=(
const Self &x)
const {
100 return _node != x._node;
108 typedef const T & ValueRef;
109 typedef const T * ValuePtr;
120 _node = _node->_next;
124 Self operator++(
int) {
132 _node = _node->_prev;
136 Self operator--(
int) {
141 ValueRef operator*()
const {
143 return static_cast<NodePtr
>(_node)->_data;
145 ValuePtr operator->()
const {
146 return &(operator*());
149 bool operator==(
const Self &x)
const {
150 return _node == x._node;
153 bool operator!=(
const Self &x)
const {
154 return _node != x._node;
161 return a._node == b._node;
166 return a._node != b._node;
Definition: list_intern.h:33
Definition: algorithm.h:29
Definition: list_intern.h:48
Definition: list_intern.h:51
Definition: list_intern.h:42