KTech 1.1.0
C++ 2D terminal game engine library
Loading...
Searching...
No Matches
KTech::ID< T > Struct Template Reference

Serializable world structure identifier. More...

#include <id.hpp>

Public Member Functions

constexpr ID ()
 Construct a null ID.
 
constexpr auto operator== (ID id) const -> bool
 Compare 2 IDs.
 

Friends

class CachingRegistry< T >
 

Detailed Description

template<typename T>
struct KTech::ID< T >

Serializable world structure identifier.

Comprises a universally unique identifier (UUID) and a local cached index maintained by CachingRegistry. The local cached index is mutable, so it can be changed by CachingRegistry even if the containing ID is const.

See also
KTech::CachingRegistry

Member Function Documentation

◆ operator==()

template<typename T >
auto KTech::ID< T >::operator== ( ID< T > id) const -> bool
inlineconstexpr

Compare 2 IDs.

Parameters
[in]idThe ID to compare with this ID.
Returns
true: the UUIDs are equal (the cached index is ignored). false: they are unequal.

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