Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Grindstone::Containers::ResourceCache< Key, Value, Hash > Class Template Reference

Classes

class  Ref

Public Types

using Factory = std::function<Value(const Key&)>
using Deleter = std::function<void(Value)>

Public Member Functions

Ref GetOrCreate (const Key &key)
void Trim (Grindstone::DeferredDeletionQueue *deferredDeletionQueue)
void TrimImmediately ()
void SetFactory (Factory factory)
void SetDeleter (Deleter deleter)

Protected Attributes

Factory constructCallback
Deleter destroyCallback
std::mutex mutex
std::unordered_map< Key, Entry, Hash > cache

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