Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal::node_handle_base< Value, Node, Allocator > Class Template Reference

#include <_node_handle_impl.h>

Inheritance diagram for tbb::internal::node_handle_base< Value, Node, Allocator >:
Collaboration diagram for tbb::internal::node_handle_base< Value, Node, 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 Node node
 
typedef tbb::internal::allocator_traits< allocator_typetraits_type
 

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 Node, typename Allocator>
class tbb::internal::node_handle_base< Value, Node, Allocator >

Definition at line 47 of file _node_handle_impl.h.

Member Typedef Documentation

◆ allocator_type

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

Definition at line 49 of file _node_handle_impl.h.

◆ node

template<typename Value, typename Node, typename Allocator>
typedef Node tbb::internal::node_handle_base< Value, Node, Allocator >::node
protected

Definition at line 51 of file _node_handle_impl.h.

◆ traits_type

template<typename Value, typename Node, typename Allocator>
typedef tbb::internal::allocator_traits<allocator_type> tbb::internal::node_handle_base< Value, Node, Allocator >::traits_type
protected

Definition at line 52 of file _node_handle_impl.h.

Constructor & Destructor Documentation

◆ node_handle_base() [1/3]

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

Definition at line 55 of file _node_handle_impl.h.

◆ node_handle_base() [2/3]

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

Definition at line 56 of file _node_handle_impl.h.

56  : my_node(nh.my_node),
57  my_allocator(std::move(nh.my_allocator)) {
58  nh.my_node = NULL;
59  }
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319

◆ ~node_handle_base()

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

Definition at line 64 of file _node_handle_impl.h.

◆ node_handle_base() [3/3]

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

Definition at line 86 of file _node_handle_impl.h.

Member Function Documentation

◆ deactivate()

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

Definition at line 96 of file _node_handle_impl.h.

◆ empty()

template<typename Value, typename Node, typename Allocator>
bool tbb::internal::node_handle_base< Value, Node, Allocator >::empty ( ) const
inline

Definition at line 61 of file _node_handle_impl.h.

61 { return my_node == NULL; }

Referenced by tbb::internal::node_handle< Key, Value, Node, Allocator >::key(), tbb::internal::node_handle< Key, Value, Node, Allocator >::mapped(), and tbb::internal::node_handle< Key, Key, Node, Allocator >::value().

Here is the caller graph for this function:

◆ get_allocator()

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

Definition at line 81 of file _node_handle_impl.h.

81  {
82  return my_allocator;
83  }

◆ internal_destroy()

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

Definition at line 88 of file _node_handle_impl.h.

88  {
89  if(my_node) {
92  node_allocator.deallocate(my_node, 1);
93  }
94  }
allocator_traits< Alloc >::template rebind_alloc< T >::other type
static void destroy(allocator_type &, T *p)

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

Here is the caller graph for this function:

◆ operator bool()

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

Definition at line 62 of file _node_handle_impl.h.

62 { return my_node != NULL; }

◆ operator=()

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

Definition at line 66 of file _node_handle_impl.h.

66  {
68  my_node = nh.my_node;
69  typedef typename traits_type::propagate_on_container_move_assignment pocma_type;
70  tbb::internal::allocator_move_assignment(my_allocator, nh.my_allocator, pocma_type());
71  nh.deactivate();
72  return *this;
73  }
void allocator_move_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
tbb::internal::false_type propagate_on_container_move_assignment

◆ swap()

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

Definition at line 75 of file _node_handle_impl.h.

75  {
76  std::swap(my_node, nh.my_node);
77  typedef typename traits_type::propagate_on_container_swap pocs_type;
78  tbb::internal::allocator_swap(my_allocator, nh.my_allocator, pocs_type());
79  }
void allocator_swap(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
void swap(atomic< T > &lhs, atomic< T > &rhs)
Definition: atomic.h:564

Member Data Documentation

◆ my_allocator

◆ my_node


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

Copyright © 2005-2020 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.