CppUtils::Container::NetworkPtr<class T>
CLASSGraph node wrapper managing cyclic references deterministically via root-distance tracking.
Description
Section titled “Description”| Template parameter | Description |
|---|---|
T | Payload type stored inside the node. |
Public types
Section titled “Public types”using CppUtils::Container::NetworkPtr<T>::Value = T;SharedPtr
Section titled “SharedPtr”using CppUtils::Container::NetworkPtr<T>::SharedPtr = SafeShared<NetworkPtr<T>>;WeakPtr
Section titled “WeakPtr”using CppUtils::Container::NetworkPtr<T>::WeakPtr = SafeWeak<NetworkPtr<T>>;Accessor
Section titled “Accessor”using CppUtils::Container::NetworkPtr<T>::Accessor = Thread::Accessor<NetworkPtr<T>, Thread::SharedMutex>;Public attributes
Section titled “Public attributes”Public methods
Section titled “Public methods”Returns true if this node is marked as a root.
Returns true if this node is neither a root nor attached to any parent.
Marks or unmarks this node as a root.
Stores the weak self-reference used when registering parent/child links.
Returns the shortest hop distance from any root node (or max() if unreachable).
Attaches childValue as a child of this node, promoting or demoting the link strength based on root distance.
| Parameter | Description |
|---|---|
std::logic_error | if the child handle is expired or this parent has no root path. |
Detaches childValue from this node and updates root distances across affected descendants.
| Parameter | Description |
|---|---|
childValue | Child node to unlink from this parent. |
Detaches all children from this node and updates root distances across affected descendants.
Detaches this node from parent.
| Parameter | Description |
|---|---|
parent | Parent node handle to unlink from. |
Removes all back-references to this node from its registered parents.
Allocates a non-root node wrapped in a SafeShared.
| Parameter | Description |
|---|---|
args | Arguments forwarded to construct T. |
Allocates a root node wrapped in a SafeShared.
| Parameter | Description |
|---|---|
args | Arguments forwarded to construct T. |