AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::GameObjectWorker< Functor > Struct Template Reference

#include "GridNotifiers.h"

Public Member Functions

 GameObjectWorker (WorldObject const *searcher, Functor &func)
 
void Visit (GameObjectMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefMgr< NOT_INTERESTED > &)
 

Private Attributes

Functor & _func
 
uint32 _phaseMask
 

Detailed Description

template<class Functor>
struct Acore::GameObjectWorker< Functor >

Constructor & Destructor Documentation

◆ GameObjectWorker()

template<class Functor >
Acore::GameObjectWorker< Functor >::GameObjectWorker ( WorldObject const *  searcher,
Functor &  func 
)
inline
365 : _func(func), _phaseMask(searcher->GetPhaseMask()) {}
Functor & _func
Definition: GridNotifiers.h:377
uint32 _phaseMask
Definition: GridNotifiers.h:378

Member Function Documentation

◆ Visit() [1/2]

template<class Functor >
void Acore::GameObjectWorker< Functor >::Visit ( GameObjectMapType m)
inline
368 {
369 for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
370 if (itr->GetSource()->InSamePhase(_phaseMask))
371 _func(itr->GetSource());
372 }
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36

References Acore::GameObjectWorker< Functor >::_func, Acore::GameObjectWorker< Functor >::_phaseMask, GridRefMgr< OBJECT >::begin(), and GridRefMgr< OBJECT >::end().

◆ Visit() [2/2]

template<class Functor >
template<class NOT_INTERESTED >
void Acore::GameObjectWorker< Functor >::Visit ( GridRefMgr< NOT_INTERESTED > &  )
inline
374{}

Member Data Documentation

◆ _func

template<class Functor >
Functor& Acore::GameObjectWorker< Functor >::_func
private

◆ _phaseMask

template<class Functor >
uint32 Acore::GameObjectWorker< Functor >::_phaseMask
private