![]() |
ezEngine Release 25.08
|
This class provides a base class for hashable structs (e.g. descriptor objects). More...
#include <HashableStruct.h>
Public Member Functions | |
ezHashableStruct (const ezHashableStruct< DERIVED > &other) | |
void | operator= (const ezHashableStruct< DERIVED > &other) |
bool | operator== (const ezHashableStruct< DERIVED > &other) const |
bool | operator!= (const ezHashableStruct< DERIVED > &other) const |
bool | operator< (const ezHashableStruct< DERIVED > &other) const |
ezUInt32 | CalculateHash () const |
Calculates the 32 bit hash of the struct and returns it. | |
This class provides a base class for hashable structs (e.g. descriptor objects).
To help with this there are two parts: 1) memclear on initialization. 2) a CalculateHash() function calculating the 32 bit hash of the object.
You can make your own struct hashable by deriving from ezHashableStruct providing the type of your class / struct as the template parameter.