EntropyEngine::Core::Graph::AcyclicNodeHandle
EntropyEngine::Core::Graph::AcyclicNodeHandle
Section titled “EntropyEngine::Core::Graph::AcyclicNodeHandle”Lightweight, stamped handle to a node in a DirectedAcyclicGraph
#include <AcyclicNodeHandle.h>
Inherits from EntropyEngine::Core::EntropyObject
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| AcyclicNodeHandle & | operator=(const AcyclicNodeHandle & other) Copies or clears the stamped identity depending on source validity. |
| AcyclicNodeHandle & | operator=(AcyclicNodeHandle && other) Move-assigns by copying or clearing identity based on source validity. |
| virtual const char * | className() const override Runtime type name for diagnostics. |
| virtual uint64_t | classHash() const override Stable type hash for cross-language identification. |
| AcyclicNodeHandle() =default Default-constructed handle with no identity (invalid). | |
| AcyclicNodeHandle(GraphT * graph, uint32_t index, uint32_t generation) Internal constructor used by DirectedAcyclicGraph to stamp identity. | |
| AcyclicNodeHandle(const AcyclicNodeHandle & other) Copies the stamped identity from another handle (if present). | |
| AcyclicNodeHandle(AcyclicNodeHandle && other) Moves by copying the stamped identity (handles are lightweight). |
Friends
Section titled “Friends”| Name | |
|---|---|
| class | DirectedAcyclicGraph |
Additional inherited members
Section titled “Additional inherited members”Protected Classes inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| struct | HandleCore Optional handle identity stamped by an owner/registry. |
Public Functions inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| virtual | ~EntropyObject() =default |
| virtual const TypeSystem::TypeInfo * | typeInfo() const Optional richer type information; may be null. |
| bool | tryRetain() const Attempts to retain only if the object is still alive. |
| virtual std::string | toString() const Human-readable short string (class@ptr by default). |
| void | retain() const Increments the reference count. |
| void | release() const Decrements the reference count and deletes when it reaches zero. |
| uint32_t | refCount() const Current reference count (approximate under contention). |
| bool | hasHandle() const |
| template <class OwnerT > OwnerT * | handleOwnerAs() const Returns the stamped owner pointer cast to the requested type. |
| const void * | handleOwner() const |
| uint32_t | handleIndex() const |
| uint64_t | handleId() const |
| uint32_t | handleGeneration() const |
| WeakControlBlock * | getWeakControlBlock() const Lazily retrieves or creates the weak control block. |
| virtual std::string | description() const Long-form description; defaults to toString(). |
| virtual std::string | debugString() const Debug-oriented string including refcount and handle when present. |
| EntropyObject() =default | |
| EntropyObject(EntropyObject && ) =delete | |
| EntropyObject(const EntropyObject & ) =delete |
Protected Functions inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| void | _setHandleIdentity(void * owner, uint32_t index, uint32_t generation) |
| void | _clearHandleIdentity() |
Protected Attributes inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| std::atomic< WeakControlBlock * > | _weakBlock Lazily allocated control block for weak refs. |
| std::atomic< uint32_t > | _refCount Thread-safe retain/release counter. |
| struct EntropyEngine::Core::EntropyObject::HandleCore | _handle |
Friends inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| struct | HandleAccess |
Detailed Description
Section titled “Detailed Description”template <class T >class EntropyEngine::Core::Graph::AcyclicNodeHandle;Lightweight, stamped handle to a node in a DirectedAcyclicGraph
AcyclicNodeHandle
using namespace EntropyEngine::Core::Graph;DirectedAcyclicGraph<int> dag;auto a = dag.addNode(1);auto b = dag.addNode(2);dag.addEdge(a, b); // b depends on a
// Validate and access dataif (dag.isHandleValid(a)) { int* data = dag.getNodeData(a); if (data) { *data = 42; }}
// Equality compares owner and stamped id (index:generation)bool same = (a == a);bool different = (a != b);Public Functions Documentation
Section titled “Public Functions Documentation”function operator=
Section titled “function operator=”inline AcyclicNodeHandle & operator=( const AcyclicNodeHandle & other)Copies or clears the stamped identity depending on source validity.
function operator=
Section titled “function operator=”inline AcyclicNodeHandle & operator=( AcyclicNodeHandle && other)Move-assigns by copying or clearing identity based on source validity.
function className
Section titled “function className”inline virtual const char * className() const overrideRuntime type name for diagnostics.
Reimplements: EntropyEngine::Core::EntropyObject::className
function classHash
Section titled “function classHash”inline virtual uint64_t classHash() const overrideStable type hash for cross-language identification.
Reimplements: EntropyEngine::Core::EntropyObject::classHash
function AcyclicNodeHandle
Section titled “function AcyclicNodeHandle”AcyclicNodeHandle() =defaultDefault-constructed handle with no identity (invalid).
function AcyclicNodeHandle
Section titled “function AcyclicNodeHandle”inline AcyclicNodeHandle( GraphT * graph, uint32_t index, uint32_t generation)Internal constructor used by DirectedAcyclicGraph to stamp identity.
Parameters:
- graph Owning graph that stamps the handle
- index Slot index within the graph
- generation Generation counter for stale-handle detection
function AcyclicNodeHandle
Section titled “function AcyclicNodeHandle”inline AcyclicNodeHandle( const AcyclicNodeHandle & other)Copies the stamped identity from another handle (if present).
function AcyclicNodeHandle
Section titled “function AcyclicNodeHandle”inline AcyclicNodeHandle( AcyclicNodeHandle && other)Moves by copying the stamped identity (handles are lightweight).
Friends
Section titled “Friends”friend DirectedAcyclicGraph
Section titled “friend DirectedAcyclicGraph”friend class DirectedAcyclicGraph( DirectedAcyclicGraph);Updated on 2026-01-26 at 17:14:35 -0500