|
ECSM v0.7.0
Entity Component System Manager
|
Item identifier in the LinearPool. More...
#include <linear-pool.hpp>
Public Member Functions | |
| constexpr | ID () noexcept=default |
| Creates null item identifier. | |
| template<class U> | |
| constexpr | ID (ID< U > id) noexcept |
| Changes the type of the identifier item. | |
| uint32_t | operator* () const noexcept |
| Returns item index + 1 in the linear pool. | |
| uint32_t & | operator* () noexcept |
| Returns reference to the item index + 1 in the linear pool. | |
| constexpr bool | operator== (ID v) const noexcept |
| Returns true if this identifier is equal to the v identifier. | |
| constexpr bool | operator!= (ID v) const noexcept |
| Returns true if this identifier is not equal to the v identifier. | |
| constexpr bool | operator< (ID v) const noexcept |
| Returns true if this identifier is less than the v identifier. | |
| constexpr | operator bool () const noexcept |
| Returns true if item is not null. | |
Protected Member Functions | |
| constexpr | ID (uint32_t index) noexcept |
Protected Attributes | |
| uint32_t | index = 0 |
Friends | |
| class | LinearPool< T, true > |
| class | LinearPool< T, false > |
Item identifier in the LinearPool.
| T | type of the item in the linear pool |
Identifier or index associated with individual items within the pool. Each item in the pool can be uniquely identified by its identifier, which helps in managing and referencing items.
|
inlineexplicitconstexprnoexcept |
Changes the type of the identifier item.
Useful in cases where we need to cast item identifier type.
| U | is a new type of the identifier item |
| id | item identifier in the linear pool |
|
inlinenoexcept |
Returns item index + 1 in the linear pool.
Used to get internal integer index.
|
inlinenoexcept |
Returns reference to the item index + 1 in the linear pool.
|
inlineconstexprnoexcept |
Returns true if this identifier is equal to the v identifier.
| v | other identifier value |
|
inlineconstexprnoexcept |
Returns true if this identifier is not equal to the v identifier.
| v | other identifier value |
|
inlineconstexprnoexcept |
Returns true if this identifier is less than the v identifier.
| v | other identifier value |