17 #ifndef __TBB_node_handle_H 18 #define __TBB_node_handle_H 21 #include "../tbb_config.h" 28 namespace interface5 {
30 template <
typename T,
typename Allocator>
31 class split_ordered_list;
32 template <
typename Traits>
33 class concurrent_unordered_base;
37 namespace interface10{
39 template<
typename Traits>
40 class concurrent_skip_list;
46 template<
typename Value,
typename Node,
typename Allocator>
57 my_allocator(
std::
move(nh.my_allocator)) {
61 bool empty()
const {
return my_node == NULL; }
62 explicit operator bool()
const {
return my_node != NULL; }
90 traits_type::destroy(my_allocator, my_node->storage());
92 node_allocator.deallocate(my_node, 1);
103 template<
typename Key,
typename Value,
typename Node,
typename Allocator>
114 __TBB_ASSERT(!this->empty(),
"Cannot get key from the empty node_type object");
115 return *
const_cast<key_type*
>(&(this->my_node->value().first));
119 __TBB_ASSERT(!this->empty(),
"Cannot get mapped value from the empty node_type object");
120 return this->my_node->value().second;
124 template<
typename T,
typename A>
127 template<
typename Traits>
130 template<
typename Traits>
137 template<
typename Key,
typename Node,
typename Allocator>
147 __TBB_ASSERT(!this->empty(),
"Cannot get value from the empty node_type object");
148 return *
const_cast<value_type*
>(&(this->my_node->value()));
152 template<
typename T,
typename A>
155 template<
typename Traits>
158 template<
typename Traits>
node_handle_base & operator=(node_handle_base &&nh)
node_handle_base< Key, Node, Allocator > base_type
void move(tbb_thread &t1, tbb_thread &t2)
tbb::internal::allocator_traits< allocator_type > traits_type
allocator_traits< Alloc >::template rebind_alloc< T >::other type
base_type::allocator_type allocator_type
node_handle_base< Value, Node, Allocator > base_type
void swap(atomic< T > &lhs, atomic< T > &rhs)
value_type & value() const
base_type::allocator_type allocator_type
Value::second_type mapped_type
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
node_handle_base(node_handle_base &&nh)
allocator_type get_allocator() const
node_handle(typename base_type::node *n)
void allocator_move_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
allocator_type my_allocator
mapped_type & mapped() const
node_handle_base(node *n)
void swap(node_handle_base &nh)
void allocator_swap(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
node_handle(typename base_type::node *n)