template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
class alib::containers::LRUCacheTable< TAllocator, TValueDescriptor, THash, TEqual >::TForwardIterator< TConstOrMutable >
Templated implementation of std::iterator_traits
. Will be exposed by outer class's definitions Iterator and ConstIterator.
As the name of the class indicates, this iterator satisfies the C++ standard library concept ForwardIterator
.
- Template Parameters
-
TConstOrMutable | A constant or mutable version of StoredType. |
Definition at line 205 of file lrucachetable.inl.
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
alib::containers::LRUCacheTable< TAllocator, TValueDescriptor, THash, TEqual >::TForwardIterator< TConstOrMutable >::TForwardIterator |
( |
const TMutable & | mutableIt | ) |
|
|
inline |
Copy constructor accepting a mutable iterator. Available only for the constant version of this iterator.
- Template Parameters
-
TMutable | The type of this constructor's argument. |
- Parameters
-
mutableIt | Mutable iterator to copy from. |
Definition at line 242 of file lrucachetable.inl.
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
Constructor that explicitly sets a valid iterator.
- Parameters
-
pEntry | Pointer to a valid element. |
pTable | The cache table we belong to. |
pListIdx | The index of the list that pEntry belongs to. |
Definition at line 250 of file lrucachetable.inl.
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
template<typename... TArgs>
Helper method that performs a placement-new on the data this iterator refers to. This method can be used if method Try indicates a cache miss.
- Template Parameters
-
TArgs | Types of variadic parameters given with parameter args. |
- Parameters
-
args | Variadic parameters to be forwarded to the constructor of the inserted instance of type StoredType. |
- Returns
- A reference to the just constructed object.
Definition at line 347 of file lrucachetable.inl.
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
Retrieves the key-portion of the stored object that this iterator references.
- Returns
- A reference to the key-portion of the stored object.
Definition at line 363 of file lrucachetable.inl.
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
Retrieves the stored object that this iterator references.
This method is an alias to operator*
- Returns
- A reference to the mapped-portion of the stored object.
Definition at line 372 of file lrucachetable.inl.
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
Retrieves the stored object that this iterator references.
- Returns
- A reference to the stored object.
Definition at line 326 of file lrucachetable.inl.
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
Postfix increment operator.
- Returns
- An iterator value that is not increased, yet.
Definition at line 298 of file lrucachetable.inl.
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
Retrieves a pointer to the stored object that this iterator references.
- Returns
- A pointer to the stored object.
Definition at line 334 of file lrucachetable.inl.
template<typename TAllocator, typename TValueDescriptor, typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable>
Retrieves the stored object that this iterator references.
- Returns
- A reference to the stored object.
Definition at line 355 of file lrucachetable.inl.