Public Member Functions

map_event_handler Class Reference

This class keeps track of map events, i.e. More...

#include <map_event_handler.h>

Inheritance diagram for map_event_handler:
Inheritance graph
[legend]
Collaboration diagram for map_event_handler:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void register_event (event *evnt)
 Register a map event with the event handler.
void remove_event (event *evnt)
 Removes the given event from the event handler.
void raise_event (const event *evnt)
 Raise one or more events in case the given 'trigger' matches.

Detailed Description

This class keeps track of map events, i.e.

events that are raised when a character enters or leaves a tile, or initiates an action.

Definition at line 34 of file map_event_handler.h.


Member Function Documentation

void map_event_handler::register_event ( event evnt  )  [virtual]

Register a map event with the event handler.

The event needs to be removed before it can be safely deleted.

Parameters:
evnt Pointer to the event to be registered.

Implements event_handler_base.

Definition at line 61 of file map_event_handler.cc.

void map_event_handler::remove_event ( event evnt  )  [virtual]

Removes the given event from the event handler.

Once it is no longer needed, it can be freed.

Parameters:
evnt Pointer to the event to be removed.

Implements event_handler_base.

Definition at line 49 of file map_event_handler.cc.

void map_event_handler::raise_event ( const event evnt  )  [virtual]

Raise one or more events in case the given 'trigger' matches.

Unless they need to be repeated, they are removed from the event-vector.

Parameters:
evnt A map_event structure.

Implements event_handler_base.

Definition at line 29 of file map_event_handler.cc.


The documentation for this class was generated from the following files: