21 #ifndef _TBB_intrusive_list_H 22 #define _TBB_intrusive_list_H 44 template <
class List,
class T>
56 template<
class Iterator>
58 Iterator&
self () {
return *static_cast<Iterator*>(
this); }
84 return my_pos == it.my_pos;
88 return my_pos != it.my_pos;
102 Iterator result =
self();
108 Iterator result =
self();
117 #if TBB_USE_ASSERT >= 2 167 const_iterator
end ()
const {
return const_iterator(&
my_head); }
171 "Object with intrusive list node can be part of only one intrusive list simultaneously" );
212 template <
class T,
class U,
intrusive_list_node U::*NodePtr>
224 return *reinterpret_cast<T*>((
char*)
node - ((ptrdiff_t)&(reinterpret_cast<T*>(0x1000)->*NodePtr) - 0x1000));
Iterator & operator=(const Iterator &it)
static T & item(intrusive_list_node *node)
iterator(intrusive_list_node *pos)
const_iterator(const intrusive_list_node *pos)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
intrusive_list_node * my_prev_node
intrusive_list_node * my_pos
Node the iterator points to at the moment.
bool operator==(const Iterator &it) const
bool operator!=(const Iterator &it) const
static intrusive_list_node & node(T &item)
List of element of type T, where T is derived from intrusive_list_node.
iterator erase(iterator it)
Double linked list of items of type T that is derived from intrusive_list_node class.
size_t my_size
Number of list elements.
intrusive_list_node * my_next_node
static intrusive_list_node & node(T &val)
const T * operator->() const
iterator_impl(intrusive_list_node *pos)
static intrusive_list_node & node(T &val)
intrusive_list_node my_head
Pointer to the head node.
static T & item(intrusive_list_node *node)
const T & operator*() const
const_iterator end() const
static T & item(intrusive_list_node *node)
Data structure to be inherited by the types that can form intrusive lists.
const_iterator begin() const
Double linked list of items of type T containing a member of type intrusive_list_node.