本文整理汇总了C++中EventPtr::GetType方法的典型用法代码示例。如果您正苦于以下问题:C++ EventPtr::GetType方法的具体用法?C++ EventPtr::GetType怎么用?C++ EventPtr::GetType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventPtr
的用法示例。
在下文中一共展示了EventPtr::GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
bool pei::EventManager::ProcessSyncEvents( EventPtr event )
{
// we run the event list in reverse because we draw from bottom up if the z-order is equal
LOCK_EM();
// ref to smart_ptr is fine...we won't go out of scope while we are in here
EventHandlerMap::iterator fit = m_SyncHandlers.find( event->GetType() );
if ( fit != m_SyncHandlers.end() ) {
EventHandlerList& eventProcessors = fit->second;
EventHandlerList::reverse_iterator eit = eventProcessors.rbegin();
while ( eit != eventProcessors.rend() ) {
EventProcessorPtr& processor = *eit++;
if ( processor->Call( m_RenderManager, event ) ) {
return true;
}
}
}
// Sync Event Handling
EventHandlerList::reverse_iterator eit = m_SyncEventProcessors.rbegin();
while ( eit != m_SyncEventProcessors.rend() ) {
EventProcessorPtr& processor = *eit++;
if ( processor->Call( m_RenderManager, event ) ) {
return true;
}
}
return false;
}