




























class CEventDispatcher
{
public:
bool AddEventListener(int nEventID, CEventListener* pListener);
bool RemoveEventListener(int nEventID, CEventListener* pListener);
bool DispatchEvent(int nEventID, int nEventType, string& strXmlData)
{
for (iterListener; iterListener != m_listListeners.end(); iterListener++)
{
//如果ID相等并且m_listRemoved里没有该listener, 则派发事件
}
}
protected:
std::map<int,CEventListener*> m_listListeners;
std::map<int,CEventListener*> m_listRemoved;
};
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。