![]() |
Plasma Engine
2.0
|
This class provides a base class for hashable structs (e.g. descriptor objects). More...
#include <HashableStruct.h>
Public Member Functions | |
plHashableStruct (const plHashableStruct< DERIVED > &other) | |
void | operator= (const plHashableStruct< DERIVED > &other) |
plUInt32 | 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 plHashableStruct providing the type of your class / struct as the template parameter.