Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

at::Pointer< w_ClassRef > Class Template Reference

#include <at_lifetime.h>

Collaboration diagram for at::Pointer< w_ClassRef >:

Collaboration graph
[legend]
List of all members.

Public Methods

 Pointer (w_ClassRef i_ptr=0)
 Pointer (const Pointer< w_ClassRef > &i_ptr)
 ~Pointer ()
Pointer & operator= (const w_ClassRef i_ptr)
Pointer & operator= (const Pointer< w_ClassRef > &i_ptr)
PointerTo< w_ClassRef >::value_type * operator-> () const
PointerTo< w_ClassRef >::value_type & operator * () const
 operator w_ClassRef () const
 operator bool () const
w_ClassRef Transfer ()

Public Attributes

w_ClassRef m_ptrVal

Detailed Description

template<typename w_ClassRef>
class at::Pointer< w_ClassRef >

The Pointer smart pointer works essentially like the auto_ptr of the Standard Template Library (STL).

Unlike the other reference counting smart pointers, an Pointer never adds or releases a reference to its managed pointer. Therefore, one should use an Pointer only if the managed pointer is not capable of reference counting. Otherwise, use an Ptr.


Constructor & Destructor Documentation

template<typename w_ClassRef>
at::Pointer< w_ClassRef >::Pointer w_ClassRef    i_ptr = 0 [inline]
 

Pointer( regular pointer ) -------------------------- This method constructs an Pointer from a regular pointer.

Parameters:
i_ptr  The regular pointer from which this Pointer is to be constructed. (If no regular pointer is specified, then zero is used.)

template<typename w_ClassRef>
at::Pointer< w_ClassRef >::Pointer const Pointer< w_ClassRef > &    i_ptr [inline]
 

Pointer( Pointer ) ------------------------ Copy constructor. This method constructs an Pointer from another Pointer.

Parameters:
i_ptr  A reference to the Pointer to be copied.

template<typename w_ClassRef>
at::Pointer< w_ClassRef >::~Pointer   [inline]
 

~Pointer() ------------- Destructor.


Member Function Documentation

template<typename w_ClassRef>
PointerTo<w_ClassRef>::value_type& at::Pointer< w_ClassRef >::operator *   const [inline]
 

This method overloads the dereference operator-*(ptr)

Returns:
The object being pointed to.

template<typename w_ClassRef>
at::Pointer< w_ClassRef >::operator bool   const [inline]
 

bool( Pointer ) ------------------ This method overloads the cast-to-bool operator.

Returns:
A boolean indicating whether (true) or not (false) the managed pointer's address is non-zero.

template<typename w_ClassRef>
at::Pointer< w_ClassRef >::operator w_ClassRef   const [inline]
 

w_ClassRef( Pointer ) ------------------------ This method overloads the cast-to-w_ClassRef operator.

Returns:
The address of the managed pointer.

template<typename w_ClassRef>
PointerTo<w_ClassRef>::value_type* at::Pointer< w_ClassRef >::operator->   const [inline]
 

Pointer-> ------------ This method overloads the dereference operator.

Returns:
The address of the managed pointer.

template<typename w_ClassRef>
Pointer& at::Pointer< w_ClassRef >::operator= const Pointer< w_ClassRef > &    i_ptr [inline]
 

Pointer = Pointer ----------------------- This method overloads the assignment operator for the case where an Pointer is being set equal to another Pointer.

Parameters:
i_ptr  A reference to the Pointer on the right-hand side of the '=' sign.
Returns:
A reference to this Pointer (the one on the left-hand side of the '=' sign).

template<typename w_ClassRef>
Pointer& at::Pointer< w_ClassRef >::operator= const w_ClassRef    i_ptr [inline]
 

Pointer = regular pointer ------------------------- This method overloads the assignment operator for the case where an Pointer is being set equal to a regular pointer.

Parameters:
i_ptr  The regular pointer on the right-hand side of the '=' sign.
Returns:
A reference to this Pointer (the one on the left-hand side of the '=' sign).

template<typename w_ClassRef>
w_ClassRef at::Pointer< w_ClassRef >::Transfer   [inline]
 

Transfer() ---------- This helper method returns the managed pointer's address, and then zeroes it out.

Returns:
The managed pointer's address.


Member Data Documentation

template<typename w_ClassRef>
w_ClassRef at::Pointer< w_ClassRef >::m_ptrVal
 

m_ptrVal contains the actual managed pointer value, i.e. the address of the managed pointer.


The documentation for this class was generated from the following file:

Generated for Austria by doxygen and MakeXS at Sun Oct 24 17:35:34 PDT 2004