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
246 : ContainerInserter<WorldObject*>(container),
247 i_mapTypeMask(mapTypeMask), i_phaseMask(searcher->GetPhaseMask()), i_check(check) { }
uint32 i_mapTypeMask
Definition: GridNotifiers.h:240
Check & i_check
Definition: GridNotifiers.h:242
uint32 i_phaseMask
Definition: GridNotifiers.h:241

Member Function Documentation

◆ Visit() [1/6]

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

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)
257{
259 return;
260
261 for (CreatureMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
262 if (i_check(itr->GetSource()))
263 Insert(itr->GetSource());
264}
@ GRID_MAP_TYPE_MASK_CREATURE
Definition: GridDefines.h:69

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)
290{
292 return;
293
294 for (DynamicObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
295 if (i_check(itr->GetSource()))
296 Insert(itr->GetSource());
297}
@ GRID_MAP_TYPE_MASK_DYNAMICOBJECT
Definition: GridDefines.h:70

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)
279{
281 return;
282
283 for (GameObjectMapType::iterator itr = m.begin(); itr != m.end(); ++itr)
284 if (i_check(itr->GetSource()))
285 Insert(itr->GetSource());
286}
@ GRID_MAP_TYPE_MASK_GAMEOBJECT
Definition: GridDefines.h:71

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
255{}

◆ Visit() [6/6]

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

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