AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
GridReference< OBJECT > Class Template Reference

#include "GridReference.h"

Inheritance diagram for GridReference< OBJECT >:
Reference< GridRefMgr< OBJECT >, OBJECT > LinkedListElement

Public Member Functions

 GridReference ()
 
 ~GridReference () override
 
GridReferencenext ()
 
- Public Member Functions inherited from Reference< GridRefMgr< OBJECT >, OBJECT >
 Reference ()
 
virtual ~Reference ()=default
 
void link (GridRefMgr< OBJECT > *toObj, OBJECT *fromObj)
 
void unlink ()
 
void invalidate ()
 
bool isValid () const
 
Reference< GridRefMgr< OBJECT >, OBJECT > * next ()
 
Reference< GridRefMgr< OBJECT >, OBJECT > const * next () const
 
Reference< GridRefMgr< OBJECT >, OBJECT > * prev ()
 
Reference< GridRefMgr< OBJECT >, OBJECT > const * prev () const
 
Reference< GridRefMgr< OBJECT >, OBJECT > * nocheck_next ()
 
Reference< GridRefMgr< OBJECT >, OBJECT > const * nocheck_next () const
 
Reference< GridRefMgr< OBJECT >, OBJECT > * nocheck_prev ()
 
Reference< GridRefMgr< OBJECT >, OBJECT > const * nocheck_prev () const
 
GridRefMgr< OBJECT > * operator-> () const
 
GridRefMgr< OBJECT > * getTarget () const
 
OBJECT * GetSource () const
 
- Public Member Functions inherited from LinkedListElement
 LinkedListElement ()=default
 
 ~LinkedListElement ()
 
bool hasNext () const
 
bool hasPrev () const
 
bool isInList () const
 
LinkedListElementnext ()
 
LinkedListElement const * next () const
 
LinkedListElementprev ()
 
LinkedListElement const * prev () const
 
LinkedListElementnocheck_next ()
 
LinkedListElement const * nocheck_next () const
 
LinkedListElementnocheck_prev ()
 
LinkedListElement const * nocheck_prev () const
 
void delink ()
 
void insertBefore (LinkedListElement *pElem)
 
void insertAfter (LinkedListElement *pElem)
 

Protected Member Functions

void targetObjectBuildLink () override
 
void targetObjectDestroyLink () override
 
void sourceObjectDestroyLink () override
 
virtual void targetObjectBuildLink ()=0
 
virtual void targetObjectDestroyLink ()=0
 
virtual void sourceObjectDestroyLink ()=0
 

Detailed Description

template<class OBJECT>
class GridReference< OBJECT >

Constructor & Destructor Documentation

◆ GridReference()

template<class OBJECT >
GridReference< OBJECT >::GridReference ( )
inline
47: Reference<GridRefMgr<OBJECT>, OBJECT>() {}
Definition: Reference.h:27

◆ ~GridReference()

template<class OBJECT >
GridReference< OBJECT >::~GridReference ( )
inlineoverride

Member Function Documentation

◆ next()

template<class OBJECT >
GridReference * GridReference< OBJECT >::next ( )
inline
Definition: GridReference.h:28
GridReference * next()
Definition: GridReference.h:49

References GridReference< OBJECT >::next().

Referenced by GridReference< OBJECT >::next().

◆ sourceObjectDestroyLink()

template<class OBJECT >
void GridReference< OBJECT >::sourceObjectDestroyLink ( )
inlineoverrideprotectedvirtual

Implements Reference< GridRefMgr< OBJECT >, OBJECT >.

42 {
43 // called from invalidate()
44 this->getTarget()->decSize();
45 }
GridRefMgr< OBJECT > * getTarget() const
Definition: Reference.h:95

References Reference< GridRefMgr< OBJECT >, OBJECT >::getTarget().

◆ targetObjectBuildLink()

template<class OBJECT >
void GridReference< OBJECT >::targetObjectBuildLink ( )
inlineoverrideprotectedvirtual

Implements Reference< GridRefMgr< OBJECT >, OBJECT >.

31 {
32 // called from link()
33 this->getTarget()->insertFirst(this);
34 this->getTarget()->incSize();
35 }

References Reference< GridRefMgr< OBJECT >, OBJECT >::getTarget().

◆ targetObjectDestroyLink()

template<class OBJECT >
void GridReference< OBJECT >::targetObjectDestroyLink ( )
inlineoverrideprotectedvirtual

Implements Reference< GridRefMgr< OBJECT >, OBJECT >.

37 {
38 // called from unlink()
39 if (this->isValid()) this->getTarget()->decSize();
40 }
bool isValid() const
Definition: Reference.h:79

References Reference< GridRefMgr< OBJECT >, OBJECT >::getTarget(), and Reference< GridRefMgr< OBJECT >, OBJECT >::isValid().