Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions
nsFastLoadPtr< T > Class Template Reference

#include <nsFastLoadPtr.h>

Inheritance diagram for nsFastLoadPtr< T >:
Inheritance graph
[legend]
Collaboration diagram for nsFastLoadPtr< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef T element_type

Public Member Functions

nsDerivedSafe< T > * get () const
nsresult read (nsIObjectInputStream *aInputStream)
 Deserialize an nsFastLoadPtr from aInputStream, skipping the referent object, but saving the object's offset for later deserialization.
nsresult write (nsIObjectOutputStream *aOutputStream)
 Serialize an nsFastLoadPtr reference and possibly the referent object, if that object has not yet been serialized.
void swap (nsCOMPtr< T > &rhs)
void swap (T *&rhs)
 operator nsDerivedSafe< T > * () const
nsDerivedSafe< T > * operator-> () const
nsCOMPtr< T > * get_address ()
const nsCOMPtr< T > * get_address () const
nsDerivedSafe< T > & operator* () const
T ** StartAssignment ()

Detailed Description

template<class T>
class nsFastLoadPtr< T >

Definition at line 70 of file nsFastLoadPtr.h.


Member Typedef Documentation

template<class T>
typedef T nsCOMPtr< T >::element_type [inherited]

Definition at line 576 of file nsCOMPtr.h.


Member Function Documentation

template<class T >
nsDerivedSafe<T>* nsFastLoadPtr< T >::get ( ) const [inline]

Reimplemented from nsCOMPtr< T >.

Definition at line 72 of file nsFastLoadPtr.h.

                                  {
        if (!this->mRawPtr) {
            gFastLoadService_->GetFastLoadReferent(
                                         NS_REINTERPRET_CAST(nsISupports**,
                                                             &this->mRawPtr));
        }
        return NS_REINTERPRET_CAST(nsDerivedSafe<T>*, this->mRawPtr);
    }
template<class T>
nsCOMPtr<T>* nsCOMPtr< T >::get_address ( ) [inline, inherited]

Definition at line 867 of file nsCOMPtr.h.

        {
          return this;
        }

Here is the caller graph for this function:

template<class T>
const nsCOMPtr<T>* nsCOMPtr< T >::get_address ( ) const [inline, inherited]

Definition at line 875 of file nsCOMPtr.h.

        {
          return this;
        }
template<class T>
nsCOMPtr< T >::operator nsDerivedSafe< T > * ( ) const [inline, inherited]

Definition at line 834 of file nsCOMPtr.h.

        {
          return get();
        }
template<class T>
nsDerivedSafe<T>& nsCOMPtr< T >::operator* ( ) const [inline, inherited]

Definition at line 886 of file nsCOMPtr.h.

        {
          NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator*().");
          return *get();
        }
template<class T>
nsDerivedSafe<T>* nsCOMPtr< T >::operator-> ( void  ) const [inline, inherited]

Definition at line 847 of file nsCOMPtr.h.

        {
          NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator->().");
          return get();
        }
template<class T >
nsresult nsFastLoadPtr< T >::read ( nsIObjectInputStream aInputStream) [inline]

Deserialize an nsFastLoadPtr from aInputStream, skipping the referent object, but saving the object's offset for later deserialization.

Lowercase name a la get, because it's called the same way -- not via operator->().

Definition at line 88 of file nsFastLoadPtr.h.

                                                      {
        return gFastLoadService_->ReadFastLoadPtr(aInputStream,
                                         NS_REINTERPRET_CAST(nsISupports**,
                                                             &this->mRawPtr));
    }
template<class T>
T** nsCOMPtr< T >::StartAssignment ( ) [inline, inherited]

Definition at line 898 of file nsCOMPtr.h.

        {
#ifndef NSCAP_FEATURE_INLINE_STARTASSIGNMENT
          return NS_REINTERPRET_CAST(T**, begin_assignment());
#else
          assign_assuming_AddRef(0);
          return NS_REINTERPRET_CAST(T**, &mRawPtr);
#endif
        }
template<class T>
void nsCOMPtr< T >::swap ( nsCOMPtr< T > &  rhs) [inline, inherited]

Definition at line 786 of file nsCOMPtr.h.

        {
#ifdef NSCAP_FEATURE_USE_BASE
          nsISupports* temp = rhs.mRawPtr;
#else
          T* temp = rhs.mRawPtr;
#endif
          NSCAP_LOG_ASSIGNMENT(&rhs, mRawPtr);
          NSCAP_LOG_ASSIGNMENT(this, temp);
          NSCAP_LOG_RELEASE(this, mRawPtr);
          NSCAP_LOG_RELEASE(&rhs, temp);
          rhs.mRawPtr = mRawPtr;
          mRawPtr = temp;
          // |rhs| maintains the same invariants, so we don't need to |NSCAP_ASSERT_NO_QUERY_NEEDED|
        }
template<class T>
void nsCOMPtr< T >::swap ( T *&  rhs) [inline, inherited]

Definition at line 804 of file nsCOMPtr.h.

        {
#ifdef NSCAP_FEATURE_USE_BASE
          nsISupports* temp = rhs;
#else
          T* temp = rhs;
#endif
          NSCAP_LOG_ASSIGNMENT(this, temp);
          NSCAP_LOG_RELEASE(this, mRawPtr);
          rhs = NS_REINTERPRET_CAST(T*, mRawPtr);
          mRawPtr = temp;
          NSCAP_ASSERT_NO_QUERY_NEEDED();
        }
template<class T >
nsresult nsFastLoadPtr< T >::write ( nsIObjectOutputStream aOutputStream) [inline]

Serialize an nsFastLoadPtr reference and possibly the referent object, if that object has not yet been serialized.

Lowercase name a la get, because it's called the same way -- not via operator->().

Definition at line 101 of file nsFastLoadPtr.h.

                                                         {
        return gFastLoadService_->WriteFastLoadPtr(aOutputStream,
                                          NS_REINTERPRET_CAST(nsISupports*,
                                                              this->mRawPtr));
    }

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