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++ Library : Other (not classified elsewhere) » templated callback
Re: templated callback [message #39683 is a reply to message #39661] Wed, 17 April 2013 11:00 Go to previous messageGo to previous message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
Didier wrote on Mon, 15 April 2013 20:02

Hi crydev,

I think an example would help us understand the coding issue that gives you some problems



I`m sorry, I should give some code to make it more clear. I have a situation like this.

I have this parameter class to pass a templated parameter containing any data I need to my worker function.

class ParameterBase
{
     // general data that applies for any templated type.
};

template <class T>
class WorkerParameters<T> : public ParameterBase
{
     T data;
};


Say my UI initiates this function, which calls my callback function using the given template. In the ideal situation that is possible, making me able to send my templated data to the UI.

template <class T>
void Worker(ParameterBase* pParams)
{
     UICallback<T>();     
}


What I already tried is creating a new class deriving from the Callback using a template I can alter in that class. No luck though. It is not possible to attach a function properly to THISBACK in my UI. Sad

Thanks in advance!
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Console data not searchable
Next Topic: About RS232
Goto Forum:
  


Current Time: Sat Aug 23 15:03:14 CEST 2025

Total time taken to generate the page: 0.03863 seconds