Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Phx::PtrInterface< T > Class Template Reference

The PtrInterface class provides a standard implementation of the necessary interface for use with the Ptr smart-pointer class. More...

#include <PhxPtrInterface.h>

List of all members.

Public Types

typedef uint32_t ReferenceCount

Public Member Functions

void newReference (void) const
 Adds a reference to this object.
void deleteReference (void) const
 Deletes a reference to this object.
ReferenceCount referenceCount () const
 Returns the number of references to this object.


Detailed Description

template<class T>
class Phx::PtrInterface< T >

The PtrInterface class provides a standard implementation of the necessary interface for use with the Ptr smart-pointer class.

All objects that just want to be deleted when all references to them have been destroyed can use this as their base class.

Note:
This is not a thread-safe implementation. If the pointer to the object may be used across multiple threads, one should use the thread-safe locked version of this interface, LockedPtrInterface. On the other hand, if it is known that the pointer will never be used on multiple threads, there is a minor efficiency gain from using this standard version.
See also:
LockedPtrInterface

Ptr


Member Function Documentation

template<class T>
void Phx::PtrInterface< T >::deleteReference void   )  const [inline]
 

Deletes a reference to this object.

Called by the Ptr class when a reference is dropped.

template<class T>
void Phx::PtrInterface< T >::newReference void   )  const [inline]
 

Adds a reference to this object.

Called by the Ptr class when a new reference is created.

template<class T>
ReferenceCount Phx::PtrInterface< T >::referenceCount  )  const [inline]
 

Returns the number of references to this object.

Returns:
The current reference count of this object.


The documentation for this class was generated from the following file:
Generated on Wed Dec 21 22:05:39 2005 for Phoenix OSFS by  doxygen 1.4.2