TrinityCore
Grid< ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > Class Template Reference

#include <Grid.h>

Public Member Functions

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

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 45 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 54 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 111 of file Grid.h.

+ Here is the caller graph for this function:

◆ 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 58 of file Grid.h.

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

◆ 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 95 of file Grid.h.

Friends And Related Function Documentation

◆ 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 48 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 137 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 138 of file Grid.h.


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