OregonCore  revision be9e804-git
Your Favourite TBC server
GridObject< T > Class Template Reference

#include <Object.h>

Public Member Functions

bool IsInGrid () const
 
void AddToGrid (GridRefManager< T > &m)
 
void RemoveFromGrid ()
 

Private Attributes

GridReference< T > _gridRef
 

Detailed Description

template<class T>
class GridObject< T >

Definition at line 576 of file Object.h.

Member Function Documentation

template<class T>
void GridObject< T >::AddToGrid ( GridRefManager< T > &  m)
inline

Definition at line 580 of file Object.h.

580 { ASSERT(!IsInGrid()); _gridRef.link(&m, (T*)this); }
GridReference< T > _gridRef
Definition: Object.h:583
bool IsInGrid() const
Definition: Object.h:579
void link(TO *toObj, FROM *fromObj)
Definition: Reference.h:42
#define ASSERT
Definition: Errors.h:29
template<class T>
bool GridObject< T >::IsInGrid ( ) const
inline

Definition at line 579 of file Object.h.

Referenced by LoadHelper(), and Map::RemovePlayerFromMap().

579 { return _gridRef.isValid(); }
GridReference< T > _gridRef
Definition: Object.h:583
bool isValid() const
Definition: Reference.h:74
template<class T>
void GridObject< T >::RemoveFromGrid ( )
inline

Definition at line 581 of file Object.h.

Referenced by Map::CreatureCellRelocation(), Map::PlayerRelocation(), Map::RemovePlayerFromMap(), and Map::SwitchGridContainers().

581 { ASSERT(IsInGrid()); _gridRef.unlink(); }
void unlink()
Definition: Reference.h:57
GridReference< T > _gridRef
Definition: Object.h:583
bool IsInGrid() const
Definition: Object.h:579
#define ASSERT
Definition: Errors.h:29

Member Data Documentation

template<class T>
GridReference<T> GridObject< T >::_gridRef
private

Definition at line 583 of file Object.h.


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