From f410816d5bc16f7b9fd4f4187c09ebcd8a773e27 Mon Sep 17 00:00:00 2001 From: chatty Date: Mon, 13 Feb 1995 16:57:17 +0000 Subject: Added new class UchEventMsg --- comm/OLD/Service.cc | 26 ++++++++++++++++++++++++++ comm/OLD/Service.h | 8 ++++++++ 2 files changed, 34 insertions(+) (limited to 'comm/OLD') diff --git a/comm/OLD/Service.cc b/comm/OLD/Service.cc index be28b60..df14025 100644 --- a/comm/OLD/Service.cc +++ b/comm/OLD/Service.cc @@ -192,6 +192,32 @@ UchService :: PutBackEvent (UchMessage* ev) } +/*?class UchEventMsg +\typ{UchEventMsg} is the base class for event messages to be used with +\typ{UchService}s. The difference between an \typ{UchEventMsg} and a +\typ{UchMessage} lies in the function \fun{Activate}: event messages +add themselves to the event queue. +?*/ + +/*?nodoc?*/ +UchEventMsg :: UchEventMsg () +{ +} + +/*?nodoc?*/ +UchEventMsg :: ~UchEventMsg () +{ +} + +/*?nodoc?*/ +bool +UchEventMsg :: Activate (UchMsgStream& s, bool) +{ + UchService* svc = (UchService*) &s; + svc->PutEvent (this); + return true; +} + /*?class UchGenMsg This is a sample derived class of \typ{UchEventMsg}. It defines events that contain a pointer to a \typ{UchMessage}. diff --git a/comm/OLD/Service.h b/comm/OLD/Service.h index 63f3cc4..e2a36c5 100644 --- a/comm/OLD/Service.h +++ b/comm/OLD/Service.h @@ -78,4 +78,12 @@ public: void PutBackEvent (UchMessage*); }; +class UchEventMsg : public UchMessage { +public: + UchEventMsg (); + ~UchEventMsg (); + bool Activate (UchMsgStream&, bool); +}; + + #endif /* Service_H_ */ -- cgit v1.1