Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
nsMdbPtr< T > Class Template Reference

#include <nsMdbPtr.h>

Collaboration diagram for nsMdbPtr< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsMdbPtr (nsIMdbEnv *aEnv)
 nsMdbPtr (nsIMdbEnv *aEnv, T *aRawPtr)
 nsMdbPtr (const nsMdbPtr< T > &aSmartPtr)
nsMdbPtr< T > & operator= (const nsMdbPtr< T > &aSmartPtr)
 ~nsMdbPtr ()
nsMdbDerivedSafe< T > * get () const
nsMdbDerivedSafe< T > * operator-> () const
nsMdbDerivedSafe< T > & operator* () const
 operator nsMdbDerivedSafe< T > * () const
T ** StartAssignment ()
 nsMdbPtr (nsIMdbEnv *aEnv)
 nsMdbPtr (nsIMdbEnv *aEnv, T *aRawPtr)
 nsMdbPtr (const nsMdbPtr< T > &aSmartPtr)
nsMdbPtr< T > & operator= (const nsMdbPtr< T > &aSmartPtr)
 ~nsMdbPtr ()
nsMdbDerivedSafe< T > * get () const
nsMdbDerivedSafe< T > * operator-> () const
nsMdbDerivedSafe< T > & operator* () const
 operator nsMdbDerivedSafe< T > * () const
T ** StartAssignment ()

Private Attributes

nsIMdbEnvmEnv
TmRawPtr

Detailed Description

template<class T>
class nsMdbPtr< T >

Definition at line 63 of file nsMdbPtr.h.


Constructor & Destructor Documentation

template<class T>
nsMdbPtr< T >::nsMdbPtr ( nsIMdbEnv aEnv) [inline]

Definition at line 70 of file nsMdbPtr.h.

                              : mEnv(aEnv), mRawPtr(0)
    {
        NS_PRECONDITION(aEnv != 0, "null ptr");
    }
template<class T>
nsMdbPtr< T >::nsMdbPtr ( nsIMdbEnv aEnv,
T aRawPtr 
) [inline]

Definition at line 75 of file nsMdbPtr.h.

                                          : mEnv(aEnv), mRawPtr(0)
    {
        NS_PRECONDITION(aEnv != 0, "null ptr");
        if (mEnv) {
            if (aRawPtr) {
                mRawPtr = aRawPtr;
                mRawPtr->AddStrongRef(mEnv);
            }
        }
    }
template<class T>
nsMdbPtr< T >::nsMdbPtr ( const nsMdbPtr< T > &  aSmartPtr) [inline]

Definition at line 86 of file nsMdbPtr.h.

                                           : mEnv(aSmartPtr.mEnv), mRawPtr(0)
    {
        if (mEnv) {
            if (aSmartPtr) {
                mRawPtr = aSmartPtr;
                mRawPtr->AddStrongRef(mEnv);
            }
        }
    }
template<class T>
nsMdbPtr< T >::~nsMdbPtr ( ) [inline]

Definition at line 115 of file nsMdbPtr.h.

    {
        if (mEnv) {
            if (mRawPtr)
                mRawPtr->CutStrongRef(mEnv);
        }
    }
template<class T>
nsMdbPtr< T >::nsMdbPtr ( nsIMdbEnv aEnv) [inline]

Definition at line 71 of file nsMdbPtr.h.

                              : mEnv(aEnv), mRawPtr(0)
    {
        NS_PRECONDITION(aEnv != 0, "null ptr");
    }
template<class T>
nsMdbPtr< T >::nsMdbPtr ( nsIMdbEnv aEnv,
T aRawPtr 
) [inline]

Definition at line 76 of file nsMdbPtr.h.

                                          : mEnv(aEnv), mRawPtr(0)
    {
        NS_PRECONDITION(aEnv != 0, "null ptr");
        if (mEnv) {
            if (aRawPtr) {
                mRawPtr = aRawPtr;
                mRawPtr->AddStrongRef(mEnv);
            }
        }
    }
template<class T>
nsMdbPtr< T >::nsMdbPtr ( const nsMdbPtr< T > &  aSmartPtr) [inline]

Definition at line 87 of file nsMdbPtr.h.

                                           : mEnv(aSmartPtr.mEnv), mRawPtr(0)
    {
        if (mEnv) {
            if (aSmartPtr) {
                mRawPtr = aSmartPtr;
                mRawPtr->AddStrongRef(mEnv);
            }
        }
    }
template<class T>
nsMdbPtr< T >::~nsMdbPtr ( ) [inline]

Definition at line 116 of file nsMdbPtr.h.

    {
        if (mEnv) {
            if (mRawPtr)
                mRawPtr->CutStrongRef(mEnv);
        }
    }

Member Function Documentation

template<class T>
nsMdbDerivedSafe<T>* nsMdbPtr< T >::get ( ) const [inline]

Definition at line 124 of file nsMdbPtr.h.

Here is the caller graph for this function:

template<class T>
nsMdbDerivedSafe<T>* nsMdbPtr< T >::get ( ) const [inline]

Definition at line 125 of file nsMdbPtr.h.

template<class T>
nsMdbPtr< T >::operator nsMdbDerivedSafe< T > * ( ) const [inline]

Definition at line 142 of file nsMdbPtr.h.

    {
        return get();
    }
template<class T>
nsMdbPtr< T >::operator nsMdbDerivedSafe< T > * ( ) const [inline]

Definition at line 143 of file nsMdbPtr.h.

    {
        return get();
    }
template<class T>
nsMdbDerivedSafe<T>& nsMdbPtr< T >::operator* ( ) const [inline]

Definition at line 137 of file nsMdbPtr.h.

    {
        return *get();
    }
template<class T>
nsMdbDerivedSafe<T>& nsMdbPtr< T >::operator* ( ) const [inline]

Definition at line 138 of file nsMdbPtr.h.

    {
        return *get();
    }
template<class T>
nsMdbDerivedSafe<T>* nsMdbPtr< T >::operator-> ( void  ) const [inline]

Definition at line 130 of file nsMdbPtr.h.

    {
        return get();
    }
template<class T>
nsMdbDerivedSafe<T>* nsMdbPtr< T >::operator-> ( void  ) const [inline]

Definition at line 131 of file nsMdbPtr.h.

    {
        return get();
    }
template<class T>
nsMdbPtr<T>& nsMdbPtr< T >::operator= ( const nsMdbPtr< T > &  aSmartPtr) [inline]

Definition at line 97 of file nsMdbPtr.h.

    {
        if (mEnv) {
            if (mRawPtr) {
                mRawPtr->CutStrongRef(mEnv);
                mRawPtr = 0;
            }
        }
        mEnv = aSmartPtr.mEnv;
        if (mEnv) {
            mRawPtr = aSmartPtr.mRawPtr;
            if (mRawPtr)
                mRawPtr->AddStrongRef(mEnv);
        }

        return *this;
    }
template<class T>
nsMdbPtr<T>& nsMdbPtr< T >::operator= ( const nsMdbPtr< T > &  aSmartPtr) [inline]

Definition at line 98 of file nsMdbPtr.h.

    {
        if (mEnv) {
            if (mRawPtr) {
                mRawPtr->CutStrongRef(mEnv);
                mRawPtr = 0;
            }
        }
        mEnv = aSmartPtr.mEnv;
        if (mEnv) {
            mRawPtr = aSmartPtr.mRawPtr;
            if (mRawPtr)
                mRawPtr->AddStrongRef(mEnv);
        }

        return *this;
    }
template<class T>
T** nsMdbPtr< T >::StartAssignment ( ) [inline]

Definition at line 149 of file nsMdbPtr.h.

    {
        if (mRawPtr) {
            mRawPtr->CutStrongRef(mEnv);
            mRawPtr = 0;
        }
        return &mRawPtr;
    }
template<class T>
T** nsMdbPtr< T >::StartAssignment ( ) [inline]

Definition at line 150 of file nsMdbPtr.h.

    {
        if (mRawPtr) {
            mRawPtr->CutStrongRef(mEnv);
            mRawPtr = 0;
        }
        return &mRawPtr;
    }

Member Data Documentation

template<class T>
nsIMdbEnv * nsMdbPtr< T >::mEnv [private]

Definition at line 66 of file nsMdbPtr.h.

template<class T>
T * nsMdbPtr< T >::mRawPtr [private]

Definition at line 67 of file nsMdbPtr.h.


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