4#ifndef QINTRUSIVELIST_P_H
5#define QINTRUSIVELIST_P_H
18#include <QtCore/private/qglobal_p.h>
23template<
class N, QIntrusiveListNode N::*member>
54 static inline N *
next(N *current);
57 inline iterator
end();
78template<
class N, QIntrusiveListNode N::*member>
84template<
class N, QIntrusiveListNode N::*member>
90template<
class N, QIntrusiveListNode N::*member>
96template<
class N, QIntrusiveListNode N::*member>
102template<
class N, QIntrusiveListNode N::*member>
105 return other._value == _value;
108template<
class N, QIntrusiveListNode N::*member>
111 return other._value != _value;
114template<
class N, QIntrusiveListNode N::*member>
121template<
class N, QIntrusiveListNode N::*member>
130template<
class N, QIntrusiveListNode N::*member>
136template<
class N, QIntrusiveListNode N::*member>
139 while (__first) __first->
remove();
142template<
class N, QIntrusiveListNode N::*member>
145 return __first ==
nullptr;
148template<
class N, QIntrusiveListNode N::*member>
154 nnode->
_next = __first;
157 nnode->
_prev = &__first;
160template<
class N, QIntrusiveListNode N::*member>
167template<
class N, QIntrusiveListNode N::*member>
172 if (nodeToN(nnode) ==
n)
174 nnode = nnode->
_next;
179template<
class N, QIntrusiveListNode N::*member>
182 return __first?nodeToN(__first):
nullptr;
185template<
class N, QIntrusiveListNode N::*member>
189 N *nextstruct = nextnode?nodeToN(nextnode):
nullptr;
193template<
class N, QIntrusiveListNode N::*member>
199template<
class N, QIntrusiveListNode N::*member>
205template<
class N, QIntrusiveListNode N::*member>
209#if defined(Q_CC_CLANG) && Q_CC_CLANG >= 1300
212 return (N *)((
char *)node - ((
char *)&(((N *)
nullptr)->*member) - (
char *)
nullptr));
227 if (_prev) *_prev = _next;
228 if (_next) _next->_prev = _prev;
235 return _prev !=
nullptr;
void remove()
If in a list, remove this node otherwise do nothing.
QIntrusiveListNode * _next
bool isInList() const
Returns true if this node is in a list, false otherwise.
QIntrusiveListNode()
Create a QIntrusiveListNode.
QIntrusiveListNode ** _prev
~QIntrusiveListNode()
Destroy the QIntrusiveListNode.
iterator & erase()
Remove the current object from the list, and return an iterator to the next element.
bool operator!=(const iterator &other) const
bool operator==(const iterator &other) const
The QIntrusiveList class is a template class that provides a list of objects using static storage.
void insert(N *n)
Insert object into the list.
void remove(N *n)
Remove object from the list.
bool contains(N *) const
Returns true if the list contains object; otherwise returns false.
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list.
QIntrusiveList()
Construct an empty list.
~QIntrusiveList()
Destroy the list.
N * first() const
Returns the first entry in this list, or null if the list is empty.
iterator begin()
Returns an STL-style interator pointing to the first item in the list.
static N * next(N *current)
Returns the next object after current, or null if current is the last object.
Combined button and popup list for selecting options.
#define QT_WARNING_DISABLE_CLANG(text)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]