Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::interface5::internal::node_handle_base< Value, Allocator > Class Template Reference

#include <_concurrent_unordered_impl.h>

Inheritance diagram for tbb::interface5::internal::node_handle_base< Value, Allocator >:
Collaboration diagram for tbb::interface5::internal::node_handle_base< Value, Allocator >:

Public Types

typedef Allocator allocator_type
 

Public Member Functions

 node_handle_base ()
 
 node_handle_base (node_handle_base &&nh)
 
bool empty () const
 
 operator bool () const
 
 ~node_handle_base ()
 
node_handle_baseoperator= (node_handle_base &&nh)
 
void swap (node_handle_base &nh)
 
allocator_type get_allocator () const
 

Protected Types

typedef split_ordered_list< Value, allocator_type >::node node
 

Protected Member Functions

 node_handle_base (node *n)
 
void internal_destroy ()
 
void deactivate ()
 

Protected Attributes

nodemy_node
 
allocator_type my_allocator
 

Detailed Description

template<typename Value, typename Allocator>
class tbb::interface5::internal::node_handle_base< Value, Allocator >

Definition at line 1653 of file _concurrent_unordered_impl.h.

Member Typedef Documentation

◆ allocator_type

template<typename Value, typename Allocator>
typedef Allocator tbb::interface5::internal::node_handle_base< Value, Allocator >::allocator_type

Definition at line 1655 of file _concurrent_unordered_impl.h.

◆ node

template<typename Value, typename Allocator>
typedef split_ordered_list<Value, allocator_type>::node tbb::interface5::internal::node_handle_base< Value, Allocator >::node
protected

Definition at line 1657 of file _concurrent_unordered_impl.h.

Constructor & Destructor Documentation

◆ node_handle_base() [1/3]

template<typename Value, typename Allocator>
tbb::interface5::internal::node_handle_base< Value, Allocator >::node_handle_base ( )
inline

◆ node_handle_base() [2/3]

template<typename Value, typename Allocator>
tbb::interface5::internal::node_handle_base< Value, Allocator >::node_handle_base ( node_handle_base< Value, Allocator > &&  nh)
inline

Definition at line 1661 of file _concurrent_unordered_impl.h.

1661  : my_node(nh.my_node),
1662  my_allocator(std::move(nh.my_allocator)) {
1663  nh.my_node = NULL;
1664  }
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:305

◆ ~node_handle_base()

template<typename Value, typename Allocator>
tbb::interface5::internal::node_handle_base< Value, Allocator >::~node_handle_base ( )
inline

◆ node_handle_base() [3/3]

template<typename Value, typename Allocator>
tbb::interface5::internal::node_handle_base< Value, Allocator >::node_handle_base ( node n)
inlineprotected

Member Function Documentation

◆ deactivate()

template<typename Value, typename Allocator>
void tbb::interface5::internal::node_handle_base< Value, Allocator >::deactivate ( )
inlineprotected

◆ empty()

◆ get_allocator()

template<typename Value, typename Allocator>
allocator_type tbb::interface5::internal::node_handle_base< Value, Allocator >::get_allocator ( ) const
inline

Definition at line 1688 of file _concurrent_unordered_impl.h.

1688  {
1689  return my_allocator;
1690  }

◆ internal_destroy()

template<typename Value, typename Allocator>
void tbb::interface5::internal::node_handle_base< Value, Allocator >::internal_destroy ( )
inlineprotected

Definition at line 1695 of file _concurrent_unordered_impl.h.

1695  {
1696  if(my_node) {
1697  my_allocator.destroy(&(my_node->my_element));
1698  // TODO: Consider using node_allocator from the container
1700  node_allocator.deallocate(my_node, 1);
1701  }
1702  }
allocator_traits< Alloc >::template rebind_alloc< T >::other type

Referenced by tbb::interface5::internal::node_handle_base< Key, Allocator >::operator=(), and tbb::interface5::internal::node_handle_base< Key, Allocator >::~node_handle_base().

Here is the caller graph for this function:

◆ operator bool()

template<typename Value, typename Allocator>
tbb::interface5::internal::node_handle_base< Value, Allocator >::operator bool ( ) const
inlineexplicit

Definition at line 1667 of file _concurrent_unordered_impl.h.

◆ operator=()

template<typename Value, typename Allocator>
node_handle_base& tbb::interface5::internal::node_handle_base< Value, Allocator >::operator= ( node_handle_base< Value, Allocator > &&  nh)
inline

Definition at line 1671 of file _concurrent_unordered_impl.h.

1671  {
1672  internal_destroy();
1673  my_node = nh.my_node;
1675  propagate_on_container_move_assignment pocma_type;
1676  tbb::internal::allocator_move_assignment(my_allocator, nh.my_allocator, pocma_type());
1677  nh.deactivate();
1678  return *this;
1679  }
void allocator_move_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)

◆ swap()

template<typename Value, typename Allocator>
void tbb::interface5::internal::node_handle_base< Value, Allocator >::swap ( node_handle_base< Value, Allocator > &  nh)
inline

Definition at line 1681 of file _concurrent_unordered_impl.h.

1681  {
1682  std::swap(my_node, nh.my_node);
1684  propagate_on_container_swap pocs_type;
1685  tbb::internal::allocator_swap(my_allocator, nh.my_allocator, pocs_type());
1686  }
void swap(atomic< T > &lhs, atomic< T > &rhs)
Definition: atomic.h:535
void allocator_swap(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)

Member Data Documentation

◆ my_allocator

◆ my_node


The documentation for this class was generated from the following file:

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.