Adonthell
0.4
Main Page
Related Pages
Classes
Files
File List
File Members
event_handler_base.h
Go to the documentation of this file.
1
/*
2
$Id: event_handler_base.h,v 1.4 2002/08/18 19:53:16 ksterker Exp $
3
4
Copyright (C) 2000/2001/2002 Kai Sterker <kaisterker@linuxgames.com>
5
Part of the Adonthell Project http://adonthell.linuxgames.com
6
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY.
11
12
See the COPYING file for more details.
13
*/
14
15
16
/**
17
* @file event_handler_base.h
18
* @author Kai Sterker <kaisterker@linuxgames.com>
19
*
20
* @brief Declares the base class for event handlers.
21
*
22
*/
23
24
#ifndef EVENT_HANDLER_BASE_H__
25
#define EVENT_HANDLER_BASE_H__
26
27
#include "
event.h
"
28
29
/**
30
* This is the base class for actual event handlers. It
31
* keeps track of registered scripts, recieves triggered events
32
* and executes scripts handling those events
33
*/
34
class
event_handler_base
35
{
36
public
:
37
38
/**
39
* Destructor
40
*/
41
virtual
~event_handler_base
() {}
42
43
/**
44
* Registers an %event.
45
*
46
* @param ev pointer to the %event to register.
47
*/
48
virtual
void
register_event
(
event
* ev) = 0;
49
50
/**
51
* Unregister an %event.
52
*
53
* @param ev pointer to the %event to unregister.
54
*/
55
virtual
void
remove_event
(
event
* ev) = 0;
56
57
/**
58
* Check if an %event corresponding to ev exists, and execute it.
59
*
60
* @param ev %event to raise.
61
*/
62
virtual
void
raise_event
(
const
event
* ev) = 0;
63
};
64
65
#endif // EVENT_HANDLER_BASE_H__
src
event_handler_base.h
Generated by
1.8.1.2