tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object Class Reference
Collaboration diagram for tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object:

## Public Member Functions

| handle_object ()
| handle_object (concurrent_lru_cache &cache_ref, typename map_storage_type::reference value_ref)
| operator bool () const
| handle_object (handle_object &&src)
handle_object & | operator= (handle_object &&src)
value_type & | value ()
| ~handle_object ()

## Private Member Functions

void | operator= (handle_object &)
| handle_object (handle_object &)

## Private Attributes

concurrent_lru_cache * | my_cache_pointer
map_storage_type::pointer | my_map_record_ptr

## Friends

handle_object && | move (handle_object &h)

## Detailed Description

### template<typename key_type, typename value_type, typename value_functor_type = value_type (*)(key_type)>
class tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object

Definition at line 113 of file concurrent_lru_cache.h.

## Constructor & Destructor Documentation

## handle_object() [1/4]

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::handle_object | ( |  | ) |

inline

Definition at line 117 of file concurrent_lru_cache.h.

: my_cache_pointer(), my_map_record_ptr() {}

## handle_object() [2/4]

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::handle_object | ( | concurrent_lru_cache & | cache_ref,
|  | typename map_storage_type::reference | value_ref
| ) |  |

inline

Definition at line 118 of file concurrent_lru_cache.h.

: my_cache_pointer(&cache_ref), my_map_record_ptr(&value_ref) {}

## handle_object() [3/4]

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::handle_object | ( | handle_object && | src | ) |

inline

Definition at line 124 of file concurrent_lru_cache.h.

: my_cache_pointer(src.my_cache_pointer), my_map_record_ptr(src.my_map_record_ptr) {
__TBB_ASSERT((src.my_cache_pointer && src.my_map_record_ptr) || (!src.my_cache_pointer && !src.my_map_record_ptr), "invalid state of moving object?");
src.my_cache_pointer = NULL;
src.my_map_record_ptr = NULL;
}

References __TBB_ASSERT.

## ~handle_object()

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::~handle_object | ( |  | ) |

inline

Definition at line 159 of file concurrent_lru_cache.h.

{
if (my_cache_pointer){
my_cache_pointer->signal_end_of_usage(*my_map_record_ptr);
}
}

References tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_cache_pointer, tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_map_record_ptr, and tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::signal_end_of_usage().

Here is the call graph for this function:

## handle_object() [4/4]

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::handle_object | ( | handle_object & |  | ) |

private

## Member Function Documentation

## operator bool()

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::operator bool | ( |  | ) | const

inline

Definition at line 119 of file concurrent_lru_cache.h.

{
return (my_cache_pointer && my_map_record_ptr);
}

References tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_cache_pointer, and tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_map_record_ptr.

## operator=() [1/2]

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

handle_object& tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::operator= | ( | handle_object && | src | ) |

inline

Definition at line 129 of file concurrent_lru_cache.h.

{
__TBB_ASSERT((src.my_cache_pointer && src.my_map_record_ptr) || (!src.my_cache_pointer && !src.my_map_record_ptr), "invalid state of moving object?");
if (my_cache_pointer) {
my_cache_pointer->signal_end_of_usage(*my_map_record_ptr);
}
my_cache_pointer = src.my_cache_pointer;
my_map_record_ptr = src.my_map_record_ptr;
src.my_cache_pointer = NULL;
src.my_map_record_ptr = NULL;
return *this;
}

References __TBB_ASSERT, tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_cache_pointer, tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_map_record_ptr, and tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::signal_end_of_usage().

Here is the call graph for this function:

## operator=() [2/2]

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

void tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::operator= | ( | handle_object & |  | ) |

private

## value()

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

value_type& tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::value | ( |  | ) |

inline

Definition at line 154 of file concurrent_lru_cache.h.

{
__TBB_ASSERT(my_cache_pointer,"get value from already moved object?");
__TBB_ASSERT(my_map_record_ptr,"get value from an invalid or already moved object?");
return my_map_record_ptr->second.my_value;
}

References __TBB_ASSERT, tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_cache_pointer, and tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_map_record_ptr.

## Friends And Related Function Documentation

## move

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

handle_object&& move | ( | handle_object & | h | ) |

friend

Definition at line 167 of file concurrent_lru_cache.h.

{
return std::move(h);
}

## Member Data Documentation

## my_cache_pointer

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

concurrent_lru_cache* tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_cache_pointer

private

Definition at line 114 of file concurrent_lru_cache.h.

Referenced by tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::operator bool(), tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::operator=(), tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::value(), and tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::~handle_object().

## my_map_record_ptr

template<typename key_type , typename value_type , typename value_functor_type = value_type (*)(key_type)>

map_storage_type::pointer tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::my_map_record_ptr

private

Definition at line 115 of file concurrent_lru_cache.h.

Referenced by tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::operator bool(), tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::operator=(), tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::value(), and tbb::interface6::concurrent_lru_cache< key_type, value_type, value_functor_type >::handle_object::~handle_object().

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

- concurrent_lru_cache.h

tbb::interface6::concurrent_lru_cache::signal_end_of_usage
void signal_end_of_usage(typename map_storage_type::reference value_ref)
Definition: concurrent_lru_cache.h:100
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::move
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319
tbb::interface6::concurrent_lru_cache::handle_object::my_cache_pointer
concurrent_lru_cache * my_cache_pointer
Definition: concurrent_lru_cache.h:114
tbb::interface6::concurrent_lru_cache::handle_object::my_map_record_ptr
map_storage_type::pointer my_map_record_ptr
Definition: concurrent_lru_cache.h:115
h
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function h
Definition: ittnotify_static.h:159

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.