Hi Elias,

The name of a Symbol uniquely identifies a symbol within one Workspace (and there is only one Workspace).

The only cases where the pointer changes is when a new workspace with the same symbol name
is loaded or when the symbol is explicitly )ERASEd or  ?EXed.

I all these cases you should get an SEV_ERASED event via the callback function.
After that event the pointer is no longer valid and should be discarded. You
should never ignore an SEV_ERASED event.

/// Jürgen


On 02/16/2014 05:03 PM, Elias Mårtenson wrote:
Hello Jürgen,

In my work to implement the variable viewer, I need some information from you, if you are willing to share.

When the user closes the last trace window for a symbol, the system needs to unregister the listener for this symbol. This means I need to know what I can use to uniquely identify a symbol.

Since there can be multiple symbols with the same name in different workspaces, I clearly can't use the name as identifier.

The easiest thing to use would of course be the pointer to the Symbol instance itself. However, I don't know if I can rely on this never changing. Can this instance ever be changed? I.e. can I use &symbol as a key into a std::map that tracks all active listeners?

Regards,
Elias




Reply via email to