|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Implementing realtime variable viewer support |
Date: | Sat, 15 Feb 2014 12:48:45 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi Elias,
I believe deriving from class Symbol is not the right way because there can be multiple pointers to the original symbol around and when you simply replace a symbol in class Workspace then you have a mix of the original and the new derived symbol. I have therefore added a callback function in class Symbol that is called on changes of the symbol. Use it like this: void my_monitor(const Symbol & symbol, Symbol_Event sev) { // ... } Symbol * monitored = ... monitored->set_monitor_callback(my_monitor); // start monitoring monitored->set_monitor_callback(0); // stop monitoring See SVN 124. /// Jürgen On 02/12/2014 05:58 AM, Elias Mårtenson wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |