#ifndef T2DLL_LBROADCASTER_H #define T2DLL_LBROADCASTER_H #define DONT_INCLUDE_AFXTEMPL #include "../common.h" #include "LArray.h" class AFX_CLASS_EXPORT LBroadcaster { public: LBroadcaster(); LBroadcaster(const LBroadcaster& other); virtual ~LBroadcaster(); void AddListener(LListener* listener); void RemoveListener(LListener* listener); void BroadcastMessage(unsigned int msg, void* data); void StartBroadcasting() { mBroadcasting = true; } void StopBroadcasting() { mBroadcasting = false; } BOOL IsBroadcasting() const { return mBroadcasting; } private: LArray mListeners; BOOL mBroadcasting; }; #endif