Add a unique node_id attributes in the node.
Context
In the context of creating a unique id to identify nodes for the model explorer plugin, I propose to add an attribute to every node: node_id
this attribute is set thanks to a global.
For context here is the MR of model explorer: aidge_model_explorer!3 (merged)
Modified files
- Node.hpp: Add a static counter that is incremented when creating a new Node
- Node.cpp: Update ctor to set
node_id
and increment NodeID global var
Edited by Cyril Moineau