![]() |
|
This class wraps a VdfVector adding equality comparison and hashing capabilities to the vector, without requiring all types stored in VdfVector to implement the corresponding operators. More...
#include <vectorKey.h>
Inheritance diagram for Ef_VectorKey:Classes | |
| struct | Equal |
| Equality compare functor. More... | |
| struct | Map |
| Type of a hash map with Ef_VectorKey as key. More... | |
Public Types | |
| using | StoredType = std::shared_ptr< Ef_VectorKey > |
| The type which must be used to store Ef_VectorKeys, for example as keys in a hash map. | |
Public Member Functions | |
| Ef_VectorKey (const Ef_VectorKey &)=delete | |
| Non-copyable. | |
| Ef_VectorKey & | operator= (const Ef_VectorKey &)=delete |
| virtual EF_API | ~Ef_VectorKey () |
| Destructor. | |
| const VdfVector & | GetValue () const |
| Returns the wrapped VdfVector. | |
| virtual size_t | CreateHash () const =0 |
| Generates a hash from the VdfVector. | |
| virtual bool | IsEqual (const Ef_VectorKey &) const =0 |
| Equality compares this Ef_VectorKey with another one. | |
| bool | operator== (const Ef_VectorKey &rhs) const |
| Equality operator. | |
| bool | operator!= (const Ef_VectorKey &rhs) const |
Protected Member Functions | |
| Ef_VectorKey (const VdfVector &value) | |
Protected Attributes | |
| const VdfVector | _value |
Friends | |
| template<class HashState > | |
| void | TfHashAppend (HashState &h, const Ef_VectorKey::StoredType &v) |
| Hashing. | |
This class wraps a VdfVector adding equality comparison and hashing capabilities to the vector, without requiring all types stored in VdfVector to implement the corresponding operators.
Only the types wrapped in Ef_VectorKey must provide these operators.
This is an abstract base class.
Definition at line 35 of file vectorKey.h.
| struct Ef_VectorKey::Map |
Type of a hash map with Ef_VectorKey as key.
Definition at line 99 of file vectorKey.h.
| Class Members | ||
|---|---|---|
| typedef TfHashMap< StoredType, T, TfHash, Equal > | Type | |
| using StoredType = std::shared_ptr<Ef_VectorKey> |
The type which must be used to store Ef_VectorKeys, for example as keys in a hash map.
Definition at line 41 of file vectorKey.h.
|
delete |
Non-copyable.
|
virtual |
Destructor.
|
inlineexplicitprotected |
Definition at line 106 of file vectorKey.h.
|
pure virtual |
Generates a hash from the VdfVector.
This must be implemented by the derived Ef_TypedVectorKey.
Implemented in Ef_TypedVectorKey< T >.
|
inline |
Returns the wrapped VdfVector.
Definition at line 55 of file vectorKey.h.
|
pure virtual |
Equality compares this Ef_VectorKey with another one.
This must be implemented by the derived Ef_TypedVectorKey.
Implemented in Ef_TypedVectorKey< T >.
|
inline |
Definition at line 77 of file vectorKey.h.
|
inline |
Equality operator.
Definition at line 73 of file vectorKey.h.
|
friend |
Hashing.
Definition at line 84 of file vectorKey.h.
|
protected |
Definition at line 111 of file vectorKey.h.