PTLib
Version 2.18.8
|
This template class creates a type safe version of PSmartPointer. More...
#include <smartptr.h>
Public Member Functions | |
PSmartPtr (T *ptr=NULL) | |
Constructor. More... | |
T * | operator-> () const |
Access to the members of the smart object in the smart pointer. More... | |
T & | operator* () const |
Access to the dereferenced smart object in the smart pointer. More... | |
operator T * () const | |
Access to the value of the smart pointer. More... | |
![]() | |
PSmartPointer (PSmartObject *obj=NULL) | |
Create a new smart pointer instance and have it point to the specified PSmartObject instance. More... | |
PSmartPointer (const PSmartPointer &ptr) | |
Create a new smart pointer and point it at the data pointed to by the ptr parameter. More... | |
virtual | ~PSmartPointer () |
Destroy the smart pointer and decrement the reference count on the object being pointed to. More... | |
PSmartPointer & | operator= (const PSmartPointer &ptr) |
Assign this pointer to the value specified in the ptr parameter. More... | |
virtual Comparison | Compare (const PObject &obj) const |
Determine the relative rank of the pointers. More... | |
PBoolean | IsNULL () const |
Determine if the smart pointer has been set to point to an actual object instance. More... | |
PSmartObject * | GetObject () const |
Get the current value if the internal smart object pointer. More... | |
![]() | |
__inline unsigned | GetTraceContextIdentifier () const |
Get PTRACE context identifier. More... | |
__inline void | SetTraceContextIdentifier (unsigned id) |
__inline void | SetTraceContextIdentifier (const PObject &obj) |
__inline void | SetTraceContextIdentifier (const PObject *obj) |
__inline void | CopyTraceContextIdentifier (PObject &obj) const |
__inline void | CopyTraceContextIdentifier (PObject *obj) const |
virtual | ~PObject () |
__inline const char * | GetClass () const |
__inline bool | IsClass (const char *name) const |
__inline const PObject * | PTraceObjectInstance () const |
virtual PObject * | Clone () const |
Create a copy of the class on the heap. More... | |
template<class CLS > | |
CLS * | CloneAs () const |
As for Clone() but converts to specified type. More... | |
virtual PINDEX | HashFunction () const |
This function yields a hash value required by the PDictionary class. More... | |
virtual Comparison | CompareObjectMemoryDirect (const PObject &obj) const |
Determine the byte wise comparison of two objects. More... | |
bool | operator== (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator!= (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator< (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator> (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator<= (const PObject &obj) const |
Compare the two objects. More... | |
bool | operator>= (const PObject &obj) const |
Compare the two objects. More... | |
virtual void | PrintOn (ostream &strm) const |
Output the contents of the object to the stream. More... | |
virtual void | ReadFrom (istream &strm) |
Input the contents of the object from the stream. More... | |
Additional Inherited Members | |
![]() | |
enum | Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 } |
Result of the comparison operation performed by the Compare() function. More... | |
![]() | |
static __inline void | CopyTraceContextIdentifier (PObject &to, const PObject &from) |
static __inline void | CopyTraceContextIdentifier (PObject &to, const PObject *from) |
static __inline void | CopyTraceContextIdentifier (PObject *to, const PObject &from) |
static __inline void | CopyTraceContextIdentifier (PObject *to, const PObject *from) |
static __inline const char * | Class () |
static __inline const PObject * | PTraceObjectInstance (const char *) |
static __inline const PObject * | PTraceObjectInstance (const PObject *obj) |
template<typename T > | |
static Comparison | Compare2 (T v1, T v2) |
Compare two types, returning Comparison type. More... | |
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size) |
Internal function caled from CompareObjectMemoryDirect() More... | |
![]() | |
PObject () | |
Constructor for PObject, made protected so cannot ever create one on its own. More... | |
![]() | |
PSmartObject * | object |
Object the smart pointer points to. More... | |
![]() | |
unsigned | m_traceContextIdentifier |
This template class creates a type safe version of PSmartPointer.
|
inline |
Access to the value of the smart pointer.
References PSmartPointer::object.
|
inline |
Access to the dereferenced smart object in the smart pointer.
References PAssertNULL.
|
inline |
Access to the members of the smart object in the smart pointer.
References PAssertNULL.