OpenMW
|
#include <weakcache.hpp>
Classes | |
class | iterator |
Public Types | |
using | WeakPtr = std::weak_ptr< T > |
using | StrongPtr = std::shared_ptr< T > |
using | Map = std::unordered_map< Key, WeakPtr > |
Public Member Functions | |
void | insert (Key key, StrongPtr value, bool prune=true) |
Stores a weak pointer to the item. More... | |
StrongPtr | get (Key key) |
iterator | begin () |
iterator | end () |
void | prune () |
Removes known invalid entries. More... | |
Private Attributes | |
Map | mData |
std::vector< Key > | mDirty |
Provides a container to weakly store pointers to shared data.
using Misc::WeakCache< Key, T >::Map = std::unordered_map<Key, WeakPtr> |
using Misc::WeakCache< Key, T >::StrongPtr = std::shared_ptr<T> |
using Misc::WeakCache< Key, T >::WeakPtr = std::weak_ptr<T> |
WeakCache< Key, T >::iterator Misc::WeakCache< Key, T >::begin | ( | ) |
WeakCache< Key, T >::iterator Misc::WeakCache< Key, T >::end | ( | ) |
WeakCache< Key, T >::StrongPtr Misc::WeakCache< Key, T >::get | ( | Key | key | ) |
Retrieves the item associated with the key.
void Misc::WeakCache< Key, T >::insert | ( | Key | key, |
StrongPtr | value, | ||
bool | prune = true |
||
) |
Stores a weak pointer to the item.
void Misc::WeakCache< Key, T >::prune | ( | ) |
Removes known invalid entries.
|
private |
|
private |