HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ef_VectorKey Class Referenceabstract

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. More...

#include <vectorKey.h>

+ Inheritance diagram for Ef_VectorKey:

Classes

struct  Equal
 
struct  Map
 

Public Types

using StoredType = std::shared_ptr< Ef_VectorKey >
 

Public Member Functions

 Ef_VectorKey (const Ef_VectorKey &)=delete
 
Ef_VectorKeyoperator= (const Ef_VectorKey &)=delete
 
virtual EF_API ~Ef_VectorKey ()
 
const VdfVectorGetValue () const
 
virtual size_t CreateHash () const =0
 
virtual bool IsEqual (const Ef_VectorKey &) const =0
 
bool operator== (const Ef_VectorKey &rhs) const
 
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)
 

Detailed Description

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.

Member Typedef Documentation

using Ef_VectorKey::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.

Constructor & Destructor Documentation

Ef_VectorKey::Ef_VectorKey ( const Ef_VectorKey )
delete

Non-copyable.

virtual EF_API Ef_VectorKey::~Ef_VectorKey ( )
virtual

Destructor.

Ef_VectorKey::Ef_VectorKey ( const VdfVector value)
inlineexplicitprotected

Definition at line 106 of file vectorKey.h.

Member Function Documentation

virtual size_t Ef_VectorKey::CreateHash ( ) const
pure virtual

Generates a hash from the VdfVector.

This must be implemented by the derived Ef_TypedVectorKey.

Implemented in Ef_TypedVectorKey< T >.

const VdfVector& Ef_VectorKey::GetValue ( ) const
inline

Returns the wrapped VdfVector.

Definition at line 55 of file vectorKey.h.

virtual bool Ef_VectorKey::IsEqual ( const Ef_VectorKey ) const
pure virtual

Equality compares this Ef_VectorKey with another one.

This must be implemented by the derived Ef_TypedVectorKey.

Implemented in Ef_TypedVectorKey< T >.

bool Ef_VectorKey::operator!= ( const Ef_VectorKey rhs) const
inline

Definition at line 77 of file vectorKey.h.

Ef_VectorKey& Ef_VectorKey::operator= ( const Ef_VectorKey )
delete
bool Ef_VectorKey::operator== ( const Ef_VectorKey rhs) const
inline

Equality operator.

Definition at line 73 of file vectorKey.h.

Friends And Related Function Documentation

template<class HashState >
void TfHashAppend ( HashState &  h,
const Ef_VectorKey::StoredType v 
)
friend

Hashing.

Definition at line 84 of file vectorKey.h.

Member Data Documentation

const VdfVector Ef_VectorKey::_value
protected

Definition at line 111 of file vectorKey.h.


The documentation for this class was generated from the following file: