FastLED 3.9.15
Loading...
Searching...
No Matches
fl::HashMapLru< Key, T, Hash, KeyEqual, INLINED_COUNT > Class Template Reference

Detailed Description

template<typename Key, typename T, typename Hash = Hash<Key>, typename KeyEqual = EqualTo<Key>, int INLINED_COUNT = FASTLED_HASHMAP_INLINED_COUNT>
class fl::HashMapLru< Key, T, Hash, KeyEqual, INLINED_COUNT >

Definition at line 17 of file hash_map_lru.h.

#include <hash_map_lru.h>

+ Inheritance diagram for fl::HashMapLru< Key, T, Hash, KeyEqual, INLINED_COUNT >:
+ Collaboration diagram for fl::HashMapLru< Key, T, Hash, KeyEqual, INLINED_COUNT >:

Classes

struct  ValueWithTimestamp
 

Public Member Functions

 HashMapLru (size_t max_size)
 
size_t capacity () const
 
void clear ()
 
bool empty () const
 
T * find_value (const Key &key)
 
const T * find_value (const Key &key) const
 
void insert (const Key &key, const T &value)
 
T & operator[] (const Key &key)
 
bool remove (const Key &key)
 
void setMaxSize (size_t max_size)
 
size_t size () const
 
void swap (HashMapLru &other)
 

Private Member Functions

void evictOldest ()
 

Private Attributes

uint32_t mCurrentTime
 
HashMap< Key, ValueWithTimestamp, Hash, KeyEqual, INLINED_COUNT > mMap
 
size_t mMaxSize
 

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