home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ Games Programming
/
CPPGAMES.ISO
/
thx
/
include
/
handler.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-08
|
541b
|
31 lines
// ------------ handler.h
#ifndef HANDLER_H
#define HANDLER_H
#include <mem.h>
#include "hand.h"
#include "linklist.h"
struct subscription {
Hand* hand;
callback cb;
subscription(Hand*h, callback c) : hand(h), cb(c)
{ }
};
class EventHandler {
public:
~EventHandler()
{ reset(); }
void add(Hand*,callback);
void del(Hand*,callback);
void delHand(Hand*);
void execute_callbacks(int p1=0, int p2=0, int p3=0);
void reset();
int getnum();
LinkedList<subscription> slist;
};
#endif