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

SH::ShPointer< T > Class Template Reference

A reference-counting smart pointer. More...

#include <ShRefCount.hpp>

Inheritance diagram for SH::ShPointer< T >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ShPointer (T *object)
 ShPointer (const ShPointer &other)
template<typename S>
 ShPointer (const ShPointer< S > &other)
ShPointeroperator= (T *other)
ShPointeroperator= (const ShPointer &other)
template<typename S>
ShPointeroperator= (const ShPointer< S > &other)
bool operator== (const ShPointer &other) const
 Two references are equal if they point to the same object.
bool operator!= (const ShPointer &other) const
 Two references are equal if they point to the same object.
bool operator< (const ShPointer &other) const
 Actually compares the pointers.
T & operator * () const
T * operator-> () const
 operator bool () const
 Return true iff this is not a reference to a null pointer.
int refCount () const
 Obtain the total amount of references to the referenced object.
T * object () const
 Obtain a pointer to the object we reference count.
void swap (ShPointer &other)

Detailed Description

template<typename T>
class SH::ShPointer< T >

A reference-counting smart pointer.

Definition at line 116 of file ShRefCount.hpp.


Member Function Documentation

template<typename T>
SH::ShPointer< T >::operator bool  )  const [inline]
 

Return true iff this is not a reference to a null pointer.

Todo:
Maybe use boost's unspecified-bool-type trick

Definition at line 223 of file ShRefCountImpl.hpp.


The documentation for this class was generated from the following files:
Generated on Mon Jan 24 18:38:19 2005 for Sh by  doxygen 1.4.1