![]() |
![]() |
#include <DetectorDescription/Base/interface/Ptr.h>
Public Member Functions | |
void | make_unique () |
T & | operator * () const |
operator bool () const | |
T * | operator-> () const |
bool | operator< (const Ptr< T > P) const |
Ptr & | operator= (const Ptr &) |
bool | operator== (const Ptr< T > P) const |
Ptr (const Ptr &h) | |
Ptr (T *t) | |
Ptr () | |
~Ptr () | |
Private Attributes | |
T * | p |
std::size_t * | refptr |
Definition at line 9 of file Ptr.h.
Definition at line 72 of file Ptr.h.
References Ptr< T >::refptr.
00073 { 00074 if (--*refptr == 0) { 00075 delete refptr; 00076 /* 00077 if (p) 00078 std::cout << "DC:\t\tPtr deleted: " << std::endl; 00079 else 00080 std::cout << "DC: \t\tPtr deleted: dangling" << std::endl; 00081 delete p; 00082 */ 00083 } 00084 }
T * Ptr< T >::operator-> | ( | ) | const [inline] |
Definition at line 57 of file Ptr.h.
References Ptr< T >::p, and Ptr< T >::refptr.
00058 { 00059 ++*rhs.refptr; 00060 // free the lhs, destroying pointers if appropriate 00061 if (--*refptr == 0) { 00062 delete refptr; 00063 delete p; 00064 } 00065 00066 // copy in values from the right-hand side 00067 refptr = rhs.refptr; 00068 p = rhs.p; 00069 return *this; 00070 }
Definition at line 38 of file Ptr.h.
Referenced by Ptr< DDCompactViewImpl >::make_unique(), Ptr< T >::operator *(), Ptr< DDCompactViewImpl >::operator bool(), Ptr< T >::operator->(), Ptr< DDCompactViewImpl >::operator<(), Ptr< T >::operator=(), and Ptr< DDCompactViewImpl >::operator==().
Definition at line 39 of file Ptr.h.
Referenced by Ptr< DDCompactViewImpl >::make_unique(), Ptr< T >::operator=(), Ptr< DDCompactViewImpl >::Ptr(), and Ptr< T >::~Ptr().