AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Reference< TO, FROM > Class Template Referenceabstract

#include "Reference.h"

Inheritance diagram for Reference< TO, FROM >:
LinkedListElement GridReference< Corpse > GridReference< Creature > GridReference< DynamicObject > GridReference< GameObject > GridReference< Player > GridReference< T > GridReference< NGrid< N, ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES > >

Public Member Functions

 Reference ()
 
virtual ~Reference ()=default
 
void link (TO *toObj, FROM *fromObj)
 
void unlink ()
 
void invalidate ()
 
bool isValid () const
 
Reference< TO, FROM > * next ()
 
Reference< TO, FROM > const * next () const
 
Reference< TO, FROM > * prev ()
 
Reference< TO, FROM > const * prev () const
 
Reference< TO, FROM > * nocheck_next ()
 
Reference< TO, FROM > const * nocheck_next () const
 
Reference< TO, FROM > * nocheck_prev ()
 
Reference< TO, FROM > const * nocheck_prev () const
 
TO * operator-> () const
 
TO * getTarget () const
 
FROM * 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

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

Private Attributes

TO * iRefTo
 
FROM * iRefFrom
 

Detailed Description

template<class TO, class FROM>
class Reference< TO, FROM >

Constructor & Destructor Documentation

◆ Reference()

template<class TO , class FROM >
Reference< TO, FROM >::Reference ( )
inline
41{ iRefTo = nullptr; iRefFrom = nullptr; }
TO * iRefTo
Definition: Reference.h:29
FROM * iRefFrom
Definition: Reference.h:30

References Reference< TO, FROM >::iRefFrom, and Reference< TO, FROM >::iRefTo.

◆ ~Reference()

template<class TO , class FROM >
virtual Reference< TO, FROM >::~Reference ( )
virtualdefault

Member Function Documentation

◆ GetSource()

template<class TO , class FROM >
FROM * Reference< TO, FROM >::GetSource ( ) const
inline
97{ return iRefFrom; }

References Reference< TO, FROM >::iRefFrom.

Referenced by Group::CanJoinBattlegroundQueue(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::ChromieWhisper(), HostileRefMgr::deleteReference(), HostileRefMgr::deleteReferences(), HostileRefMgr::deleteReferencesForFaction(), HostileRefMgr::deleteReferencesOutOfRange(), npc_arthas::npc_arthasAI::DoAction(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::GetCreatureEntry(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::GetCreatureEntry(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::GetGameObjectEntry(), debug_commandscript::HandleDebugHostileRefListCommand(), npc_pet_mage_mirror_image::InitializeAI(), boss_apothecary_hummel::boss_apothecary_hummelAI::JustDied(), npc_coren_direbrew::JustDied(), boss_headless_horseman::JustDied(), boss_ahune::JustDied(), boss_four_horsemen::boss_four_horsemenAI::JustDied(), instance_trial_of_the_champion::instance_trial_of_the_champion_InstanceMapScript::OnCreatureCreate(), instance_forge_of_souls::instance_forge_of_souls_InstanceScript::OnCreatureCreate(), instance_pit_of_saron::instance_pit_of_saron_InstanceScript::OnCreatureCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnCreatureCreate(), instance_nexus::instance_nexus_InstanceMapScript::OnCreatureCreate(), instance_shattered_halls::instance_shattered_halls_InstanceMapScript::OnCreatureCreate(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::OnGameObjectCreate(), HostileRefMgr::setOnlineOfflineState(), Unit::SetPhaseMask(), HostileRefMgr::threatAssist(), Map::Update(), instance_icecrown_citadel::instance_icecrown_citadel_InstanceMapScript::Update(), npc_arthas::npc_arthasAI::UpdateAI(), and HostileRefMgr::UpdateVisibility().

◆ getTarget()

◆ invalidate()

template<class TO , class FROM >
void Reference< TO, FROM >::invalidate ( )
inline
73 {
75 delink();
76 iRefTo = nullptr;
77 }
void delink()
Definition: LinkedList.h:52
virtual void sourceObjectDestroyLink()=0

References LinkedListElement::delink(), Reference< TO, FROM >::iRefTo, and Reference< TO, FROM >::sourceObjectDestroyLink().

◆ isValid()

template<class TO , class FROM >
bool Reference< TO, FROM >::isValid ( ) const
inline

◆ link()

template<class TO , class FROM >
void Reference< TO, FROM >::link ( TO *  toObj,
FROM *  fromObj 
)
inline

◆ next() [1/2]

template<class TO , class FROM >
Reference< TO, FROM > * Reference< TO, FROM >::next ( )
inline
LinkedListElement * next()
Definition: LinkedList.h:42
Definition: Reference.h:27

References LinkedListElement::next().

Referenced by GroupReference::next(), and MapReference::next().

◆ next() [2/2]

template<class TO , class FROM >
Reference< TO, FROM > const * Reference< TO, FROM >::next ( ) const
inline

◆ nocheck_next() [1/2]

template<class TO , class FROM >
Reference< TO, FROM > * Reference< TO, FROM >::nocheck_next ( )
inline
LinkedListElement * nocheck_next()
Definition: LinkedList.h:47

References LinkedListElement::nocheck_next().

◆ nocheck_next() [2/2]

template<class TO , class FROM >
Reference< TO, FROM > const * Reference< TO, FROM >::nocheck_next ( ) const
inline

◆ nocheck_prev() [1/2]

template<class TO , class FROM >
Reference< TO, FROM > * Reference< TO, FROM >::nocheck_prev ( )
inline
LinkedListElement * nocheck_prev()
Definition: LinkedList.h:49

References LinkedListElement::nocheck_prev().

Referenced by MapReference::nocheck_prev(), and MapReference::nockeck_prev().

◆ nocheck_prev() [2/2]

template<class TO , class FROM >
Reference< TO, FROM > const * Reference< TO, FROM >::nocheck_prev ( ) const
inline

◆ operator->()

template<class TO , class FROM >
TO * Reference< TO, FROM >::operator-> ( ) const
inline
94{ return iRefTo; }

References Reference< TO, FROM >::iRefTo.

◆ prev() [1/2]

template<class TO , class FROM >
Reference< TO, FROM > * Reference< TO, FROM >::prev ( )
inline
LinkedListElement * prev()
Definition: LinkedList.h:44

References LinkedListElement::prev().

◆ prev() [2/2]

template<class TO , class FROM >
Reference< TO, FROM > const * Reference< TO, FROM >::prev ( ) const
inline

◆ sourceObjectDestroyLink()

◆ targetObjectBuildLink()

◆ targetObjectDestroyLink()

◆ unlink()

Member Data Documentation

◆ iRefFrom

template<class TO , class FROM >
FROM* Reference< TO, FROM >::iRefFrom
private

◆ iRefTo