userver: multi_index_lru::Container< Value, IndexSpecifierList, Allocator > Class Template Reference
Loading...
Searching...
No Matches
multi_index_lru::Container< Value, IndexSpecifierList, Allocator > Class Template Reference

#include </data/code/userver/libraries/multi-index-lru/include/userver/multi-index-lru/container.hpp>

Detailed Description

template<typename Value, typename IndexSpecifierList, typename Allocator = std::allocator<Value>>
class multi_index_lru::Container< Value, IndexSpecifierList, Allocator >

MultiIndex LRU container.

Definition at line 65 of file container.hpp.

Public Member Functions

 Container (size_t max_size)
 
template<typename... Args>
bool emplace (Args &&... args)
 
bool insert (const Value &value)
 
bool insert (Value &&value)
 
template<typename Tag , typename Key >
auto find (const Key &key)
 
template<typename Tag , typename Key >
bool contains (const Key &key)
 
template<typename Tag , typename Key >
bool erase (const Key &key)
 
std::size_t size () const
 
bool empty () const
 
std::size_t capacity () const
 
void set_capacity (std::size_t new_capacity)
 
void clear ()
 
template<typename Tag >
auto end ()
 

Constructor & Destructor Documentation

◆ Container()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::Container ( size_t  max_size)
inlineexplicit

Definition at line 67 of file container.hpp.

Member Function Documentation

◆ capacity()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
std::size_t multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::capacity ( ) const
inline

Definition at line 114 of file container.hpp.

◆ clear()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
void multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::clear ( )
inline

Definition at line 124 of file container.hpp.

◆ contains()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
template<typename Tag , typename Key >
bool multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::contains ( const Key &  key)
inline

Definition at line 103 of file container.hpp.

◆ emplace()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
template<typename... Args>
bool multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::emplace ( Args &&...  args)
inline

Definition at line 72 of file container.hpp.

◆ empty()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
bool multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::empty ( ) const
inline

Definition at line 113 of file container.hpp.

◆ end()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
template<typename Tag >
auto multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::end ( )
inline

Definition at line 127 of file container.hpp.

◆ erase()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
template<typename Tag , typename Key >
bool multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::erase ( const Key &  key)
inline

Definition at line 108 of file container.hpp.

◆ find()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
template<typename Tag , typename Key >
auto multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::find ( const Key &  key)
inline

Definition at line 89 of file container.hpp.

◆ insert() [1/2]

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
bool multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::insert ( const Value &  value)
inline

Definition at line 84 of file container.hpp.

◆ insert() [2/2]

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
bool multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::insert ( Value &&  value)
inline

Definition at line 86 of file container.hpp.

◆ set_capacity()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
void multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::set_capacity ( std::size_t  new_capacity)
inline

Definition at line 116 of file container.hpp.

◆ size()

template<typename Value , typename IndexSpecifierList , typename Allocator = std::allocator<Value>>
std::size_t multi_index_lru::Container< Value, IndexSpecifierList, Allocator >::size ( ) const
inline

Definition at line 112 of file container.hpp.


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