Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor Class Reference

Combines data access, locking, and garbage collection. More...

#include <concurrent_hash_map.h>

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

Public Types

typedef const concurrent_hash_map::value_type value_type
 Type of value. More...
 

Public Member Functions

bool empty () const
 True if result is empty. More...
 
void release ()
 Set to null. More...
 
const_reference operator * () const
 Return reference to associated value in hash table. More...
 
const_pointer operator-> () const
 Return pointer to associated value in hash table. More...
 
 const_accessor ()
 Create empty result. More...
 
 ~const_accessor ()
 Destroy result after releasing the underlying reference. More...
 

Protected Member Functions

bool is_writer ()
 

Protected Attributes

nodemy_node
 
hashcode_t my_hash
 

Friends

class concurrent_hash_map< Key, T, HashCompare, Allocator >
 
class accessor
 

Detailed Description

template<typename Key, typename T, typename HashCompare, typename Allocator>
class tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor

Combines data access, locking, and garbage collection.

Definition at line 769 of file concurrent_hash_map.h.

Member Typedef Documentation

◆ value_type

template<typename Key, typename T, typename HashCompare, typename Allocator>
typedef const concurrent_hash_map::value_type tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::value_type

Type of value.

Definition at line 774 of file concurrent_hash_map.h.

Constructor & Destructor Documentation

◆ const_accessor()

template<typename Key, typename T, typename HashCompare, typename Allocator>
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::const_accessor ( )
inline

Create empty result.

Definition at line 799 of file concurrent_hash_map.h.

◆ ~const_accessor()

template<typename Key, typename T, typename HashCompare, typename Allocator>
tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::~const_accessor ( )
inline

Destroy result after releasing the underlying reference.

Definition at line 802 of file concurrent_hash_map.h.

802  {
803  my_node = NULL; // scoped lock's release() is called in its destructor
804  }

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

Member Function Documentation

◆ empty()

template<typename Key, typename T, typename HashCompare, typename Allocator>
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::empty ( ) const
inline

◆ is_writer()

template<typename Key, typename T, typename HashCompare, typename Allocator>
bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::is_writer ( )
inlineprotected

Definition at line 806 of file concurrent_hash_map.h.

806 { return node::scoped_t::is_writer; }

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

Here is the caller graph for this function:

◆ operator *()

template<typename Key, typename T, typename HashCompare, typename Allocator>
const_reference tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::operator * ( ) const
inline

Return reference to associated value in hash table.

Definition at line 788 of file concurrent_hash_map.h.

788  {
789  __TBB_ASSERT( my_node, "attempt to dereference empty accessor" );
790  return my_node->value();
791  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

References __TBB_ASSERT, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::my_node, and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::value().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator->()

template<typename Key, typename T, typename HashCompare, typename Allocator>
const_pointer tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::operator-> ( ) const
inline

Return pointer to associated value in hash table.

Definition at line 794 of file concurrent_hash_map.h.

794  {
795  return &operator*();
796  }
const_reference operator *() const
Return reference to associated value in hash table.

References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::operator *().

Here is the call graph for this function:

◆ release()

template<typename Key, typename T, typename HashCompare, typename Allocator>
void tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release ( )
inline

Friends And Related Function Documentation

◆ accessor

template<typename Key, typename T, typename HashCompare, typename Allocator>
friend class accessor
friend

Definition at line 771 of file concurrent_hash_map.h.

◆ concurrent_hash_map< Key, T, HashCompare, Allocator >

template<typename Key, typename T, typename HashCompare, typename Allocator>
friend class concurrent_hash_map< Key, T, HashCompare, Allocator >
friend

Definition at line 770 of file concurrent_hash_map.h.

Member Data Documentation

◆ my_hash

template<typename Key, typename T, typename HashCompare, typename Allocator>
hashcode_t tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::my_hash
protected

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