|
YOrch 1.0.0
|
Non-owning typed access view over a slot-like storage object. More...
#include <slot_view.hpp>
Public Member Functions | |
| template<typename Slot > requires (!std::is_same_v<std::remove_cvref_t<Slot>, slot_view>) | |
| constexpr | slot_view (Slot &slot, std::size_t owner_node=no_physical_slot) noexcept |
Creates a typed view over slot. | |
| slot_view ()=default | |
| template<typename... Args> | |
| constexpr T & | emplace (Args &&... args) noexcept(std::is_nothrow_constructible_v< T, Args &&... >) |
| constexpr T & | get () &noexcept |
| constexpr const T & | get () const &noexcept |
| constexpr void | destroy () noexcept |
| constexpr bool | has_value () const noexcept |
Public Attributes | |
| std::byte * | storage = nullptr |
| bool * | engaged = nullptr |
| std::size_t * | slot_owner_node = nullptr |
| std::size_t | view_owner_node = no_physical_slot |
| slot_physical_policy | policy = slot_physical_policy::maybe_payload |
Non-owning typed access view over a slot-like storage object.
slot_view<T> lets higher layers treat either a typed_slot<T, ...> or an erased compact-layout slot as storage for T. It carries the physical policy because maybe slots need an engagement flag while must slots do not. For erased compact slots, it also carries owner-node tracking so a later cleanup pass can know which node's T currently lives inside the shared raw storage.
Definition at line 24 of file slot_view.hpp.
|
inlineexplicitconstexprnoexcept |
Creates a typed view over slot.
owner_node is written into the underlying owner-node record when the view materializes a value. Typed one-to-one slots return a null owner record, while erased compact slots use it to remember which node owns the currently live object.
Definition at line 46 of file slot_view.hpp.
|
default |
|
inlineconstexprnoexcept |
Definition at line 96 of file slot_view.hpp.
|
inlineconstexprnoexcept |
Definition at line 56 of file slot_view.hpp.
|
inlineconstexprnoexcept |
Definition at line 78 of file slot_view.hpp.
|
inlineconstexprnoexcept |
Definition at line 87 of file slot_view.hpp.
|
inlineconstexprnoexcept |
Definition at line 116 of file slot_view.hpp.
Definition at line 29 of file slot_view.hpp.
Definition at line 34 of file slot_view.hpp.
| std::size_t* yorch::detail::slot_view< T >::slot_owner_node = nullptr |
Definition at line 31 of file slot_view.hpp.
| std::byte* yorch::detail::slot_view< T >::storage = nullptr |
Definition at line 28 of file slot_view.hpp.
| std::size_t yorch::detail::slot_view< T >::view_owner_node = no_physical_slot |
Definition at line 33 of file slot_view.hpp.