Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
ID< KIND > Class Template Reference

#include "steam/asset.hpp"

Description

template<class KIND>
class steam::asset::ID< KIND >

thin wrapper around a size_t hash ID used as primary key for all Asset objects.

The Template parameter is intended for tagging the ID with type information, causing the compiler to select specialised behaviour for the different kinds of Assets.

See also
Asset
AssetManager::getID generating ID values
asset::Media
ID<asset::Media>
Todo:
it would be desirable to use EntryID instead ///////////////////////////////////////////TICKET #739 : make identification schemes compatible

Definition at line 97 of file asset.hpp.

Static Public Attributes

static ID INVALID = ID{0}
 marker constant denoting a NIL asset
 

Public Member Functions

 ID (HashVal id)
 
 ID (const KIND &asset)
 
 operator HashVal () const
 

Private Attributes

HashVal hash_
 

Constructor & Destructor Documentation

◆ ID() [1/2]

template<class KIND >
ID ( HashVal  id)
inline

Definition at line 101 of file asset.hpp.

◆ ID() [2/2]

template<class KIND >
ID ( const KIND &  asset)
inline

Definition at line 102 of file asset.hpp.

Member Function Documentation

◆ operator HashVal()

template<class KIND >
operator HashVal ( ) const
inline

Definition at line 103 of file asset.hpp.

References ID< KIND >::hash_.

Member Data Documentation

◆ hash_

template<class KIND >
HashVal hash_
private

Definition at line 99 of file asset.hpp.

Referenced by ID< KIND >::operator HashVal().

◆ INVALID

template<class KIND >
ID< KIND > INVALID = ID{0}
static

marker constant denoting a NIL asset

Definition at line 105 of file asset.hpp.

+ Inheritance diagram for ID< KIND >:
+ Collaboration diagram for ID< KIND >:

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