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 || BALL_COMPILER_LLVM 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;
83 std::list<Value>::clear();
90 std::list<Value>::clear();
101 void set(
const List& list,
bool =
true)
103 std::list<Value>::clear();
105 ConstIterator it = list.begin();
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 bool operator==(const List< Value > &list) const
virtual void host(Visitor< List< Value > > &visitor)
void swap(List &list)
Swaps the contents of two lists.
void set(const List &list, bool=true)
std::list< Value >::iterator Iterator
const List & operator=(const List &list)
std::list< Value >::iterator iterator
bool operator!=(const List< Value > &list) const
List(const List &new_list, bool)
std::list< Value >::const_iterator const_iterator
bool apply(UnaryProcessor< Value > &processor)
#define BALL_CREATE_DEEP(name)
std::list< Value >::const_iterator ConstIterator