Search Code
About FunctionPointers

Published 11 Dec 2011.

Last change message: N/A

Import this program

FunctionPointers

Published 11 Dec 2011, by   user Rene Greiner   tag No tags

Summary of FunctionPointers

How to get this program

Import this program

Open this program in the mbed Compiler, where you can edit it and compile it for your hardware.

Download as .zip

Download this program as .zip file.

Description

Modified version of Andy Kirkhams FPointer.h http://mbed.org/users/AjK/libraries/FPointer/ll7nhv Advantages: - reduced size of from 12 -> 8 byte by usage of a unnamed union - speedup function call by removing one error check - replaced call() function by () operator - templated: you can define the return and argument types - implementations provided for 1 and 2 arguments, easy extendable to more arguments

Code

FunctionPointers.h [code]
main.cpp [code]