Papageno
An Advanced Pattern Matching Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Typedefs | Functions
ppg_action.h File Reference
#include "ppg_signals.h"
#include <stddef.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  PPG_Action_Callback
 The PPG_Action_Callback struct groups use callback information in an object oriented fashion (functor). More...
 
struct  PPG_Action
 Action information. More...
 

Macros

#define PPG_ACTION_USER_CALLBACK(FUNC, USER_DATA)
 Use this macro to simplify specification of action callbacks. More...
 
#define PPG_ACTION_NOOP
 Use this macro to specify an action that does nothing. More...
 

Typedefs

typedef void(* PPG_Action_Callback_Fun )(bool activation, void *user_data)
 Function type of user callback functions. More...
 

Functions

void ppg_action_callback_init (PPG_Action_Callback *cb)
 This function initializes an action callback. More...
 

Macro Definition Documentation

#define PPG_ACTION_NOOP
Value:
.callback = (PPG_Action_Callback) { \
.func = NULL, \
.user_data = NULL \
} \
}
Action information.
Definition: ppg_action.h:55
The PPG_Action_Callback struct groups use callback information in an object oriented fashion (functor...
Definition: ppg_action.h:37

Use this macro to specify an action that does nothing.

#define PPG_ACTION_USER_CALLBACK (   FUNC,
  USER_DATA 
)
Value:
.callback = (PPG_Action_Callback) { \
.func = (PPG_Action_Callback_Fun)FUNC, \
.user_data = USER_DATA \
} \
}
Action information.
Definition: ppg_action.h:55
The PPG_Action_Callback struct groups use callback information in an object oriented fashion (functor...
Definition: ppg_action.h:37
void(* PPG_Action_Callback_Fun)(bool activation, void *user_data)
Function type of user callback functions.
Definition: ppg_action.h:32

Use this macro to simplify specification of action callbacks.

Parameters
FUNCThe callback function pointer
USER_DATAA pointer to user data or NULL if none is required

Typedef Documentation

typedef void(* PPG_Action_Callback_Fun)(bool activation, void *user_data)

Function type of user callback functions.

Parameters
activationIf true, the callback signals the activation (match) of a token, and deactivation otherwise
user_dataOptional user data.

Function Documentation

void ppg_action_callback_init ( PPG_Action_Callback cb)
inline

This function initializes an action callback.

Parameters
cbA pointer to the callback struct