Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > Class Template Reference

#include <NGrid.h>

Collaboration diagram for NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >:

Public Types

typedef Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > GridType

Public Member Functions

void decUnloadActiveLock ()
uint32 GetGridId (void) const
GridInfogetGridInfoRef ()
grid_state_t GetGridState (void) const
GridTypeGetGridType (const uint32 x, const uint32 y)
GridType const & GetGridType (const uint32 x, const uint32 y) const
const TimeTrackergetTimeTracker () const
bool getUnloadLock () const
template<class T>
uint32 GetWorldObjectCountInNGrid () const
int32 getX () const
int32 getY () const
void incUnloadActiveLock ()
bool isGridObjectDataLoaded () const
void link (GridRefManager< NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > > *pTo)
 NGrid (uint32 id, int32 x, int32 y, time_t expiry, bool unload=true)
void ResetTimeTracker (time_t interval)
void SetGridId (uint32 id)
void setGridObjectDataLoaded (bool pLoaded)
void SetGridState (grid_state_t s)
void setUnloadExplicitLock (bool on)
void setUnloadReferenceLock (bool on)
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)

Private Attributes

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

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 64 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 67 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 68 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 105 of file NGrid.h.

Referenced by Map::RemoveFromActive().

◆ 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 85 of file NGrid.h.

◆ 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 99 of file NGrid.h.

Referenced by Map::ProcessRelocationNotifies().

◆ 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

◆ 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

◆ 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 79 of file NGrid.h.

◆ getTimeTracker()

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

Definition at line 100 of file NGrid.h.

◆ 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 101 of file NGrid.h.

Referenced by Map::GetUnloadLock().

◆ 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 161 of file NGrid.h.

Referenced by Map::UnloadGrid(), and ActiveState::Update().

◆ 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

◆ 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

◆ 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 104 of file NGrid.h.

Referenced by Map::AddToActive().

◆ 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 96 of file NGrid.h.

Referenced by Map::isGridObjectDataLoaded().

◆ 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 92 of file NGrid.h.

Referenced by Map::buildNGridLinkage().

◆ 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 106 of file NGrid.h.

Referenced by Map::ResetGridExpiry().

◆ SetGridId()

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 >::SetGridId ( uint32 id)
inline

Definition at line 86 of file NGrid.h.

◆ 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 97 of file NGrid.h.

Referenced by Map::setGridObjectDataLoaded().

◆ 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

◆ 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 102 of file NGrid.h.

Referenced by Map::SetUnloadLock().

◆ setUnloadReferenceLock()

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 >::setUnloadReferenceLock ( bool on)
inline

Definition at line 103 of file NGrid.h.

Referenced by Map::SetUnloadReferenceLock().

◆ 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 107 of file NGrid.h.

◆ 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 133 of file NGrid.h.

Referenced by Map::UnloadGrid(), and ActiveState::Update().

◆ 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 142 of file NGrid.h.

Referenced by Map::Visit().

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 177 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 176 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 171 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 172 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 178 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 173 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 174 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 175 of file NGrid.h.


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