libboxes
boxes is a set of specialised containers built on top of STL
Public Member Functions | List of all members
boxes::cache::policy::NoEviction< K, V > Class Template Reference

Eviction policy that never evicts elements. More...

#include <cache.hpp>

Public Member Functions

const K * elect ()
 Never elects an element for eviction. More...
 
void clear ()
 Clears the eviction policy. More...
 
K & front ()
 Returns the reference to the first element in the cache. More...
 
K & back ()
 Returns the reference to the last element in the cache. More...
 
Iterator begin ()
 Returns an iterator to the first element in the cache. More...
 
Iterator end ()
 Returns an iterator to the element following the last element in the cache. More...
 

Detailed Description

template<typename K, typename V>
class boxes::cache::policy::NoEviction< K, V >

Eviction policy that never evicts elements.

The order of elements in the cache is defined by insertion order.

Definition at line 131 of file cache.hpp.

Member Function Documentation

◆ back()

template<typename K , typename V >
K & boxes::cache::policy::NoEviction< K, V >::back ( )
inline

Returns the reference to the last element in the cache.

The order of elements in the cache is defined by insertion order. The last element is the last element inserted into the cache.

Returns
reference to the last element in the cache

Definition at line 179 of file cache.hpp.

◆ begin()

template<typename K , typename V >
Iterator boxes::cache::policy::NoEviction< K, V >::begin ( )
inline

Returns an iterator to the first element in the cache.

Returns
iterator to the first element in the cache

Definition at line 186 of file cache.hpp.

◆ clear()

template<typename K , typename V >
void boxes::cache::policy::NoEviction< K, V >::clear ( )
inline

Clears the eviction policy.

Definition at line 151 of file cache.hpp.

◆ elect()

template<typename K , typename V >
const K * boxes::cache::policy::NoEviction< K, V >::elect ( )
inline

Never elects an element for eviction.

Returns
nullptr

Definition at line 146 of file cache.hpp.

◆ end()

template<typename K , typename V >
Iterator boxes::cache::policy::NoEviction< K, V >::end ( )
inline

Returns an iterator to the element following the last element in the cache.

Returns
iterator to the element following the last element in the cache

Definition at line 194 of file cache.hpp.

◆ front()

template<typename K , typename V >
K & boxes::cache::policy::NoEviction< K, V >::front ( )
inline

Returns the reference to the first element in the cache.

The order of elements in the cache is defined by insertion order. The first element is the first element inserted into the cache.

Returns
reference to the first element in the cache

Definition at line 169 of file cache.hpp.


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