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

#include "GridNotifiers.h"

Inheritance diagram for Acore::WorldObjectListSearcher< Check >:
Acore::ContainerInserter< WorldObject * >

Public Member Functions

template<typename Container >
 WorldObjectListSearcher (WorldObject const *searcher, Container &container, Check &check, uint32 mapTypeMask=GRID_MAP_TYPE_MASK_ALL)
 
void Visit (PlayerMapType &m)
 
void Visit (CreatureMapType &m)
 
void Visit (CorpseMapType &m)
 
void Visit (GameObjectMapType &m)
 
void Visit (DynamicObjectMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefMgr< NOT_INTERESTED > &)
 

Public Attributes

uint32 i_mapTypeMask
 
uint32 i_phaseMask
 
Check & i_check
 

Additional Inherited Members

- Protected Member Functions inherited from Acore::ContainerInserter< WorldObject * >
 ContainerInserter (T &ref_)
 
void Insert (WorldObject * type)
 

Detailed Description

template<class Check>
struct Acore::WorldObjectListSearcher< Check >

Constructor & Destructor Documentation

◆ WorldObjectListSearcher()

template<class Check >
template<typename Container >
Acore::WorldObjectListSearcher< Check >::WorldObjectListSearcher ( WorldObject const *  searcher,
Container container,
Check &  check,
uint32  mapTypeMask = GRID_MAP_TYPE_MASK_ALL 
)
inline
243 : ContainerInserter<WorldObject*>(container),
244 i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_check(check) { }
uint32 i_mapTypeMask
Definition: GridNotifiers.h:237
Check & i_check
Definition: GridNotifiers.h:239
uint32 i_phaseMask
Definition: GridNotifiers.h:238

Member Function Documentation

◆ Visit() [1/6]

template<class Check >
void Acore::WorldObjectListSearcher< Check >::Visit ( CorpseMapType m)
272{
274 return;
275
276 for (CorpseMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
277 if (i_check(itr->GetSource()))
278 Insert(itr->GetSource());
279}
@ GRID_MAP_TYPE_MASK_CORPSE
Definition: GridDefines.h:69
Definition: LinkedList.h:139
iterator begin()
Definition: GridRefMgr.h:35
iterator end()
Definition: GridRefMgr.h:36
void Insert(WorldObject * type)
Definition: GridNotifiers.h:188

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), GRID_MAP_TYPE_MASK_CORPSE, and Acore::Insert().

◆ Visit() [2/6]

template<class Check >
void Acore::WorldObjectListSearcher< Check >::Visit ( CreatureMapType m)
261{
263 return;
264
265 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
266 if (i_check(itr->GetSource()))
267 Insert(itr->GetSource());
268}
@ GRID_MAP_TYPE_MASK_CREATURE
Definition: GridDefines.h:70

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), GRID_MAP_TYPE_MASK_CREATURE, and Acore::Insert().

◆ Visit() [3/6]

template<class Check >
void Acore::WorldObjectListSearcher< Check >::Visit ( DynamicObjectMapType m)
294{
296 return;
297
298 for (DynamicObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
299 if (i_check(itr->GetSource()))
300 Insert(itr->GetSource());
301}
@ GRID_MAP_TYPE_MASK_DYNAMICOBJECT
Definition: GridDefines.h:71

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), GRID_MAP_TYPE_MASK_DYNAMICOBJECT, and Acore::Insert().

◆ Visit() [4/6]

template<class Check >
void Acore::WorldObjectListSearcher< Check >::Visit ( GameObjectMapType m)
283{
285 return;
286
287 for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
288 if (i_check(itr->GetSource()))
289 Insert(itr->GetSource());
290}
@ GRID_MAP_TYPE_MASK_GAMEOBJECT
Definition: GridDefines.h:72

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), GRID_MAP_TYPE_MASK_GAMEOBJECT, and Acore::Insert().

◆ Visit() [5/6]

template<class Check >
template<class NOT_INTERESTED >
void Acore::WorldObjectListSearcher< Check >::Visit ( GridRefMgr< NOT_INTERESTED > &  )
inline
252{}

◆ Visit() [6/6]

template<class Check >
void Acore::WorldObjectListSearcher< Check >::Visit ( PlayerMapType m)
250{
252 return;
253
254 for (PlayerMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
255 if (i_check(itr->GetSource()))
256 Insert(itr->GetSource());
257}
@ GRID_MAP_TYPE_MASK_PLAYER
Definition: GridDefines.h:73

References GridRefMgr< OBJECT >::begin(), GridRefMgr< OBJECT >::end(), GRID_MAP_TYPE_MASK_PLAYER, and Acore::Insert().

Member Data Documentation

◆ i_check

template<class Check >
Check& Acore::WorldObjectListSearcher< Check >::i_check

◆ i_mapTypeMask

template<class Check >
uint32 Acore::WorldObjectListSearcher< Check >::i_mapTypeMask

◆ i_phaseMask

template<class Check >
uint32 Acore::WorldObjectListSearcher< Check >::i_phaseMask