5 #ifndef BALL_DATATYPE_LIST_H
6 #define BALL_DATATYPE_LIST_H
12 #ifndef BALL_CONCEPT_VISITOR_H
16 #ifndef BALL_CONCEPT_PROCESSOR_H
22 #ifdef BALL_COMPILER_GXX
23 #warning "This header file is deprecated and should not be used in new code! As a replacement for BALL::List the use of std::list is strongly suggested."
33 template <
typename Value>
35 :
public std::list<Value>
45 typedef typename std::list<Value>::iterator
Iterator;
47 typedef typename std::list<Value>::iterator
iterator;
75 : std::list<
Value>(new_list)
83 std::list<Value>::clear();
90 std::list<Value>::clear();
101 void set(
const List& list,
bool =
true)
103 std::list<Value>::clear();
106 for ( ; it != list.end(); ++it)
108 std::list<Value>::push_back(const_cast<Value&>(*it));
121 void get(
List& list,
bool deep =
true)
const
123 list.
set(*
this, deep);
143 return (
Size)std::list<Value>::size();
152 Iterator it = std::list<Value>::begin();
153 for (; it != std::list<Value>::end(); ++it)
157 std::list<Value>::erase(it);
173 return (std::list<Value>::size() == 0);
196 if (!processor.
start())
return false;
198 for (
Iterator it = std::list<Value>::begin(); it != std::list<Value>::end(); ++it)
207 return processor.
finish();
217 if (std::list<Value>::size() != list.size())
225 for (; this_it != std::list<Value>::end(); ++this_it)
227 if (!(*this_it == *list_it))
241 return !(*
this == list);
246 template <
typename Value>
249 visitor.visit(*
this);
253 #endif // BALL_DATATYPE_LIST_H