summaryrefslogtreecommitdiff
path: root/dnn/Trigger.h
blob: 31dd7f932b3581d81585d22d02c87ed923f513b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 *	DNN - Data News Network
 *
 *	by Stephane Chatty
 *
 *	Copyright 1993-1994
 *	Centre d'Etudes de la Navigation Aerienne (CENA)
 *
 *	Event triggers.
 *
 *	$Id$
 *	$CurLog$
 */

#ifndef DnnTrigger_H_
#define DnnTrigger_H_

#include "cplus_bugs.h"
#include "ccu/List.h"

class DnnReaction;
class DnnWindow;
class DnnEvent;

class DnnTrigger {
friend	class	DnnBaseReaction;

private:
		DnnTrigger (const DnnTrigger&);
	DnnTrigger&	operator = (const DnnTrigger&);

protected:
	CcuListOf <DnnBaseReaction>	Subscribers;
	void	Subscribe (DnnBaseReaction&);
	void	Unsubscribe (DnnBaseReaction&);

public:
		DnnTrigger ();
		~DnnTrigger ();
inline	const CcuListOf <DnnBaseReaction>&	GetSubscribers () const	{ return Subscribers; }
	void	Dispatch (DnnEvent&);
};

#endif	/* DnnTrigger_H_ */