28template<
typename TElement>
72 TElement*
prev() const noexcept {
return p; }
109 last->next()->prev(
prev() );
110 prev()->next( last->next() );
128template<
typename TElement>
154 if( !move.isEmpty() )
156 hook.next( move.hook.next() );
157 hook.prev(move.hook.prev());
206 TElement*
end() const noexcept
207 {
return static_cast<TElement*
>( &
const_cast<BidiListHook*
>(
this)->hook ); }
213 TElement*
first() const noexcept {
return hook.next(); }
218 TElement*
last() const noexcept {
return hook.prev(); }
224 bool isFirst(
const TElement* elem )
const noexcept {
return first() == elem; }
230 bool isLast(
const TElement* elem )
const noexcept {
return last() == elem; }
243 void pushEnd( TElement* elem )
noexcept {
hook.addBefore( elem ); }
platform_specific integer
BidiListHook(const BidiListHook &)=delete
Deleted copy constructor.
bool isFirst(const TElement *elem) const noexcept
NodeBase * first() const noexcept
void pushEnd(TElement *first, TElement *last) noexcept
void reset() noexcept
Resets this list to zero elements.
TElement * popFront() noexcept
void pushFront(TElement *first, TElement *last) noexcept
integer count(const TNode *end=nullptr) const noexcept
bool isLast(const TElement *elem) const noexcept
TElement * popEnd() noexcept
void pushFront(TElement *elem) noexcept
BidiNodeBase< NodeBase > TNode
BidiListHook & operator=(const BidiListHook &)=delete
SidiNodeBase< NodeBase > TFNode
BidiListHook(TElement *first, TElement *last) noexcept
BidiListHook() noexcept
Default constructor. Initializes this list to be empty.
BidiListHook(BidiListHook &&move) noexcept
TElement * end() const noexcept
bool isEmpty() const noexcept
void pushEnd(TElement *elem) noexcept
NodeBase * last() const noexcept
SidiNodeBase< TElement > FWDNode
Alias name for an instantiation of the base template.
void prev(BidiNodeBase *previous) noexcept
BidiNodeBase() noexcept=default
Default constructor. (Does not initialize the pointer!)
void remove(TElement *last) noexcept
void remove() noexcept
Unhooks this node from a list.
void addBehind(TElement *elem) noexcept
void addBefore(TElement *elem) noexcept
TElement * prev() const noexcept
SidiNodeBase() noexcept=default
Default constructor. (Does not initialize the pointer.)
void next(SidiNodeBase *p)