Blender V4.3
usd_hash_types.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "BLI_hash.hh"
8
9#include <pxr/base/tf/token.h>
10#include <pxr/usd/sdf/path.h>
11#include <pxr/usd/sdf/valueTypeName.h>
12
13namespace blender {
14template<> struct DefaultHash<pxr::SdfValueTypeName> {
15 uint64_t operator()(const pxr::SdfValueTypeName &value) const
16 {
17 return value.GetHash();
18 }
19};
20
21template<> struct DefaultHash<pxr::TfToken> {
22 uint64_t operator()(const pxr::TfToken &value) const
23 {
24 return value.Hash();
25 }
26};
27
28template<> struct DefaultHash<pxr::SdfPath> {
29 uint64_t operator()(const pxr::SdfPath &value) const
30 {
31 return (uint64_t)value.GetHash();
32 }
33};
34} // namespace blender
unsigned __int64 uint64_t
Definition stdint.h:90
uint64_t operator()(const pxr::SdfPath &value) const
uint64_t operator()(const pxr::SdfValueTypeName &value) const
uint64_t operator()(const pxr::TfToken &value) const