#include <smart_ptr.h>
Public Member Functions | |
CDbgPtr (const CDbgPtr ©) | |
template<class W> | CDbgPtr (const W *p) |
CDbgPtr () | |
bool | isNULL () const |
T & | operator * (void) const |
operator T * (void) const | |
template<class W> | operator W * (void) const |
bool | operator!= (int p) const |
bool | operator!= (const CDbgPtr &p) const |
template<class W> bool | operator!= (const W *p) const |
T * | operator-> (void) const |
bool | operator< (const CDbgPtr &p) const |
CDbgPtr & | operator= (const CDbgPtr &p) |
CDbgPtr & | operator= (const int value) |
template<class W> CDbgPtr & | operator= (const W *p) |
bool | operator== (int p) const |
bool | operator== (const CDbgPtr &p) const |
template<class W> bool | operator== (const W *p) const |
T * | ptr () const |
~CDbgPtr () | |
Private Attributes | |
T * | Ptr |
|
Definition at line 412 of file smart_ptr.h.
00413 { Ptr=NULL; } |
|
Definition at line 419 of file smart_ptr.h.
|
|
Definition at line 431 of file smart_ptr.h. References NLMISC::CDbgPtr< T >::Ptr.
|
|
Definition at line 549 of file smart_ptr.h.
00550 { 00551 #ifdef NL_DEBUG_PTR 00552 if(Ptr) 00553 { 00554 // CDbgRefCount<T> *ref=const_cast<CDbgRefCount<T>*>(static_cast<const CDbgRefCount<T>*>(Ptr)); 00555 CDbgRefCount<T> *ref=static_cast<CDbgRefCount<T>*>(Ptr); 00556 ref->decRef(*this); 00557 Ptr=NULL; 00558 } 00559 #else 00560 Ptr=NULL; 00561 #endif 00562 } |
|
Definition at line 444 of file smart_ptr.h.
00445 { 00446 return Ptr==NULL; 00447 } |
|
Definition at line 465 of file smart_ptr.h.
00465 { return *Ptr; } |
|
Definition at line 454 of file smart_ptr.h.
00455 { 00456 return Ptr; 00457 } |
|
Definition at line 460 of file smart_ptr.h.
00461 { 00462 return NLMISC::type_cast<W*>(Ptr); 00463 } |
|
Definition at line 540 of file smart_ptr.h. References nlassert.
|
|
Definition at line 530 of file smart_ptr.h. References NLMISC::CDbgPtr< T >::Ptr.
00531 { 00532 return Ptr!=p.Ptr; 00533 } |
|
Definition at line 521 of file smart_ptr.h.
00522 { 00523 return Ptr!=NLMISC::type_cast<const T*>(p); 00524 } |
|
Definition at line 466 of file smart_ptr.h.
00466 { return Ptr; } |
|
Definition at line 572 of file smart_ptr.h. References NLMISC::CDbgPtr< T >::Ptr.
00573 { 00574 return Ptr<p.Ptr; 00575 } |
|
Definition at line 566 of file smart_ptr.h. References NLMISC::CDbgPtr< T >::Ptr.
00567 {
00568 return CDbgPtr<T>::operator=(p.Ptr);
00569 }
|
|
Definition at line 491 of file smart_ptr.h. References nlassert, and value.
00492 { 00493 #ifdef NL_DEBUG 00494 nlassert(value==NULL); 00495 #endif 00496 00497 #ifdef NL_DEBUG_PTR 00498 if (Ptr) 00499 { 00500 CDbgRefCount<T> *ref=static_cast<CDbgRefCount<T>*>(Ptr); 00501 ref->decRef(*this); 00502 } 00503 Ptr = NULL; 00504 00505 #else 00506 Ptr = NULL; 00507 #endif 00508 return *this; 00509 } |
|
Definition at line 470 of file smart_ptr.h.
00471 { 00472 #ifdef NL_DEBUG_PTR 00473 if (p) 00474 { 00475 CDbgRefCount<T> *ref=static_cast<CDbgRefCount<T>*>(const_cast<T*>(NLMISC::type_cast<const T*>(p))); 00476 ref->incRef(*this); 00477 } 00478 if (Ptr) 00479 { 00480 CDbgRefCount<T> *ref=static_cast<CDbgRefCount<T>*>(Ptr); 00481 ref->decRef(*this); 00482 } 00483 Ptr = const_cast<T*>(NLMISC::type_cast<const T*>(p)); 00484 00485 #else 00486 Ptr = const_cast<T*>(NLMISC::type_cast<const T*>(p)); 00487 #endif 00488 return *this; 00489 } |
|
Definition at line 535 of file smart_ptr.h. References nlassert.
|
|
Definition at line 526 of file smart_ptr.h. References NLMISC::CDbgPtr< T >::Ptr.
00527 { 00528 return Ptr==p.Ptr; 00529 } |
|
Definition at line 516 of file smart_ptr.h.
00517 { 00518 return Ptr==NLMISC::type_cast<const T*>(p); 00519 } |
|
Definition at line 449 of file smart_ptr.h.
00450 { 00451 return Ptr; 00452 } |
|
Definition at line 409 of file smart_ptr.h. Referenced by NLMISC::CDbgPtr< T >::CDbgPtr(), NLMISC::CDbgPtr< T >::operator!=(), NLMISC::CDbgPtr< T >::operator<(), NLMISC::CDbgPtr< T >::operator=(), and NLMISC::CDbgPtr< T >::operator==(). |