void CNotificationQueue::postNotifications(float in_fDeltaTime) {  
	LifeCircleMutexLock(&sharedNotificationQueueLock);  

    __NotificationCenter* t_pNotiCenter = __NotificationCenter::getInstance();
	for (uint16_t i = 0; i < m_oVecNotifications.size(); i ++)
    {
		NotificationArgs& tmp_oNotiArgs = m_oVecNotifications[i];
		t_pNotiCenter->postNotification(tmp_oNotiArgs.m_oStrName.c_str(), tmp_oNotiArgs.m_pCcObj);  
	}  
	m_oVecNotifications.clear();  
}  
Example #2
0
void MTNotificationQueue::updateNotifications()   
{   
	LifeCircleMutexLock(sharedNotificationQueueLock);   

	for(unsigned int i = 0; i < notifications.size(); i++) 
	{   
		NotificationArgs &arg = notifications[i]; 
		NotificationCenter::getInstance()-> 
			postNotification(arg.name.c_str(), arg.object);  
	}   
	notifications.clear();   
}
void CNotificationQueue::postNotification(const char* in_pArrCharName, Ref* in_pCcObj) {
	LifeCircleMutexLock(&sharedNotificationQueueLock);  

	NotificationArgs t_oNotiArgs;  
	t_oNotiArgs.m_oStrName = in_pArrCharName;  

	if (in_pCcObj) {  
		t_oNotiArgs.m_pCcObj = in_pCcObj;   // object->copy();  
	} else {  
		t_oNotiArgs.m_pCcObj = NULL;  
	}
	m_oVecNotifications.push_back(t_oNotiArgs);  
}  
Example #4
0
void MTNotificationQueue::postNotification(const char* name, Ref* object) 
{   
	LifeCircleMutexLock(sharedNotificationQueueLock);   

	NotificationArgs arg;   
	arg.name = name;   

	if(object != NULL)   
		arg.object = object;   
	else   
		arg.object = NULL;   

	notifications.push_back(arg);   
}