Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Callbacks and Timers » Possible improvements to U++ callbacks
Re: Possible improvements to U++ callbacks [message #20580 is a reply to message #20570] Tue, 24 March 2009 12:10 Go to previous message
mirek is currently offline  mirek
Messages: 14265
Registered: November 2005
Ultimate Member
jlfranks wrote on Mon, 23 March 2009 16:43

Your missing Use Case:

We are using U++ callbacks as multi-cast delegates in a
publish-subscribe event message scheme.

Up until now, the subscribers were static, i.e., setup when
objects were instanced at application start-up.

We are starting on Modbus mapping of data <--> modbus
registers using multiple tree controls and callbacks
to do the heavy lifting of data I/O. This mapping is
dynamic at run-time and can be changed by the operator.

This means that the delegate must have the capability of
removing one-of-n callback functions (Subscriber) from
the callback list.

I'm not sure how to do that with PTEBACK().

Can you provide me with more insight on this?

--jlf



Well, PTEBACK probably cannot really solve this issue, because it would leave Callback record intact, only made it "inactive" after destruction of pointeee.

I think that in order to correctly solve this issue, you would have to use some sort Vector<Callback> and unsubscribe command that does remove from this.

There are many possible approaches to the problem..

Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can I stop the timer?
Next Topic: Problem with non-blocking mode
Goto Forum:
  


Current Time: Tue Jul 08 23:14:14 CEST 2025

Total time taken to generate the page: 0.03571 seconds