TrinityCore
Loading...
Searching...
No Matches
NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER > Class Template Reference

#include <NGrid.h>

Public Types

typedef Grid< 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 >
std::size_t GetWorldObjectCountInNGrid () const
 
template<class T >
std::size_t GetGridObjectCountInNGrid () const
 
template<class T >
bool HasWorldObjectsInNGrid () const
 
template<class T >
bool HasGridObjectsInNGrid () 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 WORLD_OBJECT_CONTAINER, class GRID_OBJECT_CONTAINER>
class NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >

Definition at line 69 of file NGrid.h.

Member Typedef Documentation

◆ GridType

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

Definition at line 72 of file NGrid.h.

Constructor & Destructor Documentation

◆ NGrid()

template<uint32 N, class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
uint32 NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
GridInfo * NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::getGridInfoRef ( )
inline

Definition at line 103 of file NGrid.h.

+ Here is the caller graph for this function:

◆ GetGridObjectCountInNGrid()

template<uint32 N, class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class T >
std::size_t NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridObjectCountInNGrid ( ) const
inline

Definition at line 175 of file NGrid.h.

◆ GetGridState()

template<uint32 N, class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
grid_state_t NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
GridType & NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
GridType const & NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::GetGridType ( const uint32  x,
const uint32  y 
) const
inline

Definition at line 84 of file NGrid.h.

◆ getTimeTracker()

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

Definition at line 104 of file NGrid.h.

+ Here is the call graph for this function:

◆ getUnloadLock()

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

Definition at line 105 of file NGrid.h.

+ Here is the call graph for this function:

◆ GetWorldObjectCountInNGrid()

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

Definition at line 165 of file NGrid.h.

◆ getX()

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

Definition at line 93 of file NGrid.h.

+ Here is the caller graph for this function:

◆ getY()

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

Definition at line 94 of file NGrid.h.

+ Here is the caller graph for this function:

◆ HasGridObjectsInNGrid()

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

Definition at line 195 of file NGrid.h.

◆ HasWorldObjectsInNGrid()

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

Definition at line 185 of file NGrid.h.

+ Here is the caller graph for this function:

◆ incUnloadActiveLock()

template<uint32 N, class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
bool NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::isGridObjectDataLoaded ( ) const
inline

Definition at line 100 of file NGrid.h.

+ Here is the caller graph for this function:

◆ link()

template<uint32 N, class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::link ( GridRefManager< NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER > > *  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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::setGridObjectDataLoaded ( bool  pLoaded)
inline

Definition at line 101 of file NGrid.h.

◆ SetGridState()

template<uint32 N, class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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 WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::UpdateTimeTracker ( time_t  diff)
inline

Definition at line 110 of file NGrid.h.

+ Here is the call graph for this function:

◆ VisitAllGrids() [1/2]

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

Definition at line 144 of file NGrid.h.

+ Here is the call graph for this function:

◆ VisitAllGrids() [2/2]

template<uint32 N, class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class VISITOR >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::VisitAllGrids ( TypeContainerVisitor< VISITOR, WORLD_OBJECT_CONTAINER > &  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() [1/2]

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

Definition at line 159 of file NGrid.h.

+ Here is the call graph for this function:

◆ VisitGrid() [2/2]

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

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

Definition at line 211 of file NGrid.h.

◆ i_cellstate

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

Definition at line 210 of file NGrid.h.

◆ i_gridId

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

Definition at line 205 of file NGrid.h.

◆ i_GridInfo

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

Definition at line 206 of file NGrid.h.

◆ i_GridObjectDataLoaded

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

Definition at line 212 of file NGrid.h.

◆ i_Reference

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

Definition at line 207 of file NGrid.h.

◆ i_x

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

Definition at line 208 of file NGrid.h.

◆ i_y

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

Definition at line 209 of file NGrid.h.


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