summaryrefslogtreecommitdiff
path: root/comm/OLD
diff options
context:
space:
mode:
authorchatty1993-11-29 12:09:21 +0000
committerchatty1993-11-29 12:09:21 +0000
commite39958a0286983c30d09c544786e7ceeef2dea4f (patch)
tree6e46f99e35a9946142a9d41e98c6f31283fdc1a5 /comm/OLD
parentba919bfda285b5596b92a866516b8fe32be16113 (diff)
downloadivy-league-e39958a0286983c30d09c544786e7ceeef2dea4f.zip
ivy-league-e39958a0286983c30d09c544786e7ceeef2dea4f.tar.gz
ivy-league-e39958a0286983c30d09c544786e7ceeef2dea4f.tar.bz2
ivy-league-e39958a0286983c30d09c544786e7ceeef2dea4f.tar.xz
Removed UchGenEvtMsg
Removed UchEventMsg Now use plain UchMessages
Diffstat (limited to 'comm/OLD')
-rw-r--r--comm/OLD/Service.h68
1 files changed, 18 insertions, 50 deletions
diff --git a/comm/OLD/Service.h b/comm/OLD/Service.h
index 15ca5ad..9108917 100644
--- a/comm/OLD/Service.h
+++ b/comm/OLD/Service.h
@@ -23,77 +23,45 @@
class UchService;
-// events are messages sent by a server that are linked into an event list
-//
-class UchEventMsg : public UchMessage {
-friend class UchService;
-
-protected:
- UchMsgStream* From;
-
-public:
-
-inline UchEventMsg () : UchMessage (), From (0) { }
- ~UchEventMsg ();
-
-inline UchMsgStream* GetSource () { return From; }
-};
-
-
-class UchGenEvtMsg : public UchEventMsg {
-protected:
- UchMessage* Msg;
-
-public:
-inline UchGenEvtMsg () : UchEventMsg () { Msg = 0; }
-inline UchGenEvtMsg (UchMessage* m) : UchEventMsg () { Msg = m; }
- ~UchGenEvtMsg ();
-
- void WriteTo (UchMsgBuffer&);
- void ReadFrom (UchMsgBuffer&, lword);
-inline void SetMsg (UchMessage* m) { if (Msg) delete Msg; Msg = m; }
-inline UchMessage* GetMsg () { return Msg; }
-};
-
// class for storing and retrieving events
//
-class UchEvtMsgQueue : public CcuSmartData {
+class UchMsgQueue : public CcuSmartData {
protected:
#ifndef CPLUS_BUG19
- CcuListOf <UchEventMsg> Queue;
+ CcuListOf <UchMessage> Queue;
#else
CcuList Queue;
#endif
public:
- UchEvtMsgQueue ();
- ~UchEvtMsgQueue ();
+ UchMsgQueue ();
+ ~UchMsgQueue ();
-inline void Put (UchEventMsg* m) { Queue.Append (m); }
+inline void Put (UchMessage* m) { Queue.Append (m); }
#ifndef CPLUS_BUG19
-inline UchEventMsg* Peek () { return Queue.First (); }
-inline UchEventMsg* Get () { return Queue.RemoveFirst (); }
+inline UchMessage* Peek () { return Queue.First (); }
+inline UchMessage* Get () { return Queue.RemoveFirst (); }
#else
-inline UchEventMsg* Peek () { return (UchEventMsg*) Queue.First (); }
-inline UchEventMsg* Get () { return (UchEventMsg*) Queue.RemoveFirst (); }
+inline UchMessage* Peek () { return (UchMessage*) Queue.First (); }
+inline UchMessage* Get () { return (UchMessage*) Queue.RemoveFirst (); }
#endif
-inline void PutBack (UchEventMsg* m) { Queue.Prepend (m); }
+inline void PutBack (UchMessage* m) { Queue.Prepend (m); }
#ifndef CPLUS_BUG19
-inline operator const CcuListOf <UchEventMsg>& () const { return Queue; }
+inline operator const CcuListOf <UchMessage>& () const { return Queue; }
#else
inline operator const CcuList& () const { return Queue; }
#endif
};
-PointerClass (pUchEvtMsgQueue, UchEvtMsgQueue)
+PointerClass (pUchMsgQueue, UchMsgQueue)
// UchService is the client's view of a server
// we use smart pointers so that the event queue can be shared
//
class UchService : public UchMsgStream {
protected:
- pUchEvtMsgQueue EvQueue;
+ pUchMsgQueue EvQueue;
public:
UchService ();
@@ -103,11 +71,11 @@ public:
UchChannel* Copy () const;
- void SetEvQueue (UchEvtMsgQueue*);
- UchEventMsg* PeekEvent (bool = TRUE);
- UchEventMsg* GetEvent (bool = TRUE);
- void PutEvent (UchEventMsg*);
- void PutBackEvent (UchEventMsg*);
+ void SetEvQueue (UchMsgQueue*);
+ UchMessage* PeekEvent (bool = TRUE);
+ UchMessage* GetEvent (bool = TRUE);
+ void PutEvent (UchMessage*);
+ void PutBackEvent (UchMessage*);
};
#endif /* Service_H_ */