38# include <gtest/gtest.h>
43using namespace testing;
109 l.append_list(&
laux);
113 l.insert_list(&
laux);
248 for (
size_t i = 0; i < 2; ++i)
281 for (
size_t i = 0; i < 2; ++i)
355 list.append_list(&
laux);
371 list.insert_list(&
lr);
377 list.insert_list(&
laux);
412 EXPECT_EQ(list.get_first()->get_next()->get_next()->get_next(), &
m1);
bool is_in_last() const noexcept
Return true if the iterator is positiones on the last item.
constexpr bool is_in_first() const noexcept
Return true if the iterator is positiones on the first item.
bool has_curr() const noexcept
Return true if the iterator has current item.
Dlink * get_curr() const
Return the current node of iterator.
void next()
Move the iterator one position forward.
Dlink * del()
Remove from the list the current node and move the iterator one position forward.
void prev()
Move the iterator one position backward.
void reset_last() noexcept
Reset the iterator to the last item of list.
void reset_first() noexcept
Reset the iterator to the first item of list.
bool is_last() const noexcept
Doubly linked circular list node.
constexpr bool is_unitarian_or_empty() const noexcept
Return true if this (as header node) has zero or one element.
constexpr Dlink *& get_last() const noexcept
If this is a header node, it return the last node of this
constexpr Dlink *& get_first() const noexcept
If this is a header node, it return the first node of this
constexpr bool is_empty() const noexcept
Return true if this (as header node) is empty.
void append(Dlink *node) noexcept
Insert node before this.
Dlink * del() noexcept
Remove this from the list. this must not be a header node.
constexpr bool is_unitarian() const noexcept
Return true if this (as header node) has exactly one element.
void push(Dlink *node) noexcept
void append_list(Dlink *head) noexcept
Insert the list head after this
void insert(Dlink *node) noexcept
Insert node after this.
T & insert(const T &item)
Insert a new item by copy.
T & append(const T &item)
Append a new item by copy.
T & get_last() const
Return the last item of the list.
T & get_first() const
Return the first item of the list.
DynList & swap(DynList &l) noexcept
Swap this with l.
size_t reverse_list() noexcept
void cut_list(Slinknc *link, HTList &list) noexcept
constexpr bool is_empty() const noexcept
Return true if list is empty.
size_t split_list(HTList &l, HTList &r) noexcept
It divides 'this' into two equal lists without modifying elements order.
bool is_unitarian() const noexcept
Return true if the list contains exactly just one element.
bool is_unitarian_or_empty() const noexcept
Return true if list contains one element or is empty.
Doubly linked circular list implementation.
TEST_F(List_of_5_nodes, Iterator)
Main namespace for Aleph-w library functions.
void reverse(Itor beg, Itor end)
Reverse elements in a range.
T & swap(T &t1, T &t2)
Generic swap using object's swap method.
DynList< T > maps(const C &c, Op op)
Classic map operation.