Loading...
Searching...
No Matches
packageResolver.h
Go to the documentation of this file.
1//
2// Copyright 2018 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_AR_PACKAGE_RESOLVER_H
8#define PXR_USD_AR_PACKAGE_RESOLVER_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/ar/api.h"
14
15#include <memory>
16#include <string>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
20class ArAsset;
21class VtValue;
22
79{
80public:
81 ArPackageResolver(const ArPackageResolver&) = delete;
82 ArPackageResolver& operator=(const ArPackageResolver&) = delete;
83
84 AR_API
85 virtual ~ArPackageResolver();
86
87 // --------------------------------------------------------------------- //
91 // --------------------------------------------------------------------- //
92
107 AR_API
108 virtual std::string Resolve(
109 const std::string& resolvedPackagePath,
110 const std::string& packagedPath) = 0;
111
113
114 // --------------------------------------------------------------------- //
118 // --------------------------------------------------------------------- //
119
125 AR_API
126 virtual std::shared_ptr<ArAsset> OpenAsset(
127 const std::string& resolvedPackagePath,
128 const std::string& resolvedPackagedPath) = 0;
129
130 // --------------------------------------------------------------------- //
138 // --------------------------------------------------------------------- //
139
143 AR_API
144 virtual void BeginCacheScope(
145 VtValue* cacheScopeData) = 0;
146
150 AR_API
151 virtual void EndCacheScope(
152 VtValue* cacheScopeData) = 0;
153
154protected:
155 AR_API
157};
158
159PXR_NAMESPACE_CLOSE_SCOPE
160
161#endif // PXR_USD_AR_PACKAGE_RESOLVER_H
Interface for accessing the contents of an asset.
Definition: asset.h:27
Interface for resolving assets within package assets.
virtual AR_API std::shared_ptr< ArAsset > OpenAsset(const std::string &resolvedPackagePath, const std::string &resolvedPackagedPath)=0
Returns an ArAsset object for the asset at resolvedPackagedPath located in the package asset at resol...
virtual AR_API void BeginCacheScope(VtValue *cacheScopeData)=0
Mark the start of a resolution caching scope.
virtual AR_API void EndCacheScope(VtValue *cacheScopeData)=0
Mark the end of a resolution caching scope.
virtual AR_API std::string Resolve(const std::string &resolvedPackagePath, const std::string &packagedPath)=0
Returns the resolved path for the asset located at packagedPath in the package specified by resolvedP...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:152