24 #ifndef PXR_USD_SDF_ASSET_PATH_H
25 #define PXR_USD_SDF_ASSET_PATH_H
30 #include "pxr/usd/sdf/api.h"
32 #include <boost/functional/hash.hpp>
33 #include <boost/operators.hpp>
37 PXR_NAMESPACE_OPEN_SCOPE
48 public boost::totally_ordered<SdfAssetPath>
71 SdfAssetPath(
const std::string &path,
const std::string &resolvedPath);
80 return _assetPath == rhs._assetPath &&
81 _resolvedPath == rhs._resolvedPath;
85 SDF_API
bool operator<(
const SdfAssetPath &rhs)
const;
90 boost::hash_combine(hash, _assetPath);
91 boost::hash_combine(hash, _resolvedPath);
98 size_t operator()(
const SdfAssetPath &ap)
const {
103 friend size_t hash_value(
const SdfAssetPath &ap) {
return ap.
GetHash(); }
121 return _resolvedPath;
127 friend inline void swap(SdfAssetPath &lhs, SdfAssetPath &rhs) {
128 lhs._assetPath.swap(rhs._assetPath);
129 lhs._resolvedPath.swap(rhs._resolvedPath);
132 std::string _assetPath;
133 std::string _resolvedPath;
145 SDF_API std::ostream&
operator<<(std::ostream& out,
const SdfAssetPath& ap);
149 PXR_NAMESPACE_CLOSE_SCOPE
151 #endif // PXR_USD_SDF_ASSET_PATH_H
SDF_API SdfAssetPath()
Construct an empty asset path.
size_t GetHash() const
Hash function.
const std::string & GetAssetPath() const
Return the asset path.
const std::string & GetResolvedPath() const
Return the resolved asset path, if any.
bool operator==(const SdfAssetPath &rhs) const
Equality, including the resolved path.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
Contains an asset path and an optional resolved path.
SDF_API bool operator<(const SdfAssetPath &rhs) const
Ordering first by asset path, then by resolved path.