core: Add proxy to core

This MR is a spinoff of the GSoC 2023 NetAnim work.

The problem is: suppose you have two Node object, and you try to aggregate another Object (let's say NetAnimWriter) to both nodes. This doesn't work, because if A is aggregated to B, then B is also aggregated to A (aggregation is mutual). Hence, when you do the second aggregation the process fails because there's already a Node aggregated to NetAnimWriter.

Adding an aggregation hierarchy doesn't work either, for similar reasons.

The solution (suggested by @pdbj) is to have a Proxy object, and here's the implementation.

The only difference is the PeekPointer function, which is necessary when you want to recover the Ptr<T> of the proxied object. There might be a better solution, but we didn't find one (@raghuramkannan40 and @tommypec). Suggestions are welcome - also for the name of the function.

Edited by Tommaso Pecorella

Merge request reports

Loading