G
Guest
Hi,
I want to pass a function pointer that is a class member.
This is the fn I want to pass the function pointer into:
int Scheduler::Add(const unsigned long timeout, void* pFunction, void*
pParam)
There is another function where I make the call to the above function:
bool Scheduler::setSchedule(int interval, ComponentInterface&
CliComponent)
{
p_ClientComponent = &CliComponent;
scheduler.Add(interval, CliComponent.runAction); // here
return true;
}
As you can see the above function is passed a reference to the
ComponentInterface class
I want to use the function runAction which is part of the
ComponentInterface class as a parameter to the add function. But this
fails. This is what I need to know, how can I pass this function to the
add function.
void CliComponent::runAction()
This may be easy for some of you but its new to me, please help.
Thanks,
Enda
I want to pass a function pointer that is a class member.
This is the fn I want to pass the function pointer into:
int Scheduler::Add(const unsigned long timeout, void* pFunction, void*
pParam)
There is another function where I make the call to the above function:
bool Scheduler::setSchedule(int interval, ComponentInterface&
CliComponent)
{
p_ClientComponent = &CliComponent;
scheduler.Add(interval, CliComponent.runAction); // here
return true;
}
As you can see the above function is passed a reference to the
ComponentInterface class
I want to use the function runAction which is part of the
ComponentInterface class as a parameter to the add function. But this
fails. This is what I need to know, how can I pass this function to the
add function.
void CliComponent::runAction()
This may be easy for some of you but its new to me, please help.
Thanks,
Enda