|
Go to the source code of this file.
Classes | |
class | ArResolver |
Interface for the asset resolution system. More... | |
Functions | |
AR_API ArResolver & | ArGetResolver () |
Returns the configured asset resolver. | |
AR_API void | ArSetPreferredResolver (const std::string &resolverTypeName) |
Set the preferred ArResolver subclass used by ArGetResolver. | |
Advanced API | |
| |
AR_API ArResolver & | ArGetUnderlyingResolver () |
Returns the underlying ArResolver instance used by ArGetResolver. | |
AR_API std::vector< TfType > | ArGetAvailableResolvers () |
Returns list of TfTypes for available ArResolver subclasses. | |
AR_API const std::vector< std::string > & | ArGetRegisteredURISchemes () |
Returns list of all URI schemes for which a resolver has been registered. | |
AR_API std::unique_ptr< ArResolver > | ArCreateResolver (const TfType &resolverType) |
Construct an instance of the ArResolver subclass specified by resolverType . | |
AR_API std::unique_ptr< ArResolver > ArCreateResolver | ( | const TfType & | resolverType | ) |
Construct an instance of the ArResolver subclass specified by resolverType
.
This function will load the plugin for the given resolverType
and construct and return a new instance of the specified ArResolver subclass. If an error occurs, coding errors will be emitted and this function will return an ArDefaultResolver instance.
Note that this function does not change the resolver used by ArGetResolver to an instance of resolverType
.
This function is not safe to call concurrently with itself or ArGetAvailableResolvers.
AR_API std::vector< TfType > ArGetAvailableResolvers | ( | ) |
Returns list of TfTypes for available ArResolver subclasses.
This function returns the list of ArResolver subclasses used to determine the resolver implementation returned by ArGetResolver. See documentation on that function for more details.
If this function is called from within a call (or calls) to ArCreateResolver, the ArResolver subclass(es) being created will be removed from the returned list.
This function is not safe to call concurrently with itself or ArCreateResolver.
AR_API const std::vector< std::string > & ArGetRegisteredURISchemes | ( | ) |
Returns list of all URI schemes for which a resolver has been registered.
Schemes are returned in all lower-case and in alphabetically sorted order.
AR_API ArResolver & ArGetResolver | ( | ) |
Returns the configured asset resolver.
When first called, this function will determine the ArResolver subclass to use for asset resolution via the following process:
The constructed ArResolver subclass will be cached and used to service function calls made on the returned resolver.
Note that this function may not return the constructed subclass itself, meaning that dynamic casts to the subclass type may fail. See ArGetUnderlyingResolver if access to this object is needed.
AR_API ArResolver & ArGetUnderlyingResolver | ( | ) |
Returns the underlying ArResolver instance used by ArGetResolver.
This function returns the instance of the ArResolver subclass used by ArGetResolver and can be dynamic_cast to that type.
AR_API void ArSetPreferredResolver | ( | const std::string & | resolverTypeName | ) |
Set the preferred ArResolver subclass used by ArGetResolver.
Consumers may override ArGetResolver's plugin resolver discovery and force the use of a specific resolver subclass by calling this function with the typename of the implementation to use.
If the subclass specified by resolverTypeName
cannot be found, ArGetResolver will issue a warning and fall back to using ArDefaultResolver.
This must be called before the first call to ArGetResolver.