|
JPL Spatial
Sound spatialization and propagation library
|
#include <JPLSpatial/Utilities/IDType.h>
Public Types | |
| using | TagType = Tag |
| using | CounterType = std::conditional_t< Atomic, std::atomic< InternalType >, InternalType > |
Public Member Functions | |
| constexpr | IDType ()=default |
| constexpr bool | IsValid () const noexcept |
| constexpr | operator bool () const noexcept |
| constexpr bool | operator== (const IDType other) const noexcept |
| constexpr bool | operator!= (const IDType other) const noexcept |
Static Public Member Functions | |
| static constexpr IDType | New () noexcept |
Friends | |
| struct | std::hash< JPL::IDType< Tag, InternalType > > |
Simple utility, wrapping incrementing counter to generate strongly typed runtime identifiers.
It is not serializable and is meant to be use for runtime tracking only.
If template parameter 'Atomic' is set to 'true', makes the internal static counter type atomic to make sure IDs can be safely generated from multiple threads.
| using JPL::IDType< Tag, InternalType, Atomic >::CounterType = std::conditional_t<Atomic, std::atomic<InternalType>, InternalType> |
| using JPL::IDType< Tag, InternalType, Atomic >::TagType = Tag |
|
constexprdefault |
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
friend |