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

Converts an item to the sparse identifier used by sparse_storage. More...

#include <sparse_storage.h>

Static Public Member Functions

static sparse_id get (const T &item) noexcept
 Returns the sparse identifier for an item.
 

Detailed Description

template<typename T>
struct gaia::cnt::to_sparse_id< T >

Converts an item to the sparse identifier used by sparse_storage.

Template Parameters
TItem type. Non-empty types must specialize this conversion.

Member Function Documentation

◆ get()

template<typename T >
static sparse_id gaia::cnt::to_sparse_id< T >::get ( const T item)
inlinestaticnoexcept

Returns the sparse identifier for an item.

Parameters
itemItem to convert.
Returns
Sparse identifier supplied by a specialization.

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