9 template<
typename T,
typename N = UInt_64>
24 : size(0), start(nullptr), end(nullptr)
29 : start(nullptr), end(nullptr), size(list.size)
31 const Link<T>* rLast = list.start;
46 : start(list.start), end(list.end), size(list.size)
58 const Link<T>* rLast = list.start;
95 for (N i = 0; i != index; ++i)
96 result = result->
child;
105 for (N i = 0; i != index; ++i)
106 result = result->
child;
113 if (index && index == size - 1)
115 end->child =
new Link<T>(value);
123 for (N i = 0; i != index - 1; ++i)
124 hierarchy = hierarchy->
child;
128 return hierarchy->
child->value;
132 start =
new Link<T>(value, start);
140 if (index && index == size - 1)
143 while (hierarchy->
child->child)
144 hierarchy = hierarchy->
child;
146 T result = end->value;
155 for (N i = 0; i != index - 1; ++i)
156 hierarchy = hierarchy->
child;
159 T result = tmp->
value;
161 tmp->
child =
nullptr;
168 T result = tmp->
value;
169 start = start->child;
172 tmp->
child =
nullptr;
186 end->child =
new Link<T>(value);
204 T result = start->value;
214 while (hierarchy->
child->child)
215 hierarchy = hierarchy->
child;
217 T result = hierarchy->
child->value;
218 delete hierarchy->
child;
219 hierarchy->
child =
nullptr;
Link< T > * child
Definition Link.h:11
T value
Definition Link.h:10
const Link< T > * operator[](const N index) const
Definition LinkedList.h:91
T & Push(const T value)
Definition LinkedList.h:182
LinkedList(const LinkedList &list)
Definition LinkedList.h:28
N Size() const
Definition LinkedList.h:235
Link< T > * operator[](const N index)
Definition LinkedList.h:101
~LinkedList()
Definition LinkedList.h:18
T & Insert(const N index, const T value)
Definition LinkedList.h:111
T Remove(const N index)
Definition LinkedList.h:138
LinkedList & operator=(LinkedList &&list) noexcept
Definition LinkedList.h:75
void Clear()
Definition LinkedList.h:227
LinkedList & operator=(const LinkedList &list)
Definition LinkedList.h:53
T Pop()
Definition LinkedList.h:200
LinkedList()
Definition LinkedList.h:23
LinkedList(LinkedList &&list) noexcept
Definition LinkedList.h:45