Open tap opened 9 years ago
+1 for smart_pointers ! and I never seen any object called TTObserver. Is this class isn't relative to the TTCallback class (which can be used to observe notifications send from another class) ? is the TTCallback will still be useful ?
I also mention that for the time being if I change an attribute I have to take care to notify its observers (which is normal but a bit convoluted : see here in TTData::notifyObservers)).
And finally why we don't have TTNotification class for a TTObject like we have TTAttribute and TTMessage ?
this would match the Max concept of parameter, message and return and maybe allow to move them directly at the TTObject level (for the record we currently need to create a TTData with @service equal to "parameter", "message" or "return"). Of course this will implies to move all the TTData internal processings inside what we call the TTAttribute "properties" with a smart design pattern to allow to choose which kind of processing we want to make on the values (repetition filtering, ramping, ...).
is this make sense for you @tap ?
Over the years both @theod and I have been bitten some really difficult to track bugs stemming from pointers going out of scope or leaking in the observer and notification system. This is still at the heart of our worst AudioGraph problems that we need to solve.
I have two insights that together could revolutionize our system:
This implies that TTObject ref counting and other "smart pointer" stuff which we have implemented manually migrate to standard C++ smart pointers.