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

#include <GridNotifiers.h>

Public Member Functions

 GameObjectSearcher (WorldObject const *searcher, GameObject *&result, Check &check)
 
void Visit (GameObjectMapType &m)
 
template<class NOT_INTERESTED >
void Visit (GridRefManager< NOT_INTERESTED > &)
 

Public Attributes

WorldObject const_searcher
 
GameObject *& i_object
 
Check & i_check
 

Constructor & Destructor Documentation

template<class Check>
Trinity::GameObjectSearcher< Check >::GameObjectSearcher ( WorldObject const searcher,
GameObject *&  result,
Check &  check 
)
inline
314  : _searcher(searcher), i_object(result), i_check(check) { }
GameObject *& i_object
Definition: GridNotifiers.h:310
WorldObject const * _searcher
Definition: GridNotifiers.h:309
Check & i_check
Definition: GridNotifiers.h:311
T check(T value)
Definition: format.h:305

Member Function Documentation

template<class Check >
void Trinity::GameObjectSearcher< Check >::Visit ( GameObjectMapType m)
349 {
350  // already found
351  if (i_object)
352  return;
353 
354  for (GameObjectMapType::iterator itr=m.begin(); itr != m.end(); ++itr)
355  {
356  if (!itr->GetSource()->IsInPhase(_searcher))
357  continue;
358 
359  if (i_check(itr->GetSource()))
360  {
361  i_object = itr->GetSource();
362  return;
363  }
364  }
365 }
GameObject *& i_object
Definition: GridNotifiers.h:310
Definition: LinkedList.h:141
iterator begin()
Definition: GridRefManager.h:36
WorldObject const * _searcher
Definition: GridNotifiers.h:309
Check & i_check
Definition: GridNotifiers.h:311
iterator end()
Definition: GridRefManager.h:37

+ Here is the call graph for this function:

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

Member Data Documentation

template<class Check>
WorldObject const* Trinity::GameObjectSearcher< Check >::_searcher
template<class Check>
Check& Trinity::GameObjectSearcher< Check >::i_check
template<class Check>
GameObject* & Trinity::GameObjectSearcher< Check >::i_object

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