载入中...
搜索中...
未找到
RuntimeBorrow.h
浏览该文件的文档.
77 [[nodiscard]] constexpr bool isValid() const noexcept { return handle.isValid() && ownerEpoch != 0; }
80 friend constexpr bool operator==(const RuntimeHandleRef&, const RuntimeHandleRef&) noexcept = default;
Strong generation-qualified handles for non-ECS runtime registries.
Process-local slot identity tagged by the registry that owns it.
Definition RuntimeHandle.h:116
static constexpr RuntimeHandle invalid() noexcept
Returns the canonical invalid handle.
Definition RuntimeHandle.h:143
Non-owning observation of a registry-owned object.
Definition RuntimeBorrow.h:27
constexpr T * operator->() const noexcept
Pointer-like access to the borrowed object.
Definition RuntimeBorrow.h:54
constexpr std::uint64_t ownerEpoch() const noexcept
Returns the epoch of the owner that produced this observation.
Definition RuntimeBorrow.h:52
constexpr bool isBound() const noexcept
Returns whether the observation currently names an object.
Definition RuntimeBorrow.h:50
constexpr T * get() const noexcept
Returns the observed pointer, or nullptr when unbound.
Definition RuntimeBorrow.h:48
constexpr Borrowed(T &value, std::uint64_t ownerEpoch=0) noexcept
Constructs a Borrowed from a live reference.
Definition RuntimeBorrow.h:35
constexpr T & operator*() const noexcept
Dereferences the borrowed object; the caller owns validity proof.
Definition RuntimeBorrow.h:56
Definition BindingContracts.h:5
Definition Container.h:602
Handle plus owner-lifetime epoch for a non-ECS registry object.
Definition RuntimeBorrow.h:72
friend constexpr bool operator==(const RuntimeHandleRef &, const RuntimeHandleRef &) noexcept=default
constexpr bool isValid() const noexcept
Returns whether both the handle and its registry epoch are set.
Definition RuntimeBorrow.h:77
constexpr std::uint64_t packed() const noexcept
Returns the packed slot/generation projection.
Definition RuntimeBorrow.h:79