CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::Hasher< T > Struct Template Reference

A reflection pre-processor that creates a hash for an object. More...

#include <CeresEngine/Foundation/Hash.hpp>

Inheritance diagram for CeresEngine::Hasher< T >:
CeresEngine::detailv3::SherwoodV3Table< T, FindKey, ArgumentHash, Hasher, ArgumentEqual, Equal, ArgumentAlloc, EntryAlloc > CeresEngine::FlatHashSet< T, H, E, A >

Public Types

using ReflectedType = std::decay_t< T >
 The type currently being hashed.
 

Public Member Functions

constexpr Hasher (T &object, const size_t hash=0) noexcept
 Creates a new hasher for the given object.
 
template<auto P>
constexpr void data (StringView) noexcept
 Combines the hash with the.
 
template<auto P>
constexpr void func (StringView) noexcept
 No-op.
 

Public Attributes

Tobject
 The object currently being hashed.
 
size_t hash
 The computed hash.
 

Detailed Description

template<typename T>
struct CeresEngine::Hasher< T >

A reflection pre-processor that creates a hash for an object.

Member Typedef Documentation

◆ ReflectedType

template<typename T >
using CeresEngine::Hasher< T >::ReflectedType = std::decay_t<T>

The type currently being hashed.

Constructor & Destructor Documentation

◆ Hasher()

template<typename T >
constexpr CeresEngine::Hasher< T >::Hasher ( T object,
const size_t  hash = 0 
)
inlineexplicitconstexprnoexcept

Creates a new hasher for the given object.

Member Function Documentation

◆ data()

template<typename T >
template<auto P>
constexpr void CeresEngine::Hasher< T >::data ( StringView  )
inlineconstexprnoexcept

Combines the hash with the.

Template Parameters
PA pointer to the data member to be hashed.

◆ func()

template<typename T >
template<auto P>
constexpr void CeresEngine::Hasher< T >::func ( StringView  )
inlineconstexprnoexcept

No-op.

Member Data Documentation

◆ hash

template<typename T >
size_t CeresEngine::Hasher< T >::hash

The computed hash.

◆ object

template<typename T >
T& CeresEngine::Hasher< T >::object

The object currently being hashed.


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