|
OpenTTD Source 20251116-master-g21329071df
|
Templated helper to make a PoolID a single POD value. More...
#include <pool_type.hpp>
Public Types | |
| using | BaseType = TBaseType |
Public Member Functions | |
| constexpr | PoolID (const PoolID &)=default |
| constexpr | PoolID (PoolID &&)=default |
| constexpr | PoolID (const TBaseType &value) |
| constexpr PoolID & | operator= (const PoolID &rhs) |
| constexpr PoolID & | operator= (PoolID &&rhs) |
| constexpr TBaseType | base () const noexcept |
| constexpr auto | operator++ () |
| constexpr auto | operator+ (const std::integral auto &val) const |
| constexpr auto | operator- (const std::integral auto &val) const |
| constexpr auto | operator% (const std::integral auto &val) const |
| constexpr bool | operator== (const PoolID< TBaseType, TTag, TEnd, TInvalid > &rhs) const |
| constexpr auto | operator<=> (const PoolID< TBaseType, TTag, TEnd, TInvalid > &rhs) const |
| constexpr bool | operator== (const size_t &rhs) const |
| constexpr auto | operator<=> (const size_t &rhs) const |
Static Public Member Functions | |
| static constexpr PoolID | Begin () |
| static constexpr PoolID | End () |
| static constexpr PoolID | Invalid () |
Private Attributes | |
| TBaseType | value |
Templated helper to make a PoolID a single POD value.
Example usage:
using MyType = PoolID<int, struct MyTypeTag, 16, 0xFF>;
| TBaseType | Type of the derived class (i.e. the concrete usage of this class). |
| TTag | An unique struct to keep types of the same TBaseType distinct. |
| TEnd | The PoolID at the end of the pool (equivalent to size). |
| TInvalid | The PoolID denoting an invalid value. |
Definition at line 43 of file pool_type.hpp.
| using PoolID< TBaseType, TTag, TEnd, TInvalid >::BaseType = TBaseType |
Definition at line 44 of file pool_type.hpp.
|
inlineexplicitconstexpr |
Definition at line 50 of file pool_type.hpp.
|
inlineconstexprnoexcept |
Definition at line 56 of file pool_type.hpp.
|
inlinestaticconstexpr |
Definition at line 58 of file pool_type.hpp.
|
inlinestaticconstexpr |
Definition at line 59 of file pool_type.hpp.
|
inlinestaticconstexpr |
Definition at line 60 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 65 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 63 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 62 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 64 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 68 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 71 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 52 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 53 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 67 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 70 of file pool_type.hpp.
|
private |
Definition at line 74 of file pool_type.hpp.