HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hash.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/vt/api.h"
#include "pxr/base/tf/hash.h"
#include <hboost/functional/hash.hpp>
#include <typeinfo>
#include <utility>
+ Include dependency graph for hash.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Vt_HashDetail
 

Functions

VT_API void Vt_HashDetail::_IssueUnimplementedHashError (std::type_info const &t)
 
template<class T , class = decltype(hash_value(std::declval<T>()))>
constexpr bool Vt_HashDetail::_IsHashable (int)
 
template<class T , class = decltype(TfHash()(std::declval<T>()))>
constexpr bool Vt_HashDetail::_IsHashable (long)
 
template<class T >
constexpr bool Vt_HashDetail::_IsHashable (...)
 
template<class T , class = decltype(hash_value(std::declval<T>()))>
size_t Vt_HashDetail::_HashValueImpl (T const &val, int)
 
template<class T , class = decltype(TfHash()(std::declval<T>()))>
size_t Vt_HashDetail::_HashValueImpl (T const &val, long)
 
template<class T >
size_t Vt_HashDetail::_HashValueImpl (T const &val,...)
 
template<class T >
constexpr bool VtIsHashable ()
 
template<class T >
size_t VtHashValue (T const &val)
 

Function Documentation

template<class T >
size_t VtHashValue ( T const val)

Compute a hash code for val by invoking (hboost::)hash_value(val) if possible, otherwise by invoking TfHash()(val), or if neither are possible issue a coding error and return 0.

Definition at line 94 of file hash.h.

template<class T >
constexpr bool VtIsHashable ( )

A constexpr function that returns true if T is hashable via VtHashValue, false otherwise. This is true if we can either invoke (hboost::)hash_value() or TfHash()() on a T instance.

Definition at line 86 of file hash.h.