Example #1
0
bool SNotifyCenter::RegisterEventMap( const ISlotFunctor &slot )
{
	for(SPOSITION pos = m_evtHandlerMap.GetHeadPosition();pos;)
	{
		ISlotFunctor * pSlot = m_evtHandlerMap.GetNext(pos);
		if(pSlot->Equal(slot)) return false;
	}
	m_evtHandlerMap.AddTail(slot.Clone());
	return true;
}
Example #2
0
 //////////////////////////////////////////////////////////////////////////
 // SEvent
 bool SEvent::subscribe( const ISlotFunctor& slot )
 {
     if(findSlotFunctor(slot) != -1) return false;
     m_evtSlots.Add(slot.Clone());
     return true;
 }