home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 2.2 KB | 90 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWNotifr.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWNOTIFR_H
- #define FWNOTIFR_H
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWINTERE_H
- #include "FWIntere.h"
- #endif
-
- #ifndef FWEXCLIB_H
- #include "FWExcLib.h"
- #endif
-
- #ifndef FWTCOLL_H
- #include "FWTColl.h"
- #endif
-
- #ifndef __SOM__
- #include <som.xh>
- #endif
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- class FW_MReceiver;
- class FW_CNotification;
-
- //========================================================================================
- // Struct FW_SPrivInterestReceiver
- //========================================================================================
-
- struct FW_SPrivInterestReceiver
- {
- FW_CInterest* fInterest;
- FW_MReceiver* fReceiver;
- };
-
- //========================================================================================
- // CLASS FW_MNotifier
- //========================================================================================
-
- class FW_MNotifier
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(FW_MNotifier)
-
- friend class FW_CNotifierInterestIterator;
-
- //----------------------------------------------------------------------------------------
- // Constructors/Destructor
- //
- public:
- virtual ~FW_MNotifier();
-
- protected:
- FW_MNotifier();
-
- //----------------------------------------------------------------------------------------
- // API
- //
- public:
- virtual void Notify(Environment* ev, const FW_CNotification ¬ification);
-
- virtual void AddReceiver(FW_MReceiver* Receiver, FW_CInterest* interest);
- virtual void RemoveReceiver(FW_MReceiver* receiver, const FW_CInterest& interest);
-
- FW_Boolean IsConnectedTo(FW_MReceiver* receiver, const FW_CInterest& interest);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- FW_TOrderedCollection<FW_SPrivInterestReceiver> fInterestList;
- };
-
- #endif
-