|
RavEngine
|
#include <Manager.hpp>
Static Public Member Functions | |
| template<typename ... A> | |
| static Ref< T > | Get (const key_t &str, A ... extras) |
| template<typename ... A> | |
| static Ref< T > | GetWithKey (const key_t &str, unique_key_t unique_key, A ... extras) |
| static void | Compact () |
| static void | Clear () |
Static Protected Attributes | |
| static UnorderedMap< std::tuple< key_t, unique_key_t >, WeakRef< T > > | items |
| static SpinLock | mtx |
Additional Inherited Members | |
Public Types inherited from RavEngine::CacheBase | |
| using | unique_key_t = uint32_t |
Defines a generic non-owning cache. If the key type is not a parameter in the construction of your object, set the final template parameter to false
|
inlinestatic |
Remove all items from the cache
|
inlinestatic |
Reduce the size of the cache by removing expired pointers
|
inlinestatic |
Load object from cache. If the object is not cached in memory, it will be loaded from disk.
| str | the name of the mesh |
| extras | additional arguments to pass to meshasset constructor |
extras. If you need to load a new asset, use GetWithKey where you can pass a unique key identifer. The unique key defaults to zero if accessed via this method.
|
inlinestatic |
Load object from cache. If the object is not cached in memory, it will be loaded from disk.
| str | the name of the mesh |
| unique_key | a differentiator to force a new load and identify it later |
| extras | additional arguments to pass to meshasset constructor |
extras. If you need to load a new asset, use a different unique key identifier.