Gaia-ECS v1.0.0
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::core::direct_hash_key< T > Struct Template Reference

Wraps an integral value that is already a hash key. More...

#include <hashing_policy.h>

Public Types

using Type = T
 Underlying hash storage type.
 

Public Member Functions

bool operator== (direct_hash_key other) const
 Compares two direct hash keys.
 
bool operator!= (direct_hash_key other) const
 Compares two direct hash keys for inequality.
 

Public Attributes

hash
 Precomputed hash value.
 

Static Public Attributes

static constexpr bool IsDirectHashKey = true
 Marker used by Gaia-ECS hash containers to bypass rehashing.
 

Detailed Description

template<typename T>
struct gaia::core::direct_hash_key< T >

Wraps an integral value that is already a hash key.

Template Parameters
TIntegral hash storage type.

Member Function Documentation

◆ operator!=()

template<typename T >
bool gaia::core::direct_hash_key< T >::operator!= ( direct_hash_key< T >  other) const
inline

Compares two direct hash keys for inequality.

Parameters
otherKey to compare with.
Returns
True when the wrapped hash values differ.

◆ operator==()

template<typename T >
bool gaia::core::direct_hash_key< T >::operator== ( direct_hash_key< T >  other) const
inline

Compares two direct hash keys.

Parameters
otherKey to compare with.
Returns
True when both wrapped hash values are equal.

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