DynamicAttributes refactor
This MR adds attributes (DynamicAttributes) to nodes and make them accessible from operators (as inheritedAttributes). It also includes some improvements of the DynamicAttributes class.
-
Use a single mAttrsmap common to C++ and Python (as suggested in eclipse/aidge/aidge_core#147 by @cguillon, however this does not really permit a clean separation with PyBind for now); -
Fix possible segfault at exit because of py::object (@mick94 this will solve your issue); -
Added a DynamicAttributesmember toNode:-
Nodename is now an optional attribute (named "name"); - Added a mechanism to pass
Nodeattribute to theOperator(called "inheritedAttributes"); - Attribute namespace "impl" is automatically passed to the implementation requirements (
ImplSpec); - @cguillon I think this may be interesting for you.
-
-
Implement hashable DynamicAttributes.
API change:
-
T getAttr() constreturns a copy instead of a const reference.
Edited by Olivier BICHLER