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)
 
GridType & GetGridType (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)
 
GridInfo * getGridInfoRef ()
 
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< NGrid > 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 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

◆ 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

◆ getGridInfoRef()

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

◆ 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

◆ 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

◆ GetGridType() [1/2]

◆ 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

◆ 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

◆ getUnloadLock()

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

◆ 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

◆ getX()

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

◆ getY()

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

◆ 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

◆ 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

◆ incUnloadActiveLock()

template<uint32 N, class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
void NGrid< N, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::incUnloadActiveLock ( )
inline

◆ isGridObjectDataLoaded()

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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

◆ 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

Member Data Documentation

◆ i_cells

◆ 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

◆ 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

◆ i_GridInfo

◆ 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

◆ 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

◆ 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

◆ 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

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