#include <nObserver.h>
Public Member Functions | |
operator bool () const | |
bool | operator! () const |
const T * | GetPointer () const |
operator const T * () const | |
const T * | operator-> () const |
const T * | operator * () const |
void | SetObject (const T *t) |
nObserverPtr & | operator= (const T *t) |
nObserverPtr (const T *t) | |
nObserverPtr () | |
Private Member Functions | |
tCONTROLLED_PTR (nObserver) observer_ |
Definition at line 60 of file nObserver.h.
nObserverPtr< T >::nObserverPtr | ( | const T * | t | ) | [inline] |
nObserverPtr< T >::nObserverPtr | ( | ) | [inline] |
nObserverPtr< T >::operator bool | ( | ) | const [inline] |
Definition at line 63 of file nObserver.h.
Referenced by nObserverPtr< ePlayerNetID >::operator!().
00064 { 00065 #ifdef DEBUG 00066 nObserver::SetLastChecked( this->observer_ ); 00067 #endif 00068 00069 return ( bool( this->observer_ ) && this->observer_->GetNetObject() ); 00070 }
bool nObserverPtr< T >::operator! | ( | ) | const [inline] |
const T* nObserverPtr< T >::GetPointer | ( | ) | const [inline] |
Definition at line 77 of file nObserver.h.
Referenced by gEnemyInfluence::AddWall(), gEnemyInfluence::GetEnemy(), and nObserverPtr< T >::operator const T *().
00078 { 00079 if ( this->observer_ ) 00080 return dynamic_cast< const T* >( observer_->GetNetObject() ); 00081 else 00082 return NULL; 00083 }
nObserverPtr< T >::operator const T * | ( | ) | const [inline] |
Definition at line 85 of file nObserver.h.
References nObserverPtr< T >::GetPointer().
00086 { 00087 return this->GetPointer(); 00088 }
const T* nObserverPtr< T >::operator-> | ( | ) | const [inline] |
Definition at line 90 of file nObserver.h.
00091 { 00092 const T* t = *this; 00093 00094 #ifdef DEBUG 00095 // tASSERT( nObserver::WasChecked( this->observer_ ) ); 00096 #endif 00097 00098 tASSERT(t); 00099 00100 return t; 00101 }
const T* nObserverPtr< T >::operator * | ( | ) | const [inline] |
Definition at line 103 of file nObserver.h.
00104 { 00105 const T* t = *this; 00106 00107 #ifdef DEBUG 00108 // tASSERT( nObserver::WasChecked( this->observer_ ) ); 00109 #endif 00110 00111 tASSERT(t); 00112 00113 return t; 00114 }
void nObserverPtr< T >::SetObject | ( | const T * | t | ) | [inline] |
Definition at line 116 of file nObserver.h.
Referenced by nObserverPtr< ePlayerNetID >::nObserverPtr(), and nObserverPtr< ePlayerNetID >::operator=().
00117 { 00118 if ( t == NULL ) 00119 observer_ = NULL; 00120 else 00121 observer_ = &t->GetObserver(); 00122 }
nObserverPtr& nObserverPtr< T >::operator= | ( | const T * | t | ) | [inline] |
Definition at line 124 of file nObserver.h.
00125 { 00126 SetObject( t ); 00127 00128 return *this; 00129 }
nObserverPtr< T >::tCONTROLLED_PTR | ( | nObserver | ) | [private] |