sfSharedPtr< T > Class Template Reference

#include <SharedPtr.hpp>

List of all members.

Public Types

typedef T *sfSharedPtr::* BoolType

Public Member Functions

 sfSharedPtr ()
 sfSharedPtr (T *Pointee)
 sfSharedPtr (const sfSharedPtr &Copy)
 ~sfSharedPtr ()
sfSharedPtroperator= (const sfSharedPtr &Other)
sfSharedPtroperator= (T *Pointee)
T * operator-> () const
T & operator * () const
 operator BoolType () const
unsigned int GetRefCount () const


Detailed Description

template<typename T>
class sfSharedPtr< T >

Smart pointer using reference count

Definition at line 38 of file SharedPtr.hpp.


Constructor & Destructor Documentation

template<typename T>
sfSharedPtr< T >::sfSharedPtr (  )  [inline]

Default constructor

Definition at line 30 of file SharedPtr.inl.

template<typename T>
sfSharedPtr< T >::sfSharedPtr ( T *  Pointee  )  [inline, explicit]

Construct the instance with an initial pointee value

Parameters:
Pointee : Initial pointee value

Definition at line 42 of file SharedPtr.inl.

template<typename T>
sfSharedPtr< T >::sfSharedPtr ( const sfSharedPtr< T > &  Copy  )  [inline]

Copy constructor

Parameters:
Copy : Object to copy

Definition at line 54 of file SharedPtr.inl.

template<typename T>
sfSharedPtr< T >::~sfSharedPtr (  )  [inline]

Destructor

Definition at line 66 of file SharedPtr.inl.


Member Function Documentation

template<typename T>
sfSharedPtr< T > & sfSharedPtr< T >::operator= ( const sfSharedPtr< T > &  Other  )  [inline]

Assignment operator (assigns a new shared ptr)

Parameters:
Other : Instance to assign
Returns:
Reference to this

Definition at line 82 of file SharedPtr.inl.

References sfSharedPtr< T >::myCount, and sfSharedPtr< T >::myPointee.

template<typename T>
sfSharedPtr< T > & sfSharedPtr< T >::operator= ( T *  Pointee  )  [inline]

Assignment operator (assigns a new pointee)

Parameters:
Pointee : Pointee to assign
Returns:
Reference to this

Definition at line 96 of file SharedPtr.inl.

References sfSharedPtr< T >::myCount, and sfSharedPtr< T >::myPointee.

template<typename T>
T * sfSharedPtr< T >::operator-> (  )  const [inline]

Access operator

Returns:
Pointer to pointee

Definition at line 110 of file SharedPtr.inl.

template<typename T>
T & sfSharedPtr< T >::operator * (  )  const [inline]

Access operator

Returns:
Reference to pointee

Definition at line 120 of file SharedPtr.inl.

template<typename T>
sfSharedPtr< T >::operator BoolType (  )  const [inline]

Automatic conversion to pointer type (to allow testing)

Returns:
0 if pointee is null, any non-zero value otherwise

Definition at line 130 of file SharedPtr.inl.

template<typename T>
unsigned int sfSharedPtr< T >::GetRefCount (  )  const [inline]

Get reference counter value

Returns:
Current value of reference counter

Definition at line 140 of file SharedPtr.inl.


The documentation for this class was generated from the following files:
Generated for SFML by  doxygen 1.5.2