ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation.scoms.kobject.ref Module Reference

Data Structures

class  zxfoundation::scoms::kobject::robject< T, State >
 Zero-overhead, typestate-tracked, reference-counted handle. More...

Functions

auto abort () &&noexcept -> robject< T, lifecycle_state::dying >
 embryo → dying (creation aborted before activation).
static auto acquire (T *p) noexcept -> robject< T, State >
 Construct from a raw pointer, incrementing the refcount.
auto activate () &&noexcept -> robject< T, lifecycle_state::active >
 sealed → active.
auto activate () &&noexcept -> robject< T, lifecycle_state::active >
 embryo → active.
auto begin_destroy () &&noexcept -> robject< T, lifecycle_state::dying >
 active | suspended → dying.
static auto from_raw_noref (T *p) noexcept -> robject< T, State >
 Construct from a raw pointer WITHOUT incrementing the.
auto generation () const noexcept -> u32
 Get the kobject generation (shorthand for ptr_->ko.generation).
auto id () const noexcept -> u32
 Get the kobject ID (shorthand for ptr_->ko.id).
template<typename T>
auto zxfoundation::scoms::kobject::mark_destroyed (T *obj) noexcept -> bool
 Convenience: write destroyed with validation.
template<typename T>
auto zxfoundation::scoms::kobject::mark_dying (T *obj) noexcept -> bool
 Convenience: write dying with validation.
template<typename T>
auto zxfoundation::scoms::kobject::mark_suspended (T *obj) noexcept -> bool
 Convenience: write suspended with validation.
 operator bool () const noexcept
auto operator* () const noexcept -> T &
auto operator-> () const noexcept -> T *
auto operator= (const robject &other) noexcept -> robject &
auto operator= (robject &&other) noexcept -> robject &
auto raw () const noexcept -> T *
auto release () noexcept -> T *
 Release ownership WITHOUT decrementing the refcount.
auto resume () &&noexcept -> robject< T, lifecycle_state::active >
 suspended → active.
 robject () noexcept=default
 Default — null handle.
 robject (const robject &other) noexcept
 robject (robject &&other) noexcept
 robject (T *p) noexcept
 Acquire a reference to an existing object.
auto seal () &&noexcept -> robject< T, lifecycle_state::sealed >
 embryo → sealed.
auto suspend () &&noexcept -> robject< T, lifecycle_state::suspended >
 active → suspended.
template<typename T>
auto zxfoundation::scoms::kobject::swap_state_to (::zxfoundation::base::lifecycle_state target, T *obj) noexcept -> bool
 Runtime-validated state transition for raw pointers.
 ~robject () noexcept
 Release the reference.

Files

file  zxfoundation/scoms/kobject.zcomponent/ref.cxxm