HDK
|
#include <packageResolver.h>
Public Member Functions | |
ArPackageResolver (const ArPackageResolver &)=delete | |
ArPackageResolver & | operator= (const ArPackageResolver &)=delete |
virtual AR_API | ~ArPackageResolver () |
Packaged Path Resolution Operations | |
virtual AR_API std::string | Resolve (const std::string &resolvedPackagePath, const std::string &packagedPath)=0 |
Asset-specific Operations | |
virtual AR_API std::shared_ptr < ArAsset > | OpenAsset (const std::string &resolvedPackagePath, const std::string &resolvedPackagedPath)=0 |
Scoped Resolution Cache | |
These functions are called when scoped resolution caches are enabled via ArResolver.
| |
virtual AR_API void | BeginCacheScope (VtValue *cacheScopeData)=0 |
virtual AR_API void | EndCacheScope (VtValue *cacheScopeData)=0 |
AR_API | ArPackageResolver () |
Interface for resolving assets within package assets. A package resolver is responsible for processing particular package asset formats and resolving information about assets stored within that package.
Each package resolver is associated with particular file formats and is invoked by asset resolution when handling package-relative paths involving those formats. ArPackageResolver instances are only used internally by Ar and are not directly exposed to clients.
To implement a package resolver, users must create a plugin containing a subclass of ArPackageResolver and register it with the plugin system so that it can be discovered and instantiated at runtime.
Definition at line 95 of file packageResolver.h.
|
delete |
|
virtual |
|
protected |
Mark the start of a resolution caching scope.
Mark the start of a resolution caching scope.
Mark the end of a resolution caching scope.
|
pure virtual |
Returns an ArAsset object for the asset at resolvedPackagedPath
located in the package asset at resolvedPackagePath
. Returns an invalid std::shared_ptr if object could not be created.
|
delete |
|
pure virtual |
Returns the resolved path for the asset located at packagedPath
in the package specified by resolvedPackagePath
if it exists. If the asset does not exist in the package, returns an empty string.
When ArResolver::Resolve is invoked on a package-relative path, the path will be parsed into the outermost package path, and the inner packaged path. The outermost package path will be resolved by the primary resolver. ArPackageResolver::Resolve will then be called on the corresponding package resolver with that resolved path and the inner packaged path. If the inner packaged path is itself a package-relative path, this process recurses until all paths have been resolved.