CppUtils::Container::MeshNodePtr<class Key, class Value, class Policy = void>
CLASSThread-safe handle to a node in a non-hierarchical cyclic mesh graph.
Description
Section intitulée « Description »| Paramètre template | Description |
|---|---|
Key | Branch key type. |
Value | Payload value type stored inside each node. |
Policy | Optional lazy-resolution policy type (e.g. MeshPager::Policy), or void when disabled. |
Types publics
Section intitulée « Types publics »MutableBranch
Section intitulée « MutableBranch »using CppUtils::Container::MeshNodePtr<Key, Value, Policy>::MutableBranch = Branch<false>;Read-write branch proxy holding a unique lock.
ConstBranch
Section intitulée « ConstBranch »using CppUtils::Container::MeshNodePtr<Key, Value, Policy>::ConstBranch = Branch<true>;Read-only branch proxy holding a shared lock.
Méthodes publiques
Section intitulée « Méthodes publiques »Creates a root node that keeps reachable subgraphs alive.
| Paramètre | Description |
|---|---|
args | Arguments forwarded to construct Value. |
Retourne : Handle to the newly created root node.
Creates a standalone node (unattached until linked from a rooted node).
| Paramètre | Description |
|---|---|
args | Arguments forwarded to construct Value. |
Retourne : Handle to the newly created node.
Constructs an empty (null) MeshNodePtr.
Constructs a MeshNodePtr from an existing underlying SharedPtr.
[[nodiscard]] constexpr auto MeshNodePtr::operator==(const MeshNodePtr& other) const noexcept -> bool;Checks instance identity (whether both handles point to the same node in memory).
Returns true if this handle references a valid node.
Accesses the branch identified by key.
Creates the branch if absent on a mutable handle (MutableBranch), or performs a read-only lookup on a const handle (ConstBranch). | Paramètre | Description |
| :--- | :--- |
| key | Branch identifier. |
Retourne : A Branch proxy holding an RAII lock on the branch.
| Paramètre | Description |
|---|---|
std::runtime_error | if the handle is null, or std::out_of_range on a const handle when key is missing. |
[[nodiscard]] constexpr auto MeshNodePtr::at(Type::In<Key> key) const -> std::expected<ConstBranch, std::string_view>;Safely looks up a read-only branch without throwing on missing keys.
| Paramètre | Description |
|---|---|
key | Branch identifier. |
Retourne : ConstBranch on success, or an error string if the handle is invalid or key is absent.
Checks whether a branch with key exists on this node.
Returns the shortest hop distance from any root node (or std::numeric_limits<std::size_t>::max() if unreachable).
Returns the numeric identifier assigned to this node (0 if unassigned).
Assigns a numeric identifier to this node.
Attaches or updates the lazy-resolution policy on this node.
[[nodiscard]] constexpr auto MeshNodePtr::operator->(this auto&& self [[clang::lifetimebound, msvc::lifetimebound]]);Provides pointer-like access to the underlying SharedLocker<NetworkPtr<MeshNode>>.
[[nodiscard]] constexpr auto MeshNodePtr::operator*(this auto&& self [[clang::lifetimebound, msvc::lifetimebound]]) -> decltype(auto);Dereferences the underlying SharedLocker<NetworkPtr<MeshNode>>.
Updates the node’s payload value in a thread-safe manner.
Acquires a shared read-only RAII accessor to the node’s payload value.