TrinityCore
NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > Class Template Reference

#include <NGrid.h>

Public Types

typedef Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > GridType
 

Public Member Functions

 NGrid (uint32 id, int32 x, int32 y, time_t expiry, bool unload=true)
 
GridTypeGetGridType (const uint32 x, const uint32 y)
 
GridType const & GetGridType (const uint32 x, const uint32 y) const
 
uint32 GetGridId (void) const
 
grid_state_t GetGridState (void) const
 
void SetGridState (grid_state_t s)
 
int32 getX () const
 
int32 getY () const
 
void link (GridRefManager< NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > > *pTo)
 
bool isGridObjectDataLoaded () const
 
void setGridObjectDataLoaded (bool pLoaded)
 
GridInfogetGridInfoRef ()
 
TimeTracker const & getTimeTracker () const
 
bool getUnloadLock () const
 
void setUnloadExplicitLock (bool on)
 
void incUnloadActiveLock ()
 
void decUnloadActiveLock ()
 
void ResetTimeTracker (time_t interval)
 
void UpdateTimeTracker (time_t diff)
 
template<class T , class TT >
void VisitAllGrids (TypeContainerVisitor< T, TypeMapContainer< TT > > &visitor)
 
template<class T , class TT >
void VisitGrid (const uint32 x, const uint32 y, TypeContainerVisitor< T, TypeMapContainer< TT > > &visitor)
 
template<class T >
uint32 GetWorldObjectCountInNGrid () const
 

Private Attributes

uint32 i_gridId
 
GridInfo i_GridInfo
 
GridReference< NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > > i_Reference
 
int32 i_x
 
int32 i_y
 
grid_state_t i_cellstate
 
GridType i_cells [N][N]
 
bool i_GridObjectDataLoaded
 

Detailed Description

template<uint32 N, class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
class NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >

Definition at line 69 of file NGrid.h.

Member Typedef Documentation

◆ GridType

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
typedef Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::GridType

Definition at line 72 of file NGrid.h.

Constructor & Destructor Documentation

◆ NGrid()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::NGrid ( uint32  id,
int32  x,
int32  y,
time_t  expiry,
bool  unload = true 
)
inline

Definition at line 73 of file NGrid.h.

Member Function Documentation

◆ decUnloadActiveLock()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::decUnloadActiveLock ( )
inline

Definition at line 108 of file NGrid.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetGridId()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
uint32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::GetGridId ( void  ) const
inline

Definition at line 90 of file NGrid.h.

+ Here is the caller graph for this function:

◆ getGridInfoRef()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
GridInfo * NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::getGridInfoRef ( )
inline

Definition at line 103 of file NGrid.h.

+ Here is the caller graph for this function:

◆ GetGridState()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
grid_state_t NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::GetGridState ( void  ) const
inline

Definition at line 91 of file NGrid.h.

+ Here is the caller graph for this function:

◆ GetGridType() [1/2]

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
GridType & NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::GetGridType ( const uint32  x,
const uint32  y 
)
inline

Definition at line 78 of file NGrid.h.

+ Here is the caller graph for this function:

◆ GetGridType() [2/2]

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
GridType const & NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::GetGridType ( const uint32  x,
const uint32  y 
) const
inline

Definition at line 84 of file NGrid.h.

◆ getTimeTracker()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
TimeTracker const & NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::getTimeTracker ( ) const
inline

Definition at line 104 of file NGrid.h.

+ Here is the call graph for this function:

◆ getUnloadLock()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
bool NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::getUnloadLock ( ) const
inline

Definition at line 105 of file NGrid.h.

+ Here is the call graph for this function:

◆ GetWorldObjectCountInNGrid()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
template<class T >
uint32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::GetWorldObjectCountInNGrid ( ) const
inline

Definition at line 164 of file NGrid.h.

+ Here is the caller graph for this function:

◆ getX()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
int32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::getX ( ) const
inline

Definition at line 93 of file NGrid.h.

+ Here is the caller graph for this function:

◆ getY()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
int32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::getY ( ) const
inline

Definition at line 94 of file NGrid.h.

+ Here is the caller graph for this function:

◆ incUnloadActiveLock()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::incUnloadActiveLock ( )
inline

Definition at line 107 of file NGrid.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isGridObjectDataLoaded()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
bool NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::isGridObjectDataLoaded ( ) const
inline

Definition at line 100 of file NGrid.h.

+ Here is the caller graph for this function:

◆ link()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::link ( GridRefManager< NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > > *  pTo)
inline

Definition at line 96 of file NGrid.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetTimeTracker()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::ResetTimeTracker ( time_t  interval)
inline

Definition at line 109 of file NGrid.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGridObjectDataLoaded()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::setGridObjectDataLoaded ( bool  pLoaded)
inline

Definition at line 101 of file NGrid.h.

◆ SetGridState()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::SetGridState ( grid_state_t  s)
inline

Definition at line 92 of file NGrid.h.

+ Here is the caller graph for this function:

◆ setUnloadExplicitLock()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::setUnloadExplicitLock ( bool  on)
inline

Definition at line 106 of file NGrid.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateTimeTracker()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::UpdateTimeTracker ( time_t  diff)
inline

Definition at line 110 of file NGrid.h.

+ Here is the call graph for this function:

◆ VisitAllGrids()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
template<class T , class TT >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::VisitAllGrids ( TypeContainerVisitor< T, TypeMapContainer< TT > > &  visitor)
inline

Definition at line 136 of file NGrid.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VisitGrid()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
template<class T , class TT >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::VisitGrid ( const uint32  x,
const uint32  y,
TypeContainerVisitor< T, TypeMapContainer< TT > > &  visitor 
)
inline

Definition at line 145 of file NGrid.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ i_cells

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
GridType NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_cells[N][N]
private

Definition at line 180 of file NGrid.h.

◆ i_cellstate

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
grid_state_t NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_cellstate
private

Definition at line 179 of file NGrid.h.

◆ i_gridId

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
uint32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_gridId
private

Definition at line 174 of file NGrid.h.

◆ i_GridInfo

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
GridInfo NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_GridInfo
private

Definition at line 175 of file NGrid.h.

◆ i_GridObjectDataLoaded

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
bool NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_GridObjectDataLoaded
private

Definition at line 181 of file NGrid.h.

◆ i_Reference

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
GridReference<NGrid<N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> > NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_Reference
private

Definition at line 176 of file NGrid.h.

◆ i_x

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
int32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_x
private

Definition at line 177 of file NGrid.h.

◆ i_y

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_TYPES , class GRID_OBJECT_TYPES >
int32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_y
private

Definition at line 178 of file NGrid.h.


The documentation for this class was generated from the following file: