We have a situation where we have objects that are somehow linked to other structures (an object references a file on disk in our case). When the deep copy of a data tree is performed, the objects are cloned inside, but we also need a hand on the old and new objects together to be able to copy the associated structure at the same time (cp files on disk here).
I don't see a way to do that currently, we thought about the type filter/type replace but we don't want to "manually" clone the object as would be with this filter, we are perfectly good with the normal cloning, we just need to know when one was cloned to perform the additional operations we need.
What would be the best way to do it? Events? Callbacks? Type filters that can be chained?
We have a situation where we have objects that are somehow linked to other structures (an object references a file on disk in our case). When the deep copy of a data tree is performed, the objects are cloned inside, but we also need a hand on the old and new objects together to be able to copy the associated structure at the same time (cp files on disk here).
I don't see a way to do that currently, we thought about the type filter/type replace but we don't want to "manually" clone the object as would be with this filter, we are perfectly good with the normal cloning, we just need to know when one was cloned to perform the additional operations we need.
What would be the best way to do it? Events? Callbacks? Type filters that can be chained?