You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using observers, is there a way to access the underlying object implementing the observer?
class myClass {...}
myClass mc = new myClass;
auto observer1 = makeObserver(&mc.myPut);
How can I access/get back mc via observer1?
Since there are several different ways to get an observer (makeObserver which returns an AnonymousObserver struct, inheritance, observerObject) how can I get the pointer/reference to the underlying object/function implementing the functions?
How to access the pointer created by TestObserver() call?
The use case is: An instance of myClass can have many observers. These observers are handled around and subscribed to streams etc. Sometimes I need to get back the object an observer belongs to call some functions etc.
The text was updated successfully, but these errors were encountered:
When using observers, is there a way to access the underlying object implementing the observer?
How can I access/get back mc via observer1?
Since there are several different ways to get an observer (makeObserver which returns an AnonymousObserver struct, inheritance, observerObject) how can I get the pointer/reference to the underlying object/function implementing the functions?
How to access the pointer created by TestObserver() call?
The use case is: An instance of myClass can have many observers. These observers are handled around and subscribed to streams etc. Sometimes I need to get back the object an observer belongs to call some functions etc.
The text was updated successfully, but these errors were encountered: