7 #ifndef PXR_USD_SDF_ASSET_PATH_H
8 #define PXR_USD_SDF_ASSET_PATH_H
26 template<
typename T>
class TfSpan;
45 authoredPath = authoredPath_;
50 evaluatedPath = evaluatedPath_;
55 resolvedPath = resolvedPath_;
62 std::string authoredPath;
63 std::string evaluatedPath;
64 std::string resolvedPath;
104 const std::string &resolvedPath);
121 return _authoredPath == rhs._authoredPath &&
122 _evaluatedPath == rhs._evaluatedPath &&
123 _resolvedPath == rhs._resolvedPath;
129 return !(*
this == rhs);
138 return !(rhs < *
this);
150 return !(*
this < rhs);
176 return _authoredPath;
181 return std::move(_authoredPath);
193 return _evaluatedPath;
198 return std::move(_evaluatedPath);
206 return _evaluatedPath.empty() ? _authoredPath : _evaluatedPath;
212 _evaluatedPath.empty() ? _authoredPath : _evaluatedPath);
222 return _resolvedPath;
227 return std::move(_resolvedPath);
238 _authoredPath = authoredPath;
244 _evaluatedPath = evaluatedPath;
249 _resolvedPath = resolvedPath;
255 friend inline void swap(SdfAssetPath &lhs, SdfAssetPath &rhs) {
256 lhs._authoredPath.swap(rhs._authoredPath);
257 lhs._evaluatedPath.swap(rhs._evaluatedPath);
258 lhs._resolvedPath.swap(rhs._resolvedPath);
262 std::string _authoredPath;
265 std::string _evaluatedPath;
267 std::string _resolvedPath;
292 std::vector<std::string> *errors);
301 std::vector<std::string> *errors);
305 #endif // PXR_USD_SDF_ASSET_PATH_H
const std::string & GetEvaluatedPath() const &
std::string GetAuthoredPath() 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.
friend size_t hash_value(const SdfAssetPath &ap)
Equality, including the evaluated and resolved paths.
const std::string & GetAuthoredPath() const &
#define PXR_NAMESPACE_OPEN_SCOPE
friend void swap(SdfAssetPath &lhs, SdfAssetPath &rhs)
void SetResolvedPath(const std::string &resolvedPath)
Sets the resolved path. This value is the result of asset resolution.
SDF_API SdfAssetPath()
Construct an empty asset path.
const std::string & GetResolvedPath() const &
bool operator>(const SdfAssetPath &rhs) const
std::string GetResolvedPath() const &&
Overload for rvalues, move out the asset path.
size_t GetHash() const
Hash function.
GLenum const GLfloat * params
SdfAssetPathParams & Authored(const std::string &authoredPath_)
SdfAssetPathParams & Evaluated(const std::string &evaluatedPath_)
const std::string & GetAssetPath() const &
VT_VALUE_TYPE_CAN_TRANSFORM(SdfAssetPath)
std::string GetAssetPath() const &&
Overload for rvalues, move out the asset path.
SDF_DECLARE_HANDLES(SdfLayer)
bool operator<=(const SdfAssetPath &rhs) const
SDF_API void SdfResolveAssetPaths(const SdfLayerHandle &anchor, const VtDictionary &exprVars, TfSpan< SdfAssetPath > assetPaths, std::vector< std::string > *errors)
size_t operator()(const SdfAssetPath &ap) const
bool operator==(const SdfAssetPath &rhs) const
Equality, including the evaluated and resolved paths.
SdfAssetPathParams & Resolved(const std::string &resolvedPath_)
static size_t Combine(Args &&...args)
Produce a hash code by combining the hash codes of several objects.
SDF_API void SdfAnchorAssetPaths(const SdfLayerHandle &anchor, const VtDictionary &exprVars, TfSpan< SdfAssetPath > assetPaths, std::vector< std::string > *errors)
SDF_API std::ostream & operator<<(std::ostream &out, const SdfAssetPath &ap)
#define PXR_NAMESPACE_CLOSE_SCOPE
void SetAuthoredPath(const std::string &authoredPath)
bool operator>=(const SdfAssetPath &rhs) const
std::string GetEvaluatedPath() const &&
Overload for rvalues, move out the evaluated path.
void SetEvaluatedPath(const std::string &evaluatedPath)
bool operator!=(const SdfAssetPath &rhs) const