7#ifndef PXR_USD_SDF_ASSET_PATH_H
8#define PXR_USD_SDF_ASSET_PATH_H
13#include "pxr/usd/sdf/api.h"
20PXR_NAMESPACE_OPEN_SCOPE
25template<
typename T>
class TfSpan;
44 authoredPath = authoredPath_;
49 evaluatedPath = evaluatedPath_;
54 resolvedPath = resolvedPath_;
61 std::string authoredPath;
62 std::string evaluatedPath;
63 std::string resolvedPath;
103 const std::string &resolvedPath);
120 return _authoredPath == rhs._authoredPath &&
121 _evaluatedPath == rhs._evaluatedPath &&
122 _resolvedPath == rhs._resolvedPath;
128 return !(*
this == rhs);
137 return !(rhs < *
this);
149 return !(*
this < rhs);
175 return _authoredPath;
180 return std::move(_authoredPath);
192 return _evaluatedPath;
197 return std::move(_evaluatedPath);
205 return _evaluatedPath.empty() ? _authoredPath : _evaluatedPath;
211 _evaluatedPath.empty() ? _authoredPath : _evaluatedPath);
221 return _resolvedPath;
226 return std::move(_resolvedPath);
237 _authoredPath = authoredPath;
243 _evaluatedPath = evaluatedPath;
248 _resolvedPath = resolvedPath;
255 lhs._authoredPath.swap(rhs._authoredPath);
256 lhs._evaluatedPath.swap(rhs._evaluatedPath);
257 lhs._resolvedPath.swap(rhs._resolvedPath);
261 std::string _authoredPath;
264 std::string _evaluatedPath;
266 std::string _resolvedPath;
288 std::vector<std::string> *errors);
297 std::vector<std::string> *errors);
299PXR_NAMESPACE_CLOSE_SCOPE
SDF_API void SdfResolveAssetPaths(const SdfLayerHandle &anchor, const VtDictionary &exprVars, TfSpan< SdfAssetPath > assetPaths, std::vector< std::string > *errors)
Anchors and resolves the given assetPaths with respect to the anchor layer.
SDF_API void SdfAnchorAssetPaths(const SdfLayerHandle &anchor, const VtDictionary &exprVars, TfSpan< SdfAssetPath > assetPaths, std::vector< std::string > *errors)
Anchors all paths in assetPaths to the anchor layer.
Contains an asset path and optional evaluated and resolved paths.
void SetAuthoredPath(const std::string &authoredPath)
Sets the authored path.
void SetEvaluatedPath(const std::string &evaluatedPath)
Sets the evaluated path.
std::string GetAuthoredPath() const &&
Overload for rvalues, move out the asset path.
SDF_API SdfAssetPath(const std::string &authoredPath, const std::string &resolvedPath)
Construct an asset path with authoredPath and an associated resolvedPath.
std::string GetResolvedPath() const &&
Overload for rvalues, move out the asset path.
bool operator<=(const SdfAssetPath &rhs) const
Less than or equal operator.
bool operator>=(const SdfAssetPath &rhs) const
Greater than or equal operator.
const std::string & GetEvaluatedPath() const &
Return the evaluated asset path, if any.
const std::string & GetResolvedPath() const &
Return the resolved asset path, if any.
SDF_API SdfAssetPath(const std::string &authoredPath)
Construct an asset path with authoredPath and no associated evaluated or resolved path.
std::string GetAssetPath() const &&
Overload for rvalues, move out the asset path.
SDF_API bool operator<(const SdfAssetPath &rhs) const
Ordering first by asset path, resolved path, then by evaluated path.
bool operator!=(const SdfAssetPath &rhs) const
Inequality operator.
const std::string & GetAssetPath() const &
Return the asset path.
SDF_API SdfAssetPath(const SdfAssetPathParams ¶ms)
Construct an asset path using a SdfAssetPathParams object.
void SetResolvedPath(const std::string &resolvedPath)
Sets the resolved path. This value is the result of asset resolution.
size_t GetHash() const
Hash function.
const std::string & GetAuthoredPath() const &
Returns the asset path as it was authored in the original layer.
bool operator==(const SdfAssetPath &rhs) const
Equality, including the evaluated and resolved paths.
std::string GetEvaluatedPath() const &&
Overload for rvalues, move out the evaluated path.
bool operator>(const SdfAssetPath &rhs) const
Greater than operator.
SDF_API SdfAssetPath()
Construct an empty asset path.
Helper class for explicitly setting values when creating a SdfAssetPath.
A scene description container that can combine with other such containers to form simple component as...
static size_t Combine(Args &&... args)
Produce a hash code by combining the hash codes of several objects.
Represents a range of contiguous elements.
A map with string keys and VtValue values.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].