ezEngine  Release 25.03
ezHashableStruct< DERIVED > Class Template Reference

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)
 
ezUInt32 CalculateHash () const
 Calculates the 32 bit hash of the struct and returns it.
 

Detailed Description

template<typename DERIVED>
class ezHashableStruct< DERIVED >

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.


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