7#ifndef PXR_EXEC_EF_VECTOR_KEY_H
8#define PXR_EXEC_EF_VECTOR_KEY_H
14#include "pxr/exec/ef/api.h"
17#include "pxr/base/tf/hashmap.h"
22PXR_NAMESPACE_OPEN_SCOPE
78 return !(*
this == rhs);
83 template <
class HashState>
85 h.Append(v->CreateHash());
92 return lhs->IsEqual(*rhs);
98 template <
typename T >
100 using Type = TfHashMap<
124template <
typename T >
166 const VdfVector &rhsV = rhsDerived->_value;
173 if (a[i] != rhsA[i]) {
188PXR_NAMESPACE_CLOSE_SCOPE
The derived Ef_VectorKey type, which implements the methods for generating hashes and equality compar...
virtual size_t CreateHash() const
Implementation of the method that generates a hash from the VdfVector holding data of type T.
virtual bool IsEqual(const Ef_VectorKey &rhs) const
Implementation of the method that equality compares two Ef_VectorKeys of type T.
Ef_TypedVectorKey(const Ef_TypedVectorKey &)=delete
Non-copyable.
Ef_TypedVectorKey(const VdfVector &value)
Constructor.
This class wraps a VdfVector adding equality comparison and hashing capabilities to the vector,...
virtual size_t CreateHash() const =0
Generates a hash from the VdfVector.
std::shared_ptr< Ef_VectorKey > StoredType
The type which must be used to store Ef_VectorKeys, for example as keys in a hash map.
friend void TfHashAppend(HashState &h, const Ef_VectorKey::StoredType &v)
Hashing.
bool operator==(const Ef_VectorKey &rhs) const
Equality operator.
virtual EF_API ~Ef_VectorKey()
Destructor.
Ef_VectorKey(const Ef_VectorKey &)=delete
Non-copyable.
virtual bool IsEqual(const Ef_VectorKey &) const =0
Equality compares this Ef_VectorKey with another one.
const VdfVector & GetValue() const
Returns the wrapped VdfVector.
Type of a hash map with Ef_VectorKey as key.
A user-extensible hashing mechanism for use with runtime hash tables.
static size_t Combine(Args &&... args)
Produce a hash code by combining the hash codes of several objects.
A read-only accessor for low-level acces to the contents of the VdfVector.
size_t GetNumValues() const
Returns the size of the vector, i.e.
This class is used to abstract away knowledge of the cache data used for each node.
ReadAccessor< TYPE > GetReadAccessor() const
GetReadAccessor() allows low level read-only access to the content of of the VdfVector via the Vdf_Ve...
Equality compare functor.