TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Reference< TO, FROM > Class Template Referenceabstract

#include <Reference.h>

Public Member Functions

 Reference ()
 
virtual ~Reference ()
 
void link (TO *toObj, FROM *fromObj)
 
void unlink ()
 
void invalidate ()
 
bool isValid () const
 
Reference< TO, FROM > * next ()
 
Reference< TO, FROM > constnext () const
 
Reference< TO, FROM > * prev ()
 
Reference< TO, FROM > constprev () const
 
Reference< TO, FROM > * nocheck_next ()
 
Reference< TO, FROM > constnocheck_next () const
 
Reference< TO, FROM > * nocheck_prev ()
 
Reference< TO, FROM > constnocheck_prev () const
 
TO * operator-> () const
 
TO * getTarget () const
 
FROM * GetSource () const
 
- Public Member Functions inherited from LinkedListElement
 LinkedListElement ()
 
virtual ~LinkedListElement ()
 
bool hasNext () const
 
bool hasPrev () const
 
bool isInList () const
 
LinkedListElementnext ()
 
LinkedListElement constnext () const
 
LinkedListElementprev ()
 
LinkedListElement constprev () const
 
LinkedListElementnocheck_next ()
 
LinkedListElement constnocheck_next () const
 
LinkedListElementnocheck_prev ()
 
LinkedListElement constnocheck_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 Member Functions

 Reference (Reference const &)
 
Referenceoperator= (Reference const &)
 

Private Attributes

TO * iRefTo
 
FROM * iRefFrom
 

Constructor & Destructor Documentation

template<class TO, class FROM>
Reference< TO, FROM >::Reference ( )
inline
42 { iRefTo = NULL; iRefFrom = NULL; }
arena_t NULL
Definition: jemalloc_internal.h:624
TO * iRefTo
Definition: Reference.h:30
FROM * iRefFrom
Definition: Reference.h:31
template<class TO, class FROM>
virtual Reference< TO, FROM >::~Reference ( )
inlinevirtual
43 { }
template<class TO, class FROM>
Reference< TO, FROM >::Reference ( Reference< TO, FROM > const )
private

Member Function Documentation

template<class TO, class FROM>
FROM* Reference< TO, FROM >::GetSource ( ) const
inline
96 { return iRefFrom; }
FROM * iRefFrom
Definition: Reference.h:31

+ Here is the caller graph for this function:

template<class TO, class FROM>
TO* Reference< TO, FROM >::getTarget ( ) const
inline
94 { return iRefTo; }
TO * iRefTo
Definition: Reference.h:30

+ Here is the caller graph for this function:

template<class TO, class FROM>
void Reference< TO, FROM >::invalidate ( )
inline
72  {
74  delink();
75  iRefTo = NULL;
76  }
arena_t NULL
Definition: jemalloc_internal.h:624
virtual void sourceObjectDestroyLink()=0
void delink()
Definition: LinkedList.h:53
TO * iRefTo
Definition: Reference.h:30
template<class TO, class FROM>
bool Reference< TO, FROM >::isValid ( ) const
inline
79  {
80  return iRefTo != NULL;
81  }
arena_t NULL
Definition: jemalloc_internal.h:624
TO * iRefTo
Definition: Reference.h:30

+ Here is the caller graph for this function:

template<class TO, class FROM>
void Reference< TO, FROM >::link ( TO *  toObj,
FROM *  fromObj 
)
inline
47  {
48  ASSERT(fromObj); // fromObj MUST not be NULL
49  if (isValid())
50  unlink();
51  if (toObj != NULL)
52  {
53  iRefTo = toObj;
54  iRefFrom = fromObj;
56  }
57  }
void unlink()
Definition: Reference.h:61
arena_t NULL
Definition: jemalloc_internal.h:624
TO * iRefTo
Definition: Reference.h:30
FROM * iRefFrom
Definition: Reference.h:31
virtual void targetObjectBuildLink()=0
#define ASSERT
Definition: Errors.h:55
bool isValid() const
Definition: Reference.h:78

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

template<class TO, class FROM>
Reference<TO, FROM> const* Reference< TO, FROM >::next ( ) const
inline
84 { return((Reference<TO, FROM> const*) LinkedListElement::next()); }
LinkedListElement * next()
Definition: LinkedList.h:43
Definition: Reference.h:27
template<class TO, class FROM>
Reference<TO, FROM>* Reference< TO, FROM >::nocheck_next ( )
inline
LinkedListElement * nocheck_next()
Definition: LinkedList.h:48
Definition: Reference.h:27
template<class TO, class FROM>
Reference<TO, FROM> const* Reference< TO, FROM >::nocheck_next ( ) const
inline
LinkedListElement * nocheck_next()
Definition: LinkedList.h:48
Definition: Reference.h:27
template<class TO, class FROM>
Reference<TO, FROM>* Reference< TO, FROM >::nocheck_prev ( )
inline
LinkedListElement * nocheck_prev()
Definition: LinkedList.h:50
Definition: Reference.h:27

+ Here is the caller graph for this function:

template<class TO, class FROM>
Reference<TO, FROM> const* Reference< TO, FROM >::nocheck_prev ( ) const
inline
LinkedListElement * nocheck_prev()
Definition: LinkedList.h:50
Definition: Reference.h:27
template<class TO, class FROM>
TO* Reference< TO, FROM >::operator-> ( ) const
inline
93 { return iRefTo; }
TO * iRefTo
Definition: Reference.h:30
template<class TO, class FROM>
Reference& Reference< TO, FROM >::operator= ( Reference< TO, FROM > const )
private
template<class TO, class FROM>
Reference<TO, FROM>* Reference< TO, FROM >::prev ( )
inline
Definition: Reference.h:27
LinkedListElement * prev()
Definition: LinkedList.h:45
template<class TO, class FROM>
Reference<TO, FROM> const* Reference< TO, FROM >::prev ( ) const
inline
86 { return((Reference<TO, FROM> const*) LinkedListElement::prev()); }
Definition: Reference.h:27
LinkedListElement * prev()
Definition: LinkedList.h:45
template<class TO, class FROM>
void Reference< TO, FROM >::unlink ( )
inline
62  {
64  delink();
65  iRefTo = NULL;
66  iRefFrom = NULL;
67  }
virtual void targetObjectDestroyLink()=0
arena_t NULL
Definition: jemalloc_internal.h:624
void delink()
Definition: LinkedList.h:53
TO * iRefTo
Definition: Reference.h:30
FROM * iRefFrom
Definition: Reference.h:31

+ Here is the caller graph for this function:

Member Data Documentation

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

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