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

#include <Grid.h>

Collaboration diagram for Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >:

Public Member Functions

template<class SPECIFIC_OBJECT>
void AddGridObject (SPECIFIC_OBJECT *obj)
template<class SPECIFIC_OBJECT>
void AddWorldObject (SPECIFIC_OBJECT *obj)
template<class T>
uint32 GetWorldObjectCountInGrid () const
template<class T>
void Visit (TypeContainerVisitor< T, TypeMapContainer< GRID_OBJECT_TYPES > > &visitor)
template<class T>
void Visit (TypeContainerVisitor< T, TypeMapContainer< WORLD_OBJECT_TYPES > > &visitor)
 ~Grid ()

Private Attributes

TypeMapContainer< GRID_OBJECT_TYPES > i_container
TypeMapContainer< WORLD_OBJECT_TYPES > i_objects

Friends

template<class A, class T, class O>
class GridLoader

Detailed Description

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
class Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >

Definition at line 33 of file Grid.h.

Constructor & Destructor Documentation

◆ ~Grid()

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::~Grid ( )
inline

destructor to clean up its resources. This includes unloading the grid if it has not been unload.

Definition at line 41 of file Grid.h.

Member Function Documentation

◆ AddGridObject()

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
template<class SPECIFIC_OBJECT>
void Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::AddGridObject ( SPECIFIC_OBJECT * obj)
inline

Inserts a container type object into the grid.

Definition at line 98 of file Grid.h.

Referenced by Map::AddToGrid(), Map::AddToGrid(), Map::SwitchGridContainers(), and Map::SwitchGridContainers().

◆ AddWorldObject()

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
template<class SPECIFIC_OBJECT>
void Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::AddWorldObject ( SPECIFIC_OBJECT * obj)
inline

an object of interested enters the grid

Definition at line 45 of file Grid.h.

Referenced by ObjectAccessor::AddCorpsesToGrid(), Map::AddToGrid(), Map::SwitchGridContainers(), and Map::SwitchGridContainers().

◆ GetWorldObjectCountInGrid()

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
template<class T>
uint32 Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::GetWorldObjectCountInGrid ( ) const
inline

Returns the number of object within the grid.

Definition at line 91 of file Grid.h.

◆ Visit() [1/2]

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
template<class T>
void Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::Visit ( TypeContainerVisitor< T, TypeMapContainer< GRID_OBJECT_TYPES > > & visitor)
inline

an object of interested exits the grid Refreshes/update the grid. This required for remote grids. Locks a grid. Any object enters must wait until the grid is unlock. Unlocks the grid.

Definition at line 75 of file Grid.h.

Referenced by NGrid< MAX_NUMBER_OF_CELLS, Player, AllWorldObjectTypes, AllGridObjectTypes >::VisitAllGrids(), and NGrid< MAX_NUMBER_OF_CELLS, Player, AllWorldObjectTypes, AllGridObjectTypes >::VisitGrid().

◆ Visit() [2/2]

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
template<class T>
void Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::Visit ( TypeContainerVisitor< T, TypeMapContainer< WORLD_OBJECT_TYPES > > & visitor)
inline

Definition at line 82 of file Grid.h.

◆ GridLoader

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
template<class A, class T, class O>
friend class GridLoader
friend

Definition at line 36 of file Grid.h.

Member Data Documentation

◆ i_container

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
TypeMapContainer<GRID_OBJECT_TYPES> Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_container
private

Removes a containter type object from the grid

Definition at line 124 of file Grid.h.

◆ i_objects

template<class ACTIVE_OBJECT, class WORLD_OBJECT_TYPES, class GRID_OBJECT_TYPES>
TypeMapContainer<WORLD_OBJECT_TYPES> Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES >::i_objects
private

Definition at line 125 of file Grid.h.


The documentation for this class was generated from the following file:
  • src/server/game/Grids/Grid.h