summaryrefslogtreecommitdiff
path: root/dnn
diff options
context:
space:
mode:
authorchatty2000-11-28 14:52:15 +0000
committerchatty2000-11-28 14:52:15 +0000
commite47241a79bce51379d37c728d9d4674ee9086f7e (patch)
tree71486fbbccfa2645b25fa3be251d2d3a7bc24f51 /dnn
parentbcb19dbd53973ff7efd9b2838de121d1e23430f4 (diff)
downloadivy-league-e47241a79bce51379d37c728d9d4674ee9086f7e.zip
ivy-league-e47241a79bce51379d37c728d9d4674ee9086f7e.tar.gz
ivy-league-e47241a79bce51379d37c728d9d4674ee9086f7e.tar.bz2
ivy-league-e47241a79bce51379d37c728d9d4674ee9086f7e.tar.xz
Removed pragma interfaces
Added Johnny's criteria
Diffstat (limited to 'dnn')
-rw-r--r--dnn/Trigger.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/dnn/Trigger.h b/dnn/Trigger.h
index 186b62f..744eb3b 100644
--- a/dnn/Trigger.h
+++ b/dnn/Trigger.h
@@ -3,7 +3,7 @@
*
* by Stephane Chatty
*
- * Copyright 1993-1994
+ * Copyright 1993-1995
* Centre d'Etudes de la Navigation Aerienne (CENA)
*
* Event triggers.
@@ -15,28 +15,30 @@
#ifndef DnnTrigger_H_
#define DnnTrigger_H_
-#ifdef __GNUG__
-#pragma interface
-#endif
-
#include "cplus_bugs.h"
#include "ccu/List.h"
+#include "ccu/bool.h"
-class DnnReaction;
-class DnnWindow;
class DnnEvent;
+class DnnBaseCriterion;
class DnnTrigger {
friend class DnnBaseReaction;
+public:
+enum REL_PRIORITY { isFirstPriority, isNormalPriority, isLastPriority };
+
private:
DnnTrigger (const DnnTrigger&);
DnnTrigger& operator = (const DnnTrigger&);
protected:
+ CcuListOf <DnnBaseReaction> FirstSubscribers;
CcuListOf <DnnBaseReaction> Subscribers;
+ CcuListOf <DnnBaseReaction> LastSubscribers;
CcuListOf <DnnBaseReaction> Grabs;
- void Subscribe (DnnBaseReaction&);
+ CcuListOf <DnnBaseCriterion> Criteria;
+ void Subscribe (DnnBaseReaction&, REL_PRIORITY);
void Unsubscribe (DnnBaseReaction&);
void Grab (DnnBaseReaction&);
void Release (DnnBaseReaction&);
@@ -44,8 +46,11 @@ protected:
public:
DnnTrigger ();
~DnnTrigger ();
-inline const CcuListOf <DnnBaseReaction>& GetSubscribers () const { return Subscribers; }
+inline bool IsUnused () const { return bool (Subscribers.IsEmpty () && FirstSubscribers.IsEmpty () && LastSubscribers.IsEmpty ()); }
void Dispatch (DnnEvent&);
+ bool Check (DnnEvent&);
+inline void AddCriterion (DnnBaseCriterion& c) { Criteria.Append (&c); }
+inline void RemoveCriterion (DnnBaseCriterion& c) { Criteria.Remove (&c); }
};
#endif /* DnnTrigger_H_ */