TrinityCore
Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER > 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, GRID_OBJECT_CONTAINER > &visitor)
 
template<class T >
void Visit (TypeContainerVisitor< T, WORLD_OBJECT_CONTAINER > &visitor)
 
template<class T >
uint32 GetWorldObjectCountInGrid () const
 
template<class SPECIFIC_OBJECT >
void AddGridObject (SPECIFIC_OBJECT *obj)
 

Private Attributes

GRID_OBJECT_CONTAINER i_container
 
WORLD_OBJECT_CONTAINER i_objects
 

Friends

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

Detailed Description

template<class ACTIVE_OBJECT, class WORLD_OBJECT_CONTAINER, class GRID_OBJECT_CONTAINER>
class Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >

Definition at line 45 of file Grid.h.

Constructor & Destructor Documentation

◆ ~Grid()

template<class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::~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_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class SPECIFIC_OBJECT >
void Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class SPECIFIC_OBJECT >
void Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class T >
uint32 Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class T >
void Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::Visit ( TypeContainerVisitor< T, GRID_OBJECT_CONTAINER > &  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 call graph for this function:
+ Here is the caller graph for this function:

◆ Visit() [2/2]

template<class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
template<class T >
void Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::Visit ( TypeContainerVisitor< T, WORLD_OBJECT_CONTAINER > &  visitor)
inline

Definition at line 95 of file Grid.h.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ GridLoader

template<class ACTIVE_OBJECT , class WORLD_OBJECT_CONTAINER , class GRID_OBJECT_CONTAINER >
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_CONTAINER , class GRID_OBJECT_CONTAINER >
GRID_OBJECT_CONTAINER Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::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_CONTAINER , class GRID_OBJECT_CONTAINER >
WORLD_OBJECT_CONTAINER Grid< ACTIVE_OBJECT, WORLD_OBJECT_CONTAINER, GRID_OBJECT_CONTAINER >::i_objects
private

Definition at line 138 of file Grid.h.


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