TrinityCore
NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER > Class Template Reference

#include <NGrid.h>

Public Types

typedef Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER > 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 > *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 VISITOR >
void VisitAllGrids (TypeContainerVisitor< VISITOR, WORLD_OBJECT_CONTAINER > &visitor)
 
template<class VISITOR >
void VisitAllGrids (TypeContainerVisitor< VISITOR, GRID_OBJECT_CONTAINER > &visitor)
 
template<class VISITOR >
void VisitGrid (uint32 x, uint32 y, TypeContainerVisitor< VISITOR, WORLD_OBJECT_CONTAINER > &visitor)
 
template<class VISITOR >
void VisitGrid (uint32 x, uint32 y, TypeContainerVisitor< VISITOR, GRID_OBJECT_CONTAINER > &visitor)
 
template<class T >
uint32 GetWorldObjectCountInNGrid () const
 

Private Attributes

uint32 i_gridId
 
GridInfo i_GridInfo
 
GridReference< NGridi_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_CONTAINER, class GRID_OBJECT_CONTAINER>
class NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >

Definition at line 70 of file NGrid.h.

Member Typedef Documentation

◆ GridType

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
typedef Grid<ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER> NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GridType

Definition at line 73 of file NGrid.h.

Constructor & Destructor Documentation

◆ NGrid()

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

Definition at line 74 of file NGrid.h.

Member Function Documentation

◆ decUnloadActiveLock()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::decUnloadActiveLock ( )
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:

◆ GetGridId()

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

Definition at line 91 of file NGrid.h.

+ Here is the caller graph for this function:

◆ getGridInfoRef()

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

Definition at line 104 of file NGrid.h.

+ Here is the caller graph for this function:

◆ GetGridState()

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

Definition at line 92 of file NGrid.h.

+ Here is the caller graph for this function:

◆ GetGridType() [1/2]

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

Definition at line 79 of file NGrid.h.

+ Here is the caller graph for this function:

◆ GetGridType() [2/2]

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

Definition at line 85 of file NGrid.h.

◆ getTimeTracker()

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

Definition at line 105 of file NGrid.h.

+ Here is the call graph for this function:

◆ getUnloadLock()

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

Definition at line 106 of file NGrid.h.

+ Here is the call graph for this function:

◆ GetWorldObjectCountInNGrid()

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

Definition at line 179 of file NGrid.h.

+ Here is the caller graph for this function:

◆ getX()

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

Definition at line 94 of file NGrid.h.

+ Here is the caller graph for this function:

◆ getY()

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

Definition at line 95 of file NGrid.h.

+ Here is the caller graph for this function:

◆ incUnloadActiveLock()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::incUnloadActiveLock ( )
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:

◆ isGridObjectDataLoaded()

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

Definition at line 101 of file NGrid.h.

+ Here is the caller graph for this function:

◆ link()

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

Definition at line 97 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_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::ResetTimeTracker ( time_t  interval)
inline

Definition at line 110 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_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::setGridObjectDataLoaded ( bool  pLoaded)
inline

Definition at line 102 of file NGrid.h.

◆ SetGridState()

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

Definition at line 93 of file NGrid.h.

+ Here is the caller graph for this function:

◆ setUnloadExplicitLock()

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::setUnloadExplicitLock ( bool  on)
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:

◆ UpdateTimeTracker()

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

Definition at line 111 of file NGrid.h.

+ Here is the call graph for this function:

◆ VisitAllGrids() [1/2]

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class VISITOR >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::VisitAllGrids ( TypeContainerVisitor< VISITOR, GRID_OBJECT_CONTAINER > &  visitor)
inline

Definition at line 145 of file NGrid.h.

+ Here is the call graph for this function:

◆ VisitAllGrids() [2/2]

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class VISITOR >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::VisitAllGrids ( TypeContainerVisitor< VISITOR, WORLD_OBJECT_CONTAINER > &  visitor)
inline

Definition at line 137 of file NGrid.h.

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

◆ VisitGrid() [1/2]

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class VISITOR >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::VisitGrid ( uint32  x,
uint32  y,
TypeContainerVisitor< VISITOR, GRID_OBJECT_CONTAINER > &  visitor 
)
inline

Definition at line 160 of file NGrid.h.

+ Here is the call graph for this function:

◆ VisitGrid() [2/2]

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class VISITOR >
void NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::VisitGrid ( uint32  x,
uint32  y,
TypeContainerVisitor< VISITOR, WORLD_OBJECT_CONTAINER > &  visitor 
)
inline

Definition at line 154 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_CONTAINER , class GRID_OBJECT_CONTAINER >
GridType NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cells[N][N]
private

Definition at line 195 of file NGrid.h.

◆ i_cellstate

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
grid_state_t NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_cellstate
private

Definition at line 194 of file NGrid.h.

◆ i_gridId

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
uint32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_gridId
private

Definition at line 189 of file NGrid.h.

◆ i_GridInfo

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
GridInfo NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridInfo
private

Definition at line 190 of file NGrid.h.

◆ i_GridObjectDataLoaded

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
bool NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_GridObjectDataLoaded
private

Definition at line 196 of file NGrid.h.

◆ i_Reference

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
GridReference<NGrid> NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_Reference
private

Definition at line 191 of file NGrid.h.

◆ i_x

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
int32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_x
private

Definition at line 192 of file NGrid.h.

◆ i_y

template<uint32 N, class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
int32 NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_y
private

Definition at line 193 of file NGrid.h.


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