All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
assetInfo.h
Go to the documentation of this file.
1//
2// Copyright 2016 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_ASSET_INFO_H
8#define PXR_USD_AR_ASSET_INFO_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/ar/api.h"
14#include "pxr/base/tf/hash.h"
15#include "pxr/base/vt/value.h"
16#include <string>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
25{
26public:
28 std::string version;
29
32 std::string assetName;
33
36 std::string repoPath;
37
41};
42
43template <class HashState>
44void TfHashAppend(HashState& h, const ArAssetInfo& info)
45{
46 h.Append(info.version, info.assetName, info.repoPath, info.resolverInfo);
47}
48
49inline
50size_t hash_value(const ArAssetInfo& info)
51{
52 return TfHash()(info);
53}
54
56inline
57void swap(ArAssetInfo& lhs, ArAssetInfo& rhs)
58{
59 lhs.version.swap(rhs.version);
60 lhs.assetName.swap(rhs.assetName);
61 lhs.repoPath.swap(rhs.repoPath);
63}
64
66AR_API
67bool
68operator==(const ArAssetInfo& lhs, const ArAssetInfo& rhs);
69
71AR_API
72bool
73operator!=(const ArAssetInfo& lhs, const ArAssetInfo& rhs);
74
75PXR_NAMESPACE_CLOSE_SCOPE
76
77#endif // PXR_USD_AR_ASSET_INFO_H
Contains information about a resolved asset.
Definition: assetInfo.h:25
std::string repoPath
Definition: assetInfo.h:36
std::string version
Version of the resolved asset, if any.
Definition: assetInfo.h:28
VtValue resolverInfo
Additional information specific to the active plugin asset resolver implementation.
Definition: assetInfo.h:40
std::string assetName
The name of the asset represented by the resolved asset, if any.
Definition: assetInfo.h:32
A user-extensible hashing mechanism for use with runtime hash tables.
Definition: hash.h:460
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147
VtValue & Swap(VtValue &rhs) noexcept
Swap this with rhs.
Definition: value.h:955
size_t hash_value(const half h)
Overload hash_value for half.
Definition: half.h:28