载入中...
搜索中...
未找到
RuntimeHandle.h
浏览该文件的文档.
59 [[nodiscard]] static constexpr std::optional<generation_type> nextGeneration(generation_type current) noexcept {
93 friend constexpr bool operator==(const HandleCoordinates&, const HandleCoordinates&) noexcept = default;
95 friend constexpr auto operator<=>(const HandleCoordinates&, const HandleCoordinates&) noexcept = default;
126 static constexpr generation_type invalidGeneration = detail::HandleCoordinates::invalidGeneration;
155 [[nodiscard]] constexpr generation_type generation() const noexcept { return coordinates_.generation; }
162 [[nodiscard]] static constexpr std::optional<generation_type> nextGeneration(generation_type current) noexcept {
197 friend constexpr bool operator==(const RuntimeHandle& left, const RuntimeHandle& right) noexcept {
201 friend constexpr auto operator<=>(const RuntimeHandle& left, const RuntimeHandle& right) noexcept {
Process-local slot identity tagged by the registry that owns it.
Definition RuntimeHandle.h:116
constexpr bool isInvalid() const noexcept
Returns whether this value is the invalid sentinel.
Definition RuntimeHandle.h:149
static constexpr RuntimeHandle fromPacked(std::uint64_t value) noexcept
Reconstructs a handle from an explicit packed boundary value.
Definition RuntimeHandle.h:190
constexpr generation_type generation() const noexcept
Returns the owner-local replacement generation.
Definition RuntimeHandle.h:155
constexpr bool isValid() const noexcept
Returns whether both coordinates are usable handle values.
Definition RuntimeHandle.h:146
constexpr index_type index() const noexcept
Returns the owner-local slot index.
Definition RuntimeHandle.h:152
detail::HandleCoordinates::generation_type generation_type
Unsigned owner-local generation type.
Definition RuntimeHandle.h:121
constexpr std::optional< RuntimeHandle > nextGeneration() const noexcept
Returns this slot at its next generation.
Definition RuntimeHandle.h:170
static constexpr generation_type invalidGeneration
Reserved generation value shared by all invalid handles.
Definition RuntimeHandle.h:126
static constexpr std::optional< generation_type > nextGeneration(generation_type current) noexcept
Returns the next generation without unsigned wraparound.
Definition RuntimeHandle.h:162
friend constexpr bool operator==(const RuntimeHandle &left, const RuntimeHandle &right) noexcept
Operator ==.
Definition RuntimeHandle.h:197
static constexpr index_type invalidIndex
Reserved index value shared by all invalid handles.
Definition RuntimeHandle.h:124
detail::HandleCoordinates::index_type index_type
Unsigned owner-local slot index type.
Definition RuntimeHandle.h:119
constexpr std::uint64_t packed() const noexcept
Encodes the two coordinates for a legacy integer boundary.
Definition RuntimeHandle.h:183
constexpr RuntimeHandle() noexcept=default
Constructs an invalid handle.
friend constexpr auto operator<=>(const RuntimeHandle &left, const RuntimeHandle &right) noexcept
Operator <=>.
Definition RuntimeHandle.h:201
static constexpr RuntimeHandle invalid() noexcept
Returns the canonical invalid handle.
Definition RuntimeHandle.h:143
Definition Container.h:602
Tag-free slot coordinates behind every RuntimeHandle<Tag>.
Definition RuntimeHandle.h:32
static constexpr index_type invalidIndex
Reserved index value shared by all invalid handles.
Definition RuntimeHandle.h:39
static constexpr HandleCoordinates fromPacked(std::uint64_t value) noexcept
Reconstructs coordinates from an explicit packed boundary value.
Definition RuntimeHandle.h:87
constexpr bool isInvalid() const noexcept
Returns whether this value is the invalid sentinel.
Definition RuntimeHandle.h:52
static constexpr generation_type invalidGeneration
Reserved generation value shared by all invalid handles.
Definition RuntimeHandle.h:41
friend constexpr auto operator<=>(const HandleCoordinates &, const HandleCoordinates &) noexcept=default
Operator <=>.
constexpr bool isValid() const noexcept
Returns whether both coordinates are usable handle values.
Definition RuntimeHandle.h:47
constexpr std::optional< generation_type > bumpedGeneration() const noexcept
Returns this slot's next generation.
Definition RuntimeHandle.h:68
static constexpr std::optional< generation_type > nextGeneration(generation_type current) noexcept
Returns the next generation without unsigned wraparound.
Definition RuntimeHandle.h:59
friend constexpr bool operator==(const HandleCoordinates &, const HandleCoordinates &) noexcept=default
Operator ==.
constexpr std::uint64_t packed() const noexcept
Encodes the two coordinates for a legacy integer boundary.
Definition RuntimeHandle.h:78