tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard Struct Reference

`#include <concurrent_hash_map.h>`

Inheritance diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard:
Collaboration diagram for tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard:

## Public Member Functions

| node_scoped_guard (node *n, node_allocator_type &alloc)
| ~node_scoped_guard ()
void | dismiss ()
Public Member Functions inherited from tbb::internal::no_copy
| no_copy (const no_copy &)=delete
| no_copy ()=default

## Public Attributes

node * | my_node
node_allocator_type & | my_alloc

## Detailed Description

### template<typename Key, typename T, typename HashCompare, typename Allocator>
struct tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard

Definition at line 629 of file concurrent_hash_map.h.

## Constructor & Destructor Documentation

## node_scoped_guard()

template<typename Key, typename T, typename HashCompare, typename Allocator>

tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::node_scoped_guard | ( | node * | n,
|  | node_allocator_type & | alloc
| ) |  |

inline

Definition at line 633 of file concurrent_hash_map.h.

: my_node(n), my_alloc(alloc) {}

## ~node_scoped_guard()

template<typename Key, typename T, typename HashCompare, typename Allocator>

tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::~node_scoped_guard | ( |  | ) |

inline

Definition at line 634 of file concurrent_hash_map.h.

{
if(my_node) {
node_allocator_traits::destroy(my_alloc, my_node);
node_allocator_traits::deallocate(my_alloc, my_node, 1);
}
}

References tbb::internal::allocator_traits< Alloc >::deallocate(), tbb::internal::allocator_traits< Alloc >::destroy(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::my_alloc, and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::my_node.

Here is the call graph for this function:

## Member Function Documentation

## dismiss()

template<typename Key, typename T, typename HashCompare, typename Allocator>

void tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::dismiss | ( |  | ) |

inline

Definition at line 640 of file concurrent_hash_map.h.

{ my_node = NULL; }

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::my_node.

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::create_node().

Here is the caller graph for this function:

## Member Data Documentation

## my_alloc

template<typename Key, typename T, typename HashCompare, typename Allocator>

node_allocator_type& tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::my_alloc

Definition at line 631 of file concurrent_hash_map.h.

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::~node_scoped_guard().

## my_node

template<typename Key, typename T, typename HashCompare, typename Allocator>

node* tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::my_node

Definition at line 630 of file concurrent_hash_map.h.

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::dismiss(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::~node_scoped_guard().

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

- concurrent_hash_map.h

tbb::internal::allocator_traits::destroy
static void destroy(Alloc &, T *p)
Definition: _allocator_traits.h:133
tbb::internal::allocator_traits::deallocate
static void deallocate(Alloc &a, pointer p, size_type n)
Definition: _allocator_traits.h:106
tbb::interface5::concurrent_hash_map::node_scoped_guard::my_node
node * my_node
Definition: concurrent_hash_map.h:630
tbb::interface5::concurrent_hash_map::node_scoped_guard::my_alloc
node_allocator_type & my_alloc
Definition: concurrent_hash_map.h:631

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.