|
OpenTTD Source 20260108-master-g8ba1860eaa
|
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 47 of file pool_type.hpp.
| using PoolID< TBaseType, TTag, TEnd, TInvalid >::BaseType = TBaseType |
Definition at line 48 of file pool_type.hpp.
|
inlineexplicitconstexpr |
Definition at line 54 of file pool_type.hpp.
|
inlineconstexprnoexcept |
Definition at line 60 of file pool_type.hpp.
|
inlinestaticconstexpr |
Definition at line 62 of file pool_type.hpp.
|
inlinestaticconstexpr |
Definition at line 63 of file pool_type.hpp.
|
inlinestaticconstexpr |
Definition at line 64 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 69 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 67 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 66 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 68 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 72 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 75 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 56 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 57 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 71 of file pool_type.hpp.
|
inlineconstexpr |
Definition at line 74 of file pool_type.hpp.
|
private |
Definition at line 78 of file pool_type.hpp.