PLaSK library
Loading...
Searching...
No Matches
plask::CacheRemoveOnlyWhenDeleted< Key, ValuePtr > Struct Template Reference

Strategy of removing from cache which removes key only when it is deleted. More...

#include <plask/utils/cache.hpp>

Inheritance diagram for plask::CacheRemoveOnlyWhenDeleted< Key, ValuePtr >:
[legend]
Collaboration diagram for plask::CacheRemoveOnlyWhenDeleted< Key, ValuePtr >:
[legend]

Public Member Functions

void onEvent (typename Key::Event &evt)
 If evt is delete event, remove source of event from cache map.
 

Additional Inherited Members

- Public Attributes inherited from plask::CacheRemoveStrategyBase< Key, ValuePtr >
std::map< Key *, ValuePtrmap
 Cached objects.
 

Detailed Description

template<typename Key, typename ValuePtr>
struct plask::CacheRemoveOnlyWhenDeleted< Key, ValuePtr >

Strategy of removing from cache which removes key only when it is deleted.

Used by WeakCache and StrongCache.

Definition at line 49 of file cache.hpp.

Member Function Documentation

◆ onEvent()

template<typename Key , typename ValuePtr >
void plask::CacheRemoveOnlyWhenDeleted< Key, ValuePtr >::onEvent ( typename Key::Event &  evt)
inline

If evt is delete event, remove source of event from cache map.

Definition at line 52 of file cache.hpp.


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