2
(C) Gustav Hartvigsson, 2013.
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU Lesser General Public License as
6
published by the Free Software Foundation, either version 3 of the
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
25
* Generic function pointer definitions and data stuctures to do with
28
* @todo create an object type that can hold functions and be able to run them.
33
* This data structure holds a pointer to a function.
35
* A Func object must hold a pointer to a function and can hold a string,
36
* representing its name.
41
* Common types of function pointers:
48
* @param 1 a void pointer to some data
49
* @param 2...n a list of other parameters
51
typedef void * (* SFuncPointer)(void *, ...);
53
typedef void (* VoidFunc)();
55
typedef void (* MethodFunc)(void *);
58
* A CompFunc represents a standard comparison function.
60
* @param 1 object to compare
61
* @param 2 object to compare
63
* compare parameter 1 with parameter 2.
65
typedef bool (* CompFunc)(void*, void*);
67
typedef char * (* CharFunc)();