libquentier 0.5.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
quentier::LRUCache< Key, Value, Allocator > Class Template Reference

Public Types

using key_type = Key
using mapped_type = Value
using allocator_type = Allocator
using value_type = std::pair<key_type, mapped_type>
using container_type = std::list<value_type, allocator_type>
using size_type = typename container_type::size_type
using difference_type = typename container_type::difference_type
using iterator = typename container_type::iterator
using const_iterator = typename container_type::const_iterator
using reverse_iterator = std::reverse_iterator<iterator>
using const_reverse_iterator = std::reverse_iterator<const_iterator>
using reference = value_type &
using const_reference = const value_type &
using pointer = typename std::allocator_traits<allocator_type>::pointer
using const_pointer

Public Member Functions

 LRUCache (const size_t maxSize=100)
iterator begin ()
const_iterator begin () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
iterator end ()
const_iterator end () const
reverse_iterator rend ()
const_reverse_iterator rend () const
bool empty () const
size_t size () const
size_t max_size () const
void clear ()
void put (const key_type &key, const mapped_type &value)
const mapped_type * get (const key_type &key) const
bool exists (const key_type &key)
bool remove (const key_type &key)
void setMaxSize (const size_t maxSize)

Member Typedef Documentation

◆ const_pointer

template<class Key, class Value, class Allocator = std::allocator<std::pair<Key, Value>>>
using quentier::LRUCache< Key, Value, Allocator >::const_pointer
Initial value:
typename std::allocator_traits<allocator_type>::const_pointer