TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Trinity::UnitListSearcher< Check > Struct Template Reference

#include <GridNotifiers.h>

Public Member Functions

 UnitListSearcher (WorldObject const *searcher, std::list< Unit * > &objects, Check &check)
 
void Visit (PlayerMapType &m)
 
void Visit (CreatureMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefManager< NOT_INTERESTED > &)
 

Public Attributes

WorldObject const_searcher
 
std::list< Unit * > & i_objects
 
Check & i_check
 

Constructor & Destructor Documentation

template<class Check>
Trinity::UnitListSearcher< Check >::UnitListSearcher ( WorldObject const searcher,
std::list< Unit * > &  objects,
Check &  check 
)
inline
417  : _searcher(searcher), i_objects(objects), i_check(check) { }
std::list< Unit * > & i_objects
Definition: GridNotifiers.h:413
WorldObject const * _searcher
Definition: GridNotifiers.h:412
Check & i_check
Definition: GridNotifiers.h:414
T check(T value)
Definition: format.h:305

Member Function Documentation

template<class Check >
void Trinity::UnitListSearcher< Check >::Visit ( PlayerMapType m)
459 {
460  for (PlayerMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
461  if (itr->GetSource()->IsInPhase(_searcher))
462  if (i_check(itr->GetSource()))
463  i_objects.push_back(itr->GetSource());
464 }
std::list< Unit * > & i_objects
Definition: GridNotifiers.h:413
WorldObject const * _searcher
Definition: GridNotifiers.h:412
Check & i_check
Definition: GridNotifiers.h:414
Definition: LinkedList.h:141
iterator begin()
Definition: GridRefManager.h:36
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

template<class Check >
void Trinity::UnitListSearcher< Check >::Visit ( CreatureMapType m)
468 {
469  for (CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
470  if (itr->GetSource()->IsInPhase(_searcher))
471  if (i_check(itr->GetSource()))
472  i_objects.push_back(itr->GetSource());
473 }
std::list< Unit * > & i_objects
Definition: GridNotifiers.h:413
WorldObject const * _searcher
Definition: GridNotifiers.h:412
Check & i_check
Definition: GridNotifiers.h:414
Definition: LinkedList.h:141
iterator begin()
Definition: GridRefManager.h:36
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

template<class Check>
template<class NOT_INTERESTED >
void Trinity::UnitListSearcher< Check >::Visit ( GridRefManager< NOT_INTERESTED > &  )
inline
422 { }

Member Data Documentation

template<class Check>
WorldObject const* Trinity::UnitListSearcher< Check >::_searcher
template<class Check>
Check& Trinity::UnitListSearcher< Check >::i_check
template<class Check>
std::list<Unit*>& Trinity::UnitListSearcher< Check >::i_objects

The documentation for this struct was generated from the following files: