Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Provide a generic funcdef for application functions

$
0
0

I have a use case for a generic funcdef where all functions should be accepted for the parameter.

 

This is the code that requires it:

https://github.com/Solokiller/AngelscriptUtils/blob/7a3a71ab613d74b8d315e2a1c30dc2c8930540d5/include/AngelscriptUtils/ScriptAPI/Scheduler.h

https://github.com/Solokiller/AngelscriptUtils/blob/7a3a71ab613d74b8d315e2a1c30dc2c8930540d5/src/AngelscriptUtils/ScriptAPI/Scheduler.cpp

 

Basically i have a scheduler class that can execute a function at a later point in time. The caller passes in a function handle to do this. Right now that function handle parameter is a ?& in parameter type, but this means there is no compile time checking going …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>