|
GATE
C/C++ Framework
|
Generic encapsulation of callbacks for functions and objects. More...
#include "gate/gate_core_api.h"#include "gate/gatetypes.h"#include "gate/memalloc.h"#include <stdarg.h>Macros | |
| #define | GATE_DELEGATE_BIND_OBJ(delegate_name, delegate_ptr, function, obj_ptr) |
| Initializes a gate_delegate_t instance with dispatchers for a specific target function bound to an object pointer. | |
| #define | GATE_DELEGATE_BIND_FUNC(delegate_name, delegate_ptr, function) |
| Initializes a gate_delegate_t instance with dispatchers for a specific target function. | |
| #define | GATE_DELEGATE_DECLARE_0(delegate_name) |
| Builds delegate dispatcher types to be used for target code with no arguments. | |
| #define | GATE_DELEGATE_DECLARE_1(delegate_name, type1) |
| Builds delegate dispatcher types to be used for target code with 1 argument. | |
| #define | GATE_DELEGATE_DECLARE_2(delegate_name, type1, type2) |
| Builds delegate dispatcher types to be used for target code with 2 arguments. | |
| #define | GATE_DELEGATE_DECLARE_3(delegate_name, type1, type2, type3) |
| Builds delegate dispatcher types to be used for target code with 3 arguments. | |
| #define | GATE_DELEGATE_DECLARE_4(delegate_name, type1, type2, type3, type4) |
| Builds delegate dispatcher types to be used for target code with 4 arguments. | |
| #define | GATE_DELEGATE_DECLARE_5(delegate_name, type1, type2, type3, type4, type5) |
| Builds delegate dispatcher types to be used for target code with 5 arguments. | |
| #define | GATE_DELEGATE_DECLARE_6(delegate_name, type1, type2, type3, type4, type5, type6) |
| Builds delegate dispatcher types to be used for target code with 6 arguments. | |
Functions | |
| GATE_CORE_API gate_result_t | gate_delegate_invoke (gate_delegate_t const *delegate_ptr,...) |
| Invokes a delegate object with all provided variable arguments. | |
Generic encapsulation of callbacks for functions and objects.
| #define GATE_DELEGATE_BIND_OBJ | ( | delegate_name, | |
| delegate_ptr, | |||
| function, | |||
| obj_ptr ) |
Initializes a gate_delegate_t instance with dispatchers for a specific target function bound to an object pointer.
| delegate_name | Base name of delegate-types that was created my GATE_DELEGATE_DECLARE_* macros |
| delegate_ptr | Pointer to gate_delegate_t type to be initialized |
| function | Pointer to target method function to be covered by delegate |
| obj_ptr | Pointer to target object that is used as first argument (this-pointer) for function |
| #define GATE_DELEGATE_BIND_FUNC | ( | delegate_name, | |
| delegate_ptr, | |||
| function ) |
Initializes a gate_delegate_t instance with dispatchers for a specific target function.
| delegate_name | Base name of delegate-types that was created my GATE_DELEGATE_DECLARE_* macros |
| delegate_ptr | Pointer to gate_delegate_t type to be initialized |
| function | Pointer to target function to be covered by delegate |
| #define GATE_DELEGATE_DECLARE_0 | ( | delegate_name | ) |
Builds delegate dispatcher types to be used for target code with no arguments.
| delegate_name | Base name of delegate-types that is used as prefix for internally generated dispatcher functions |
| #define GATE_DELEGATE_DECLARE_1 | ( | delegate_name, | |
| type1 ) |
Builds delegate dispatcher types to be used for target code with 1 argument.
| delegate_name | Base name of delegate-types that is used as prefix for internally generated dispatcher functions |
| type1 | Type of first argument |
| #define GATE_DELEGATE_DECLARE_2 | ( | delegate_name, | |
| type1, | |||
| type2 ) |
Builds delegate dispatcher types to be used for target code with 2 arguments.
| delegate_name | Base name of delegate-types that is used as prefix for internally generated dispatcher functions |
| type1 | Type of first argument |
| type2 | Type of second argument |
| #define GATE_DELEGATE_DECLARE_3 | ( | delegate_name, | |
| type1, | |||
| type2, | |||
| type3 ) |
Builds delegate dispatcher types to be used for target code with 3 arguments.
| delegate_name | Base name of delegate-types that is used as prefix for internally generated dispatcher functions |
| type1 | Type of 1st argument |
| type2 | Type of 2nd argument |
| type3 | Type of 3rd argument |
| #define GATE_DELEGATE_DECLARE_4 | ( | delegate_name, | |
| type1, | |||
| type2, | |||
| type3, | |||
| type4 ) |
Builds delegate dispatcher types to be used for target code with 4 arguments.
| delegate_name | Base name of delegate-types that is used as prefix for internally generated dispatcher functions |
| type1 | Type of 1st argument |
| type2 | Type of 2nd argument |
| type3 | Type of 3rd argument |
| type4 | Type of 4th argument |
| #define GATE_DELEGATE_DECLARE_5 | ( | delegate_name, | |
| type1, | |||
| type2, | |||
| type3, | |||
| type4, | |||
| type5 ) |
Builds delegate dispatcher types to be used for target code with 5 arguments.
| delegate_name | Base name of delegate-types that is used as prefix for internally generated dispatcher functions |
| type1 | Type of 1st argument |
| type2 | Type of 2nd argument |
| type3 | Type of 3rd argument |
| type4 | Type of 4th argument |
| type5 | Type of 5th argument |
| #define GATE_DELEGATE_DECLARE_6 | ( | delegate_name, | |
| type1, | |||
| type2, | |||
| type3, | |||
| type4, | |||
| type5, | |||
| type6 ) |
Builds delegate dispatcher types to be used for target code with 6 arguments.
| delegate_name | Base name of delegate-types that is used as prefix for internally generated dispatcher functions |
| type1 | Type of 1st argument |
| type2 | Type of 2nd argument |
| type3 | Type of 3rd argument |
| type4 | Type of 4th argument |
| type5 | Type of 5th argument |
| type6 | Type of 6th argument |
| GATE_CORE_API gate_result_t gate_delegate_invoke | ( | gate_delegate_t const * | delegate_ptr, |
| ... ) |
Invokes a delegate object with all provided variable arguments.
| [in] | delegate_ptr | Pointer to delegate object that covers the destination function or method |