31 #ifndef PTLIB_SMARTPTR_H
32 #define PTLIB_SMARTPTR_H
219 #endif // PTLIB_SMARTPTR_H
virtual ~PSmartPointer()
Destroy the smart pointer and decrement the reference count on the object being pointed to...
virtual Comparison Compare(const PObject &obj) const
Determine the relative rank of the pointers.
PSmartObject * object
Object the smart pointer points to.
Definition: smartptr.h:191
PSmartObject(const PSmartObject &other)
Definition: smartptr.h:61
PSmartPointer & operator=(const PSmartPointer &ptr)
Assign this pointer to the value specified in the ptr parameter.
Comparison
Result of the comparison operation performed by the Compare() function.
Definition: object.h:2251
PSmartObject()
Construct a new smart object, subject to a PSmartPointer instance referencing it. ...
Definition: smartptr.h:57
This is the class for pointers to objects that use the smart pointer system.
Definition: smartptr.h:111
PSmartPtr(T *ptr=NULL)
Constructor.
Definition: smartptr.h:202
T * operator->() const
Access to the members of the smart object in the smart pointer.
Definition: smartptr.h:206
#define PAssertNULL(ptr)
This macro is used to assert that a pointer must be non-null.
Definition: object.h:428
bool PBoolean
Definition: object.h:174
PBoolean IsNULL() const
Determine if the smart pointer has been set to point to an actual object instance.
Definition: smartptr.h:178
This template class creates a type safe version of PSmartPointer.
Definition: smartptr.h:197
T & operator*() const
Access to the dereferenced smart object in the smart pointer.
Definition: smartptr.h:210
This is the base class for objects that use the smart pointer system.
Definition: smartptr.h:49
atomic< uint32_t > referenceCount
Count of number of instances of PSmartPointer that currently reference the object instance...
Definition: smartptr.h:69
PSmartPointer(PSmartObject *obj=NULL)
Create a new smart pointer instance and have it point to the specified PSmartObject instance...
Definition: smartptr.h:121
PSmartObject * GetObject() const
Get the current value if the internal smart object pointer.
Definition: smartptr.h:185
Ultimate parent class for all objects in the class library.
Definition: object.h:2204