33template<
class LListBase,
class T>
38 for (
const auto& item : lst)
40 this->push_back(item.clone().ptr());
45template<
class LListBase,
class T>
48 UILList<LListBase,
T>()
50 LListBase::transfer(lst);
54template<
class LListBase,
class T>
55template<
class CloneArg>
59 const CloneArg& cloneArg
64 for (
const auto& item : lst)
66 this->push_back(item.clone(cloneArg).ptr());
73template<
class LListBase,
class T>
82template<
class LListBase,
class T>
92 T*
p = this->removeHead();
99template<
class LListBase,
class T>
107template<
class LListBase,
class T>
116template<
class LListBase,
class T>
120 LListBase::transfer(lst);
126template<
class LListBase,
class T>
131 for (
const auto& item : lst)
133 this->push_back(item.clone().ptr());
138template<
class LListBase,
class T>
142 LListBase::transfer(lst);
Template class for intrusive linked lists.
void pop_front(label n=1)
Remove first element(s) from the list (deletes pointers).
void transfer(ILList< LListBase, T > &lst)
Transfer the contents of the argument into this List and annul the argument list.
ILList()=default
Default construct.
bool erase(T *item)
Remove the specified element from the list and delete it.
void clear()
Clear the contents of the list.
~ILList()
Destructor. Calls clear().
void operator=(const ILList< LListBase, T > &lst)
Copy assignment using the 'clone()' method for each element.
Template class for intrusive linked lists.
UILList()=default
Default construct.
T * remove(T *item)
Remove and return element.
T * removeHead()
Remove and return head.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)