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_base & | operator= (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_type > | traits_type

## Protected Member Functions

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

## Protected Attributes

node * | my_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.

: my_node(NULL), my_allocator() {}
tbb::internal::node_handle_base::my_allocator
allocator_type my_allocator
Definition: _node_handle_impl.h:99
tbb::internal::node_handle_base::my_node
node * my_node
Definition: _node_handle_impl.h:98

## 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.

: my_node(nh.my_node),
my_allocator(std::move(nh.my_allocator)) {
nh.my_node = NULL;
}
tbb::move
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.

{ internal_destroy(); }
tbb::internal::node_handle_base::internal_destroy
void internal_destroy()
Definition: _node_handle_impl.h:88

References tbb::internal::node_handle_base< Value, Node, Allocator >::internal_destroy().

Here is the call graph for this function:

## 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 | ) |

inline protected

Definition at line 86 of file _node_handle_impl.h.

: my_node(n) {}

## Member Function Documentation

## deactivate()

template<typename Value , typename Node , typename Allocator >

void tbb::internal::node_handle_base< Value, Node, Allocator >::deactivate | ( |  | ) |

inline protected

Definition at line 96 of file _node_handle_impl.h.

{ my_node = NULL; }

References tbb::internal::node_handle_base< Value, Node, Allocator >::my_node.

## 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.

{ return my_node == NULL; }

References tbb::internal::node_handle_base< Value, Node, Allocator >::my_node.

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.

{
return my_allocator;
}

References tbb::internal::node_handle_base< Value, Node, Allocator >::my_allocator.

## internal_destroy()

template<typename Value , typename Node , typename Allocator >

void tbb::internal::node_handle_base< Value, Node, Allocator >::internal_destroy | ( |  | ) |

inline protected

Definition at line 88 of file _node_handle_impl.h.

{
if(my_node) {
traits_type::destroy(my_allocator, my_node->storage());
typename tbb::internal::allocator_rebind<allocator_type, node>::type node_allocator;
node_allocator.deallocate(my_node, 1);
}
}
tbb::internal::allocator_traits< allocator_type >::destroy
static void destroy(allocator_type &, T *p)
Definition: _allocator_traits.h:133
tbb::internal::allocator_rebind::type
allocator_traits< Alloc >::template rebind_alloc< T >::other type
Definition: _allocator_traits.h:149

References tbb::internal::allocator_traits< allocator_type >::destroy(), tbb::internal::node_handle_base< Value, Node, Allocator >::my_allocator, and tbb::internal::node_handle_base< Value, Node, Allocator >::my_node.

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

Here is the call graph for this function:
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

inline explicit

Definition at line 62 of file _node_handle_impl.h.

{ return my_node != NULL; }

References tbb::internal::node_handle_base< Value, Node, Allocator >::my_node.

## 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.

{
internal_destroy();
my_node = nh.my_node;
typedef typename traits_type::propagate_on_container_move_assignment pocma_type;
tbb::internal::allocator_move_assignment(my_allocator, nh.my_allocator, pocma_type());
nh.deactivate();
return *this;
}
tbb::internal::allocator_move_assignment
void allocator_move_assignment(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
Definition: _allocator_traits.h:59
tbb::internal::allocator_traits< allocator_type >::propagate_on_container_move_assignment
tbb::internal::false_type propagate_on_container_move_assignment
Definition: _allocator_traits.h:86

References tbb::internal::allocator_move_assignment(), tbb::internal::node_handle_base< Value, Node, Allocator >::internal_destroy(), tbb::internal::node_handle_base< Value, Node, Allocator >::my_allocator, and tbb::internal::node_handle_base< Value, Node, Allocator >::my_node.

Here is the call graph for this function:

## 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.

{
std::swap(my_node, nh.my_node);
typedef typename traits_type::propagate_on_container_swap pocs_type;
tbb::internal::allocator_swap(my_allocator, nh.my_allocator, pocs_type());
}
tbb::internal::allocator_swap
void allocator_swap(MyAlloc &my_allocator, OtherAlloc &other_allocator, traits_true_type)
Definition: _allocator_traits.h:69
tbb::internal::swap
void swap(atomic< T > &lhs, atomic< T > &rhs)
Definition: atomic.h:564
tbb::internal::allocator_traits< allocator_type >::propagate_on_container_swap
tbb::internal::false_type propagate_on_container_swap
Definition: _allocator_traits.h:88

References tbb::internal::allocator_swap(), tbb::internal::node_handle_base< Value, Node, Allocator >::my_allocator, tbb::internal::node_handle_base< Value, Node, Allocator >::my_node, and tbb::internal::swap().

Here is the call graph for this function:

## Member Data Documentation

## my_allocator

template<typename Value , typename Node , typename Allocator >

allocator_type tbb::internal::node_handle_base< Value, Node, Allocator >::my_allocator

protected

Definition at line 99 of file _node_handle_impl.h.

Referenced by tbb::internal::node_handle_base< Value, Node, Allocator >::get_allocator(), tbb::internal::node_handle_base< Value, Node, Allocator >::internal_destroy(), tbb::internal::node_handle_base< Value, Node, Allocator >::operator=(), and tbb::internal::node_handle_base< Value, Node, Allocator >::swap().

## my_node

template<typename Value , typename Node , typename Allocator >

node* tbb::internal::node_handle_base< Value, Node, Allocator >::my_node

protected

Definition at line 98 of file _node_handle_impl.h.

Referenced by tbb::internal::node_handle_base< Value, Node, Allocator >::deactivate(), tbb::internal::node_handle_base< Value, Node, Allocator >::empty(), tbb::internal::node_handle_base< Value, Node, Allocator >::internal_destroy(), tbb::internal::node_handle< Key, Value, Node, Allocator >::key(), tbb::internal::node_handle< Key, Value, Node, Allocator >::mapped(), tbb::internal::node_handle_base< Value, Node, Allocator >::operator bool(), tbb::internal::node_handle_base< Value, Node, Allocator >::operator=(), tbb::internal::node_handle_base< Value, Node, Allocator >::swap(), and tbb::internal::node_handle< Key, Key, Node, Allocator >::value().

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

- _node_handle_impl.h

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.