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

at::PtrDelegate< w_ClassRef, w_RefTraits > Class Template Reference
[Smart Pointer Support]

#include <at_lifetime.h>

Collaboration diagram for at::PtrDelegate< w_ClassRef, w_RefTraits >:

Collaboration graph
[legend]
List of all members.

Public Methods

 PtrDelegate (const PtrDelegate &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>  PtrDelegate (const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>  PtrDelegate (const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>  PtrDelegate (const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
 PtrDelegate (w_ClassRef i_ptr=0)
 PtrDelegate (w_ClassRef i_ptr, bool i_takeOwnership)
 ~PtrDelegate ()
PtrDelegate & operator= (const w_ClassRef i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> PtrDelegate & operator= (const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
PtrDelegate & operator= (const PtrDelegate &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> PtrDelegate & operator= (const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> PtrDelegate & operator= (const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
w_ClassRef Transfer () const
PtrView< w_ClassRef, w_RefTraits > LifeView () const
PointerTo< w_ClassRef >::value_type * operator-> () const
PointerTo< w_ClassRef >::value_type & operator * () const
w_ClassRef Get () const
 operator bool () const
bool operator! () const
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator== (const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator== (const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator== (const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator!= (const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator!= (const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator!= (const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator< (const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator< (const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator< (const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator> (const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator> (const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator> (const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator<= (const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator<= (const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator<= (const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator>= (const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator>= (const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)
template<typename w_ClassRefRhs, typename w_RefTraitsRhs> bool operator>= (const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &i_ptr)

Detailed Description

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
class at::PtrDelegate< w_ClassRef, w_RefTraits >

PtrDelegate is a member of the set of co-operative "smart" pointers Ptr, PtrDelegate and PtrView. PtrDelegate and PtrView are intended to be used to specify pointer passing policy while Ptr is intended to be instantiated as a member or automatic variable to maintain the reference to the object being managed.

PtrDelegate indicates that the obligation to decrement the reference count is being passed along with the pointer. In essance, the action of an PtrDelegate is very similar to an Ptr except that there is an implicit Transfer() upon assignment. The pointer contained within the PtrDelegate is no longer valid after the transfer occurs. The value of the smart pointer after the assignment is not defined and may cause an exception if used.

Below is an example showing how to use an PtrDelegate and the implications of the implicit transfer.

// an example of using AT_LineLine

    class Stuff {
        AT_LifeTine<Interface *> m_ptr;
        
        void StashPointer( PtrDelegate<Interface *> ptr )
        {
            if ( ptr->IsGood() ) {
                m_ptr = ptr; // ptr transfers to member m_ptr **
            }

            ptr->Done(); // ERROR - ptr may be undefined

            m_ptr->Done(); // This is correct.

            // NOTE - if ptr was not transferred in the line ** then
            // it will cause the reference count to be decremented
            // on the exit of this function
            
        }

        void DoStuff( PtrDelegate<Interface *>  ptr )
        {
            if ( ptr != 0 ) {
                StashPointer( ptr ); // ptr is transferred to paramter
                // ptr may no longer be used from this point
            }
        }
        
        void DoOther()
        {
            DoStuff( new InterfaceImpl ); // passing obligation to release

            DoMore( m_ptr );
        }

        void DoMore( PtrView<Interface *>  ptr ) )
        {
            StashPointer( ptr );  // View->Line conversion
                                  // * reference count incremented

            ptr->More(); // ptr is unchanged - assumption that
                         // reference count does not go to 0.
                         // It is the obligation of the developer to
                         // ensure that a reference is maintained.
        }

    };

Warning:
The current implementation of PtrDelegate may change in such a way that may assert if an PtrDelegate pointer is used after a transfer (implied with assignment to an Ptr or an PtrView). This would be to ensure that the semantics described above are not inadvertently ignored hence causing mysterious problems.


Constructor & Destructor Documentation

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
at::PtrDelegate< w_ClassRef, w_RefTraits >::PtrDelegate const PtrDelegate< w_ClassRef, w_RefTraits > &    i_ptr [inline]
 

Copy constructor for PtrDelegate.

Parameters:
i_ptr  A reference to the PtrDelegate pointer being copied.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
at::PtrDelegate< w_ClassRef, w_RefTraits >::PtrDelegate const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

Constructor an PtrDelegate from another PtrDelegate which may be based on a different under- lying pointer type.

Parameters:
i_ptr  A reference to the PtrDelegate pointer being copied.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
at::PtrDelegate< w_ClassRef, w_RefTraits >::PtrDelegate const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

Construct a Ptr from and Ptr. The object being pointed to will have it's reference count incremented.

Parameters:
i_ptr  A reference to the Ptr pointer being copied.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
at::PtrDelegate< w_ClassRef, w_RefTraits >::PtrDelegate const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This method contructs an PtrDelegate from an PtrView.

Parameters:
i_ptr  A reference to the PtrView pointer being copied.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
at::PtrDelegate< w_ClassRef, w_RefTraits >::PtrDelegate w_ClassRef    i_ptr = 0 [inline]
 

This method contructs an PtrDelegate from a regular pointer. This is only allowed if the traits class allows assignment from regular pointers.

Parameters:
i_ptr  The pointer being copied (optional).

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
at::PtrDelegate< w_ClassRef, w_RefTraits >::PtrDelegate w_ClassRef    i_ptr,
bool    i_takeOwnership
[inline]
 

Contructs an PtrDelegate from a regular pointer, optionally transferring ownership of the managed pointer to the PtrDelegate pointer.

Parameters:
i_ptr  The regular pointer being copied.
i_takeOwnership  A flag indicating whether owner- ship of the managed pointer should be transferred to the PtrDelegate pointer.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
at::PtrDelegate< w_ClassRef, w_RefTraits >::~PtrDelegate   [inline]
 

Upon destruction, the managed pointer will have it's reference count decremented.


Member Function Documentation

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
w_ClassRef at::PtrDelegate< w_ClassRef, w_RefTraits >::Get   const [inline]
 

Get() allows access to the managed pointer. Use of this method is discouraged, only use this method if interfacing to a legacy library.

Returns:
The value of the PtrDelegate smart pointer, i.e. the address of the object whose lifetime is being managed by reference counting.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
PtrView< w_ClassRef, w_RefTraits > at::PtrDelegate< w_ClassRef, w_RefTraits >::LifeView   const [inline]
 

This helper method returns an PtrView version of this PtrDelegate pointer.

Returns:
An PtrView version of this PtrDelegate pointer.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
PointerTo<w_ClassRef>::value_type& at::PtrDelegate< w_ClassRef, w_RefTraits >::operator *   const [inline]
 

This method overloads the dereference operator-*(ptr)

Returns:
The object being pointed to.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
at::PtrDelegate< w_ClassRef, w_RefTraits >::operator bool   const [inline]
 

This method overloads the conversion to bool operator.

Returns:
A boolean indicating whether (true) or not (false) the PtrDelegate pointer is non-NULL.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator!   const [inline]
 

This method overloads operator!.

Returns:
A boolean indicating whether (true) or not (false) the PtrDelegate pointer is NULL.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator!= const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator!= const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator!= const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

These methods overload the != operator for the cases where an PtrDelegate is being tested for inequality to an PtrDelegate, an Ptr, or an PtrView.

Parameters:
i_ptr  A reference to the smart pointer on the right-hand side of the '!=' operator.
Returns:
A boolean indicating whether (true) or not (false) the two pointers on each side of the '!=' sign are unequal, i.e. point to different objects.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
PointerTo<w_ClassRef>::value_type* at::PtrDelegate< w_ClassRef, w_RefTraits >::operator->   const [inline]
 

This method overloads the dereference operator.

Returns:
The value of the PtrDelegate smart pointer, i.e. the address of the object whose lifetime is being managed by reference counting.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator< const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator< const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator< const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

These methods overload the < operator for the cases where an PtrDelegate is being tested to see if it is less than an PtrDelegate, an Ptr, or an PtrView.

Parameters:
i_ptr  A reference to the smart pointer on the right-hand side of the '<' operator.
Returns:
A boolean indicating whether (true) or not (false) the left-hand pointer is less than the right-hand pointer, i.e. whether the address of the left-hand managed pointer is less than the address of the right-hand managed pointer.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator<= const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator<= const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator<= const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

These methods overload the <= operator for the cases where an PtrDelegate is being tested to see if it is less than or equal to an PtrDelegate, an Ptr, or an PtrView.

Parameters:
i_ptr  A reference to the smart pointer on the right-hand side of the '<=' operator.
Returns:
A boolean indicating whether (true) or not (false) the left-hand pointer is less than or equal to the right-hand pointer, i.e. whether the address of the left-hand managed pointer is less than or equal to the address of the right-hand managed pointer.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
PtrDelegate& at::PtrDelegate< w_ClassRef, w_RefTraits >::operator= const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

Assignment operator for the case where an PtrDelegate is being set equal to an PtrView.

Parameters:
i_ptr  A reference to the PtrView on the right-hand side of the '=' sign.
Returns:
A reference to the PtrDelegate on the left-hand side of the '=' sign.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
PtrDelegate& at::PtrDelegate< w_ClassRef, w_RefTraits >::operator= const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

Assignment operator for the case where an PtrDelegate is being set equal to an Ptr.

Parameters:
i_ptr  A reference to the Ptr on the right-hand side of the '=' sign.
Returns:
A reference to the PtrDelegate on the left-hand side of the '=' sign.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
PtrDelegate& at::PtrDelegate< w_ClassRef, w_RefTraits >::operator= const PtrDelegate< w_ClassRef, w_RefTraits > &    i_ptr [inline]
 

Copy assignment. If this is not provided, there will be one generated that will do the wrong thing.

Parameters:
i_ptr  A reference to the PtrDelegate on the right-hand side of the '=' sign.
Returns:
A reference to the PtrDelegate on the left-hand side of the '=' sign.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
PtrDelegate& at::PtrDelegate< w_ClassRef, w_RefTraits >::operator= const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

Assignment operator for the case where an PtrDelegate is being set equal to another PtrDelegate.

Parameters:
i_ptr  A reference to the PtrDelegate on the right-hand side of the '=' sign.
Returns:
A reference to the PtrDelegate on the left-hand side of the '=' sign.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
PtrDelegate& at::PtrDelegate< w_ClassRef, w_RefTraits >::operator= const w_ClassRef    i_ptr [inline]
 

Assignment operator for the case where an PtrDelegate is being set equal to a regular pointer. This will only compile for cases where the the traits class contains a FixRawPtrRefCount method. Hence to disable assigning of regular pointers use a PtrTraits class that does not have a FixRawPtrRefCount.

Parameters:
i_ptr  The regular pointer on the right-hand side of the '=' sign.
Returns:
A reference to the PtrDelegate on the left-hand side of the '=' sign.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator== const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator== const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator== const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

These methods overload the == operator for the cases where an PtrDelegate is being tested for equality to an PtrDelegate, an Ptr, or an PtrView.

Parameters:
i_ptr  A reference to the smart pointer on the right-hand side of the '==' operator.
Returns:
A boolean indicating whether (true) or not (false) the two pointers on each side of the '==' sign are equal, i.e. point to the same object.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator> const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator> const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator> const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

These methods overload the > operator for the cases where an PtrDelegate is being tested to see if it is greater than an PtrDelegate, an Ptr, or an PtrView.

Parameters:
i_ptr  A reference to the smart pointer on the right-hand side of the '>' operator.
Returns:
A boolean indicating whether (true) or not (false) the left-hand pointer is greater than the right-hand pointer, i.e. whether the address of the lefthand managed pointer is greater than the address of the right-hand managed pointer.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator>= const PtrView< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator>= const Ptr< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
template<typename w_ClassRefRhs, typename w_RefTraitsRhs>
bool at::PtrDelegate< w_ClassRef, w_RefTraits >::operator>= const PtrDelegate< w_ClassRefRhs, w_RefTraitsRhs > &    i_ptr [inline]
 

These methods overload the >= operator for the cases where an PtrDelegate is being tested to see if it is greater than or equal to an PtrDelegate, an Ptr or an PtrView.

Parameters:
i_ptr  A reference to the smart pointer on the right-hand side of the '>=' operator.
Returns:
A boolean indicating whether (true) or not (false) the left-hand pointer is greater than or equal to the right-hand pointer, i.e. whether the address of the left-hand managed pointer is greater than or equal to the address of the righthand managed pointer.

template<typename w_ClassRef, typename w_RefTraits = typename PtrSelect< w_ClassRef, PtrTraits< w_ClassRef >, COMPtrTraits< w_ClassRef > >::type>
w_ClassRef at::PtrDelegate< w_ClassRef, w_RefTraits >::Transfer   const [inline]
 

This helper method returns the pointer being managed by this and setting this managed pointer to indicate the pointer has been transferred. This effectively passes back to the caller the responsibility of decrementing the reference count.

Returns:
The value of the PtrDelegate pointer, 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