Adonthell  0.4
event_list.h File Reference

Declares the event_list class. More...

#include <vector>
#include "event.h"
Include dependency graph for event_list.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  event_list
 Base class for objects that want to register events. More...
 

Macros

#define REGISTER_EVENT(type, evt)   event_list::register_event (type, (new_event) &new_ ## evt);
 Registers an event with the event_list, allowing it to load this event without knowing about it at compile time. More...
 
#define NEW_EVENT(evt)   event* new_ ## evt () { return (event*) new evt; }
 A function that returns a new instance of an event. More...
 

Typedefs

typedef event *(* new_event) ()
 Pointer to a function returning a newly allocated event. More...
 

Detailed Description

Declares the event_list class.

Author
Kai Sterker kai.s.nosp@m.terk.nosp@m.er@gm.nosp@m.ail..nosp@m.com

Definition in file event_list.h.

Macro Definition Documentation

§ REGISTER_EVENT

#define REGISTER_EVENT (   type,
  evt 
)    event_list::register_event (type, (new_event) &new_ ## evt);

Registers an event with the event_list, allowing it to load this event without knowing about it at compile time.

Definition at line 197 of file event_list.h.

§ NEW_EVENT

#define NEW_EVENT (   evt)    event* new_ ## evt () { return (event*) new evt; }

A function that returns a new instance of an event.

Definition at line 203 of file event_list.h.

Typedef Documentation

§ new_event

typedef event*(* new_event) ()

Pointer to a function returning a newly allocated event.

Definition at line 41 of file event_list.h.