Utility class for custom resolver implementations.
More...
#include <threadLocalScopedCache.h>
|
| using | CachePtr = std::shared_ptr<CachedType> |
| |
template<class CachedType>
class ArThreadLocalScopedCache< CachedType >
Utility class for custom resolver implementations.
This class wraps up a common pattern for implementing thread-local scoped caches for ArResolver::BeginCacheScope and ArResolver::EndCacheScope.
ResolveCache _cache;
if (ResolveCache::CachePtr cache = _cache.GetCurrentCache()) {
}
}
};
Interface for the asset resolution system.
AR_API ArResolvedPath Resolve(const std::string &assetPath) const
Returns the resolved path for the asset identified by the given assetPath if it exists.
AR_API void EndCacheScope(VtValue *cacheScopeData)
Mark the end of a resolution caching scope.
AR_API void BeginCacheScope(VtValue *cacheScopeData)
Mark the start of a resolution caching scope.
Utility class for custom resolver implementations.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
- See also
- Scoped Resolution Cache
Definition at line 49 of file threadLocalScopedCache.h.
◆ CachePtr
template<class CachedType >
| using CachePtr = std::shared_ptr<CachedType> |
◆ BeginCacheScope()
template<class CachedType >
| void BeginCacheScope |
( |
VtValue * | cacheScopeData | ) |
|
|
inline |
◆ EndCacheScope()
template<class CachedType >
| void EndCacheScope |
( |
VtValue * | cacheScopeData | ) |
|
|
inline |
◆ GetCurrentCache()
template<class CachedType >
| CachePtr GetCurrentCache |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: