UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
eventRegister_s Struct Reference

Struct that defines one particular event with all its callbacks and data. More...

#include <e_main.h>

Data Fields

const event_t type
 The type of this event. More...
 
const char * name
 the name of this event (e.g. for logs) More...
 
const char * formatString
 The format string that is used to write and parse this event. More...
 
void(* eventCallback )(const struct eventRegister_s *self, dbuffer *msg)
 Callback that is executing the event. More...
 
int(* timeCallback )(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)
 Callback that is returning the time that is needed to execute this event. More...
 
bool(* eventCheck )(const struct eventRegister_s *self, const dbuffer *msg)
 Called to determine if this event is ok to run at this point. Should check any conflicts with other ongoing events (see LE_LOCKED ). More...
 

Detailed Description

Struct that defines one particular event with all its callbacks and data.

Definition at line 42 of file e_main.h.

Field Documentation

void(* eventRegister_s::eventCallback)(const struct eventRegister_s *self, dbuffer *msg)

Callback that is executing the event.

Parameters
selfA pointer to this struct
msgThe buffer with the event data

Definition at line 60 of file e_main.h.

Referenced by CL_ExecuteBattlescapeEvent(), and CL_ParseEvent().

bool(* eventRegister_s::eventCheck)(const struct eventRegister_s *self, const dbuffer *msg)

Called to determine if this event is ok to run at this point. Should check any conflicts with other ongoing events (see LE_LOCKED ).

Returns
true if OK to run, false if not.

Definition at line 74 of file e_main.h.

Referenced by CL_CheckBattlescapeEvent().

const char* eventRegister_s::formatString

The format string that is used to write and parse this event.

Definition at line 54 of file e_main.h.

Referenced by CL_NetReceiveItem(), and GAME_NetSendItem().

const char* eventRegister_s::name

the name of this event (e.g. for logs)

Definition at line 50 of file e_main.h.

Referenced by CL_DelayBattlescapeEvent(), CL_ExecuteBattlescapeEvent(), CL_FilterBattlescapeEvents(), CL_GetEventTime(), CL_GetNextTime(), CL_LogEvent(), and CL_ParseEvent().

int(* eventRegister_s::timeCallback)(const struct eventRegister_s *self, dbuffer *msg, eventTiming_t *eventTiming)

Callback that is returning the time that is needed to execute this event.

Parameters
selfA pointer to this struct
msgThe buffer with the event data
eventTimingThe delta time value

Definition at line 67 of file e_main.h.

Referenced by CL_GetEventTime().

const event_t eventRegister_s::type

The type of this event.

Definition at line 46 of file e_main.h.


The documentation for this struct was generated from the following file: