Back to index

enigmail  1.4.3
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
mozilla::TemporaryRef< T > Class Template Reference

TemporaryRef<T> represents an object that holds a temporary reference to a T. More...

#include <RefPtr.h>

List of all members.

Public Member Functions

 TemporaryRef (T *t)
 TemporaryRef (const TemporaryRef &o)
template<typename U >
 TemporaryRef (const TemporaryRef< U > &o)
 ~TemporaryRef ()
T * drop () const

Private Types

typedef RefPtr< T >::dontRef dontRef

Private Member Functions

 TemporaryRef (T *t, const dontRef &)
 TemporaryRef ()
TemporaryRefoperator= (const TemporaryRef &)

Private Attributes

T * ptr

Friends

class RefPtr< T >

Detailed Description

template<typename T>
class mozilla::TemporaryRef< T >

TemporaryRef<T> represents an object that holds a temporary reference to a T.

TemporaryRef objects can't be manually ref'd or unref'd (being temporaries, not lvalues), so can only relinquish references to other objects, or unref on destruction.

Definition at line 207 of file RefPtr.h.


Member Typedef Documentation

template<typename T>
typedef RefPtr<T>::dontRef mozilla::TemporaryRef< T >::dontRef [private]

Definition at line 212 of file RefPtr.h.


Constructor & Destructor Documentation

template<typename T>
mozilla::TemporaryRef< T >::TemporaryRef ( T *  t) [inline]

Definition at line 215 of file RefPtr.h.

template<typename T>
mozilla::TemporaryRef< T >::TemporaryRef ( const TemporaryRef< T > &  o) [inline]

Definition at line 216 of file RefPtr.h.

: ptr(o.drop()) {}
template<typename T>
template<typename U >
mozilla::TemporaryRef< T >::TemporaryRef ( const TemporaryRef< U > &  o) [inline]

Definition at line 219 of file RefPtr.h.

: ptr(o.drop()) {}
template<typename T>
mozilla::TemporaryRef< T >::~TemporaryRef ( ) [inline]

Definition at line 221 of file RefPtr.h.

template<typename T>
mozilla::TemporaryRef< T >::TemporaryRef ( T *  t,
const dontRef  
) [inline, private]

Definition at line 230 of file RefPtr.h.

: ptr(t) {}
template<typename T>
mozilla::TemporaryRef< T >::TemporaryRef ( ) [private]

Member Function Documentation

template<typename T>
T* mozilla::TemporaryRef< T >::drop ( ) const [inline]

Definition at line 223 of file RefPtr.h.

                    {
        T* tmp = ptr;
        ptr = 0;
        return tmp;
    }

Here is the caller graph for this function:

template<typename T>
TemporaryRef& mozilla::TemporaryRef< T >::operator= ( const TemporaryRef< T > &  ) [private]

Friends And Related Function Documentation

template<typename T>
friend class RefPtr< T > [friend]

Definition at line 210 of file RefPtr.h.


Member Data Documentation

template<typename T>
T* mozilla::TemporaryRef< T >::ptr [mutable, private]

Definition at line 232 of file RefPtr.h.


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