#ifndef T2DLL_LLISTENER_H #define T2DLL_LLISTENER_H #include "../common.h" #include "LArray.h" class AFX_CLASS_EXPORT LListener { public: LListener(); LListener(const LListener& other); virtual ~LListener(); void StartListening() { mListening = true; } void StopListening() { mListening = false; } BOOL IsListening() const { return mListening; } virtual void ListenToMessage(unsigned int msg, void* data) {} protected: friend class LBroadcaster; void AddBroadcaster(LBroadcaster* broadcaster); void RemoveBroadcaster(LBroadcaster* broadcaster); private: LArray mBroadcasters; BOOL mListening; }; #endif