1#ifndef __SEVENTSET__H__
2#define __SEVENTSET__H__
19 SEvent(DWORD dwEventID, LPCWSTR pszEventName);
68 void fire(IEvtArgs *args);
109 BOOL
addEvent(DWORD dwEventID, LPCWSTR pszEventHandlerName);
162 BOOL subscribeEvent(DWORD dwEventID,
const IEvtSlot *subscriber);
171 BOOL subscribeEvent(DWORD dwEventID,
const StdFunCallback &eventCallback);
182 template <
typename T,
typename A>
194 template <
typename A>
207 template <
typename T>
219 BOOL unsubscribeEvent(DWORD dwEventID,
const IEvtSlot *subscriber);
240 template <
typename T,
typename A>
252 template <
typename A>
265 template <
typename T>
275 void FireEvent(IEvtArgs *args);
290 void setMutedState(BOOL setting);
298 SEvent *GetEventObject(
const DWORD dwEventID);
int findSlotFunctor(const IEvtSlot *slot)
查找事件槽对象
SStringA m_strScriptHandler
脚本处理程序字符串
BOOL unsubscribe(const IEvtSlot *slot)
取消订阅事件
SStringW m_strEventName
事件名称
BOOL subscribe(const IEvtSlot *slot)
订阅事件
SEvent(DWORD dwEventID, LPCWSTR pszEventName)
构造函数
void fire(IEvtArgs *args)
触发事件
SArray< IEvtSlot * > m_evtSlots
事件槽数组
SStringA GetScriptHandler() const
获取脚本处理程序
SStringW GetName() const
获取事件名称
void SetScriptHandler(const SStringA &strScriptHandler)
设置脚本处理程序
BOOL subscribeEvent(DWORD dwEventID, BOOL(T::*pFn)(IEvtArgs *), T *pObject)
订阅事件(模板函数)
BOOL subscribeEvent(BOOL(T::*pFn)(A *), T *pObject)
订阅事件(模板函数)
BOOL subscribeEvent(DWORD dwEventID, const IEvtSlot &subscriber)
订阅事件
void removeAllEvents(void)
移除所有事件对象
SArray< SEvent * > m_evtArr
事件数组
BOOL subscribeEvent(BOOL(*pFn)(A *))
订阅事件(模板函数)
BOOL setEventScriptHandler(const SStringW &strEventName, const SStringA strScriptHandler)
设置事件的脚本处理程序
BOOL isEventPresent(DWORD dwEventID)
检查事件集是否包含指定ID的事件
BOOL unsubscribeEvent(DWORD dwEventID, const IEvtSlot *subscriber)
取消订阅事件
BOOL addEvent(DWORD dwEventID, LPCWSTR pszEventHandlerName)
添加一个新事件到事件集
BOOL unsubscribeEvent(BOOL(T::*pFn)(A *), T *pObject)
取消订阅事件(模板函数)
BOOL unsubscribeEvent(DWORD dwEventID, BOOL(T::*pFn)(IEvtArgs *), T *pObject)
取消订阅事件(模板函数)
BOOL unsubscribeEvent(BOOL(*pFn)(A *))
取消订阅事件(模板函数)
BOOL removeEvent(DWORD dwEventID)
移除指定ID的事件
BOOL isMuted(void) const
检查事件集是否被静音
BOOL unsubscribeEvent(DWORD dwEventID, const IEvtSlot &subscriber)
取消订阅事件
SStringA getEventScriptHandler(const SStringW &strEventName) const
获取事件的脚本处理程序
A class representing an ASCII string.
A class representing an ASCII string.