34 #ifndef PTLIB_SMARTPTR_H
35 #define PTLIB_SMARTPTR_H
196 #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:168
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:1184
PSmartObject()
Construct a new smart object, subject to a PSmartPointer instance referencing it. ...
Definition: smartptr.h:60
This is the class for pointers to objects that use the smart pointer system.
Definition: smartptr.h:88
PSmartPtr(T *ptr=NULL)
Constructor.
Definition: smartptr.h:179
T * operator->() const
Access to the members of the smart object in the smart pointer.
Definition: smartptr.h:183
BOOL PBoolean
Definition: object.h:102
This class implements an integer that can be atomically incremented and decremented in a thread-safe ...
Definition: critsec.h:171
#define PAssertNULL(ptr)
This macro is used to assert that a pointer must be non-null.
Definition: object.h:220
PBoolean IsNULL() const
Determine if the smart pointer has been set to point to an actual object instance.
Definition: smartptr.h:155
This template class creates a type safe version of PSmartPointer.
Definition: smartptr.h:174
T & operator*() const
Access to the dereferenced smart object in the smart pointer.
Definition: smartptr.h:187
This is the base class for objects that use the smart pointer system.
Definition: smartptr.h:52
PSmartPointer(PSmartObject *obj=NULL)
Create a new smart pointer instance and have it point to the specified PSmartObject instance...
Definition: smartptr.h:98
PSmartObject * GetObject() const
Get the current value if the internal smart object pointer.
Definition: smartptr.h:162
PAtomicInteger referenceCount
Count of number of instances of PSmartPointer that currently reference the object instance...
Definition: smartptr.h:67
Ultimate parent class for all objects in the class library.
Definition: object.h:1118