Hi Peter,
I’ve been implementing tracker updates in the TrackerManager with the Timer class and I tried as a temporary solution (so I don’t need to merge your branch) this (pointer to class member):
class Timer
...
virtual void start (void (TrackerManagerImpl::*updateTime)(), qint64 timeout) = 0;
...
};
and in the compilation I got this error:
Protocols/BitTorrent/Trackers/Testing/generated/TrackerManagerImplMock.h:51: error: cannot declare field ‘Protocols::BitTorrent::Trackers::Testing::TimerMock::imp’ to be of abstract type ‘Protocols::BitTorrent::Trackers::Testing::TimerMock::Imp’
So I tried only a simple pointer to function parameter:
class Timer
...
virtual void start (void (*)(), qint64 timeout) = 0;
...
};
and that didn’t work either, so I looked into the generated source and the start() function was not there (the error was the same).
It actually doesn’t really matter since I’ll replace this (in the future) with your version with the Callable class and I’ll use an int (as you suggested in your last post) as the first parameter, but I’m just curious - why doesn’t CalitkoMocks parse function with these parameters?
Regards,
Petr
