/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/Func.h

  • Committer: Gustav Hartvigsson
  • Date: 2014-11-24 17:37:05 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20141124173705-iu97keoxp0qfxlxm
* Made code compile

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#ifndef __H_FUNC__
25
25
#define __H_FUNC__
26
26
 
 
27
BEGIN_DECLS
 
28
 
27
29
#include <stdbool.h>
28
30
#include "defs.h"
29
 
#include "utils"
 
31
#include "utils.h"
 
32
#include "baseobject.h"
30
33
 
31
34
/** @file
32
35
 * Generic function pointer definitions and data stuctures to do with
51
54
 
52
55
/**
53
56
 * Generic function.
 
57
 *
 
58
 * It can take any type of function, with any signature
 
59
 */
 
60
typedef void (* FuncPointer)(void);
 
61
 
 
62
/**
54
63
 * 
55
 
 * @param 1 a void pointer to some data
56
 
 * @param 2...n a list of other parameters
57
 
 */
58
 
typedef void * (* SFuncPointer)(void *, ...);
59
 
 
60
 
typedef void (* VoidFunc)();
61
 
 
62
 
typedef void (* MethodFunc)(void *);
63
 
 
 
64
 */
 
65
typedef void (* MethodFunc)(SObject *);
 
66
 
 
67
/**
 
68
 *
 
69
 */
 
70
typedef void (* Callback)(void);
 
71
 
 
72
/**
 
73
 *
 
74
 */
 
75
typedef void (* FreeFunc)(void *);
 
76
 
 
77
#define METHOD(k) ((MethodFunc) k)
 
78
#define FUNCTION(k) ((FuncPointer) k)
 
79
#define FREEFUNC(k) ((FreeFunc) k)
64
80
/**
65
81
 * A CompFunc represents a standard comparison function.
66
82
 * 
73
89
 
74
90
typedef char * (* CharFunc)();
75
91
 
 
92
END_DECLS
 
93
 
76
94
#endif