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