9#ifndef HPP_ALIB_LANG_BIDILIST
10#define HPP_ALIB_LANG_BIDILIST 1
34template<
typename TElement>
78 TElement*
prev() const noexcept {
return p; }
115 last->next()->prev(
prev() );
116 prev()->next( last->next() );
134template<
typename TElement>
160 if( !move.isEmpty() )
212 TElement*
end() const noexcept
213 {
return static_cast<TElement*
>( &
const_cast<BidiListHook*
>(
this)->
hook ); }
230 bool isFirst(
const TElement* elem )
const noexcept {
return first() == elem; }
236 bool isLast(
const TElement* elem )
const noexcept {
return last() == elem; }
platform_specific integer
TElement * popFront() noexcept
void reset() noexcept
Resets this list to zero elements.
void pushFront(TElement *elem) noexcept
BidiListHook(TElement *first, TElement *last) noexcept
void pushFront(TElement *first, TElement *last) noexcept
integer count(const TNode *end=nullptr) const noexcept
TElement * first() const noexcept
void pushEnd(TElement *elem) noexcept
TElement * last() const noexcept
bool isFirst(const TElement *elem) const noexcept
BidiListHook(const BidiListHook &)=delete
Deleted copy constructor.
BidiListHook & operator=(const BidiListHook &)=delete
BidiListHook(BidiListHook &&move) noexcept
void pushEnd(TElement *first, TElement *last) noexcept
bool isLast(const TElement *elem) const noexcept
bool isEmpty() const noexcept
BidiListHook() noexcept
Default constructor. Initializes this list to be empty.
TNode hook
The root node. Points twice to itself when the list is empty.
TElement * end() const noexcept
TElement * popEnd() noexcept
void remove() noexcept
Unhooks this node from a list.
void addBehind(TElement *elem) noexcept
BidiNodeBase() noexcept=default
Default constructor. (Does not initialize the pointer!)
TElement * prev() const noexcept
void remove(TElement *last) noexcept
void prev(BidiNodeBase *previous) noexcept
void addBefore(TElement *elem) noexcept
void next(SidiNodeBase *p)
bool pointsTo(const SidiNodeBase *elem) const