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 25 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)
 
size_t size () const
 
bool empty () const
 
size_t capacity () const
 
void set_capacity (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 27 of file container.hpp.

Member Function Documentation

◆ capacity()

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

Definition at line 74 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 84 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 63 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 32 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 73 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 87 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 68 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 49 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 44 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 46 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 ( size_t new_capacity)
inline

Definition at line 76 of file container.hpp.

◆ size()

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

Definition at line 72 of file container.hpp.


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