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 216 of file lrucachetable.hpp.
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 >
template<typename TAllocator , typename TValueDescriptor , typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable >
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. |
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 264 of file lrucachetable.hpp.
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>
TConstOrMutable & Construct |
( |
TArgs &&... | args | ) |
const |
|
inline |
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 365 of file lrucachetable.hpp.
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 381 of file lrucachetable.hpp.
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 390 of file lrucachetable.hpp.
template<typename TAllocator , typename TValueDescriptor , typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable >
Comparison operator.
- Parameters
-
other | The iterator to compare ourselves to. |
- Returns
true
if this and given iterator are not equal, false
otherwise.
Definition at line 335 of file lrucachetable.hpp.
template<typename TAllocator , typename TValueDescriptor , typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable >
TConstOrMutable & operator* |
( |
| ) |
const |
|
inline |
Retrieves the stored object that this iterator references.
- Returns
- A reference to the stored object.
Definition at line 344 of file lrucachetable.hpp.
template<typename TAllocator , typename TValueDescriptor , typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable >
Prefix increment operator.
- Returns
- A reference to this object.
Definition at line 302 of file lrucachetable.hpp.
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 316 of file lrucachetable.hpp.
template<typename TAllocator , typename TValueDescriptor , typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable >
TConstOrMutable * operator-> |
( |
| ) |
const |
|
inline |
Retrieves a pointer to the stored object that this iterator references.
- Returns
- A pointer to the stored object.
Definition at line 352 of file lrucachetable.hpp.
template<typename TAllocator , typename TValueDescriptor , typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable >
Comparison operator.
- Parameters
-
other | The iterator to compare ourselves to. |
- Returns
true
if this and the given iterator are pointing to the same entry, false
otherwise.
Definition at line 327 of file lrucachetable.hpp.
template<typename TAllocator , typename TValueDescriptor , typename THash = std::hash <typename TValueDescriptor::KeyType>, typename TEqual = std::equal_to<typename TValueDescriptor::KeyType>>
template<typename TConstOrMutable >
TConstOrMutable & Value |
( |
| ) |
const |
|
inline |
Retrieves the stored object that this iterator references.
- Returns
- A reference to the stored object.
Definition at line 373 of file lrucachetable.hpp.