43 # include <tpl_snode.H>
45 using namespace Aleph;
86 template <
template <
typename>
class Node,
typename T>
113 template <
template <
typename>
class Node_Type,
typename T>
123 void insert_first(
Node * node)
127 this->insert_next(node);
130 Node * remove_first()
throw(std::exception, std::underflow_error)
132 if (this->is_empty())
133 throw std::underflow_error (
"list is empty");
135 return this->remove_next();
138 Node * get_first()
throw(std::exception, std::underflow_error)
140 if (this->is_empty())
141 throw std::underflow_error (
"list is empty");
143 return this->get_next();
160 :
list(&_list), current(
list->get_first()) { }
162 bool has_current()
const {
return current !=
list; }
164 Node * get_current()
throw(std::exception, std::overflow_error)
166 if (not this->has_current())
167 throw std::overflow_error (
"");
172 void next()
throw(std::exception, std::overflow_error)
174 if (not this->has_current())
175 throw std::overflow_error (
"");
177 current = current->get_next();
180 void reset_first() { current =
list->get_next(); }
193 template <
typename T>
203 template <
typename T>
Definition: tpl_slist_modified.H:51
Definition: tpl_snode.H:22
Definition: tpl_slist_modified.H:146
Definition: tpl_slist.H:20
Definition: tpl_slist_modified.H:114
Definition: tpl_slist_modified.H:204
Definition: tpl_slist_modified.H:67