From 3ee78810becfeeb3690468ac735b6ba20dc5c501 Mon Sep 17 00:00:00 2001 From: sc Date: Tue, 28 Nov 2000 14:52:16 +0000 Subject: Integration into IvyLeague Dnn -> Ivl Some class names changed, because of conflicts with previous Uch classes Imakefile is replaced with Makefile --- dnn/Reaction.cc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'dnn/Reaction.cc') diff --git a/dnn/Reaction.cc b/dnn/Reaction.cc index 77dbb83..c694ab5 100644 --- a/dnn/Reaction.cc +++ b/dnn/Reaction.cc @@ -15,8 +15,8 @@ #include "Reaction.h" #include "Trigger.h" -/*?class DnnBaseReaction -The class \typ{DnnBaseReaction} is the base class for event handling. +/*?class IvlBaseReaction +The class \typ{IvlBaseReaction} is the base class for event handling. A reaction implements a behaviour (through the virtual function \fun{Manage}), and can be associated to one or more triggers, generally located in a sensor. ?*/ @@ -24,16 +24,16 @@ and can be associated to one or more triggers, generally located in a sensor. /*? Create a reaction. ?*/ -DnnBaseReaction :: DnnBaseReaction () +IvlBaseReaction :: IvlBaseReaction () : Triggers (), Grabbed () { } /*?nodoc?*/ -DnnBaseReaction :: ~DnnBaseReaction () +IvlBaseReaction :: ~IvlBaseReaction () { - CcuListIterOf ti = Grabbed; + IvlListIterOf ti = Grabbed; while (++ti) (*ti)->Release (*this); @@ -47,7 +47,7 @@ Tell a reaction to forget a trigger. This special function is used only when destroying a trigger. !*/ void -DnnBaseReaction :: Forget (DnnTrigger& t) +IvlBaseReaction :: Forget (IvlTrigger& t) { Triggers.Remove (&t); Grabbed.Remove (&t); @@ -55,10 +55,10 @@ DnnBaseReaction :: Forget (DnnTrigger& t) /*?nextdoc?*/ void -DnnBaseReaction :: SubscribeTo (DnnTrigger& t, REL_PRIORITY p) +IvlBaseReaction :: SubscribeTo (IvlTrigger& t, REL_PRIORITY p) { Triggers.Append (&t); - t.Subscribe (*this, (DnnTrigger::REL_PRIORITY) p); + t.Subscribe (*this, (IvlTrigger::REL_PRIORITY) p); } /*? @@ -66,7 +66,7 @@ Tell that a reaction should (resp. should no more) be activated when the trigger causes the emission of an event. ?*/ void -DnnBaseReaction :: UnsubscribeTo (DnnTrigger& t) +IvlBaseReaction :: UnsubscribeTo (IvlTrigger& t) { Triggers.Remove (&t); t.Unsubscribe (*this); @@ -74,7 +74,7 @@ DnnBaseReaction :: UnsubscribeTo (DnnTrigger& t) /*?nextdoc?*/ void -DnnBaseReaction :: Grab (DnnTrigger& t) +IvlBaseReaction :: Grab (IvlTrigger& t) { Grabbed.Append (&t); t.Grab (*this); @@ -85,7 +85,7 @@ Tell that a reaction should (resp. should no more) be the only one activated when the trigger \var{t} causes the emission of an event. ?*/ void -DnnBaseReaction :: Release (DnnTrigger& t) +IvlBaseReaction :: Release (IvlTrigger& t) { Grabbed.Remove (&t); t.Release (*this); @@ -97,34 +97,34 @@ this reaction was attached. It should be redefined in derived classes to impleme behaviours. ?*/ void -DnnBaseReaction :: Manage (DnnEvent&) +IvlBaseReaction :: Manage (IvlEvent&) { } -/*?class DnnCallback -The class \typ{DnnCallback} is a ready-to-use derived class of \typ{DnnBaseReaction}. +/*?class IvlCallback +The class \typ{IvlCallback} is a ready-to-use derived class of \typ{IvlBaseReaction}. In this class, the function \fun{Manage} is redefined to call a function passed when creating the reaction. ?*/ /*? Build a reaction that will call \var{f} to handle events. -\fun{f} has to take a \typ{DnnEvent\&} parameter and return \typ{void}. +\fun{f} has to take a \typ{IvlEvent\&} parameter and return \typ{void}. ?*/ -DnnCallback :: DnnCallback (DnnHandlingFunction f) -: DnnBaseReaction (), +IvlCallback :: IvlCallback (IvlHandlingFunction f) +: IvlBaseReaction (), Handler (f) { } /*?nodoc?*/ -DnnCallback :: ~DnnCallback () +IvlCallback :: ~IvlCallback () { } /*?nodoc?*/ void -DnnCallback :: Manage (DnnEvent& ev) +IvlCallback :: Manage (IvlEvent& ev) { (*Handler) (ev); } -- cgit v1.1