Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
nsCOMPtr.h File Reference
#include "nsDebug.h"
#include "nsISupportsUtils.h"
#include "nscore.h"

Go to the source code of this file.

Classes

class  nsDerivedSafe< T >
struct  already_AddRefed< T >
class  nsCOMPtr_helper
protocol  NS_COM_GLUE
protocol  NS_COM_GLUE
protocol  NS_COM_GLUE
protocol  NS_COM_GLUE
protocol  NS_COM_GLUE
protocol  NS_COM_GLUE
class  nsCOMPtr_base
class  nsCOMPtr< T >
class  nsCOMPtr< nsISupports >
class  nsGetterAddRefs< T >
class  nsGetterAddRefs< nsISupports >

Defines

#define NSCAP_FEATURE_USE_BASE
#define NS_MAY_ALIAS_PTR(t)   t*
#define NSCAP_ADDREF(this, ptr)   (ptr)->AddRef()
#define NSCAP_RELEASE(this, ptr)   (ptr)->Release()
#define NSCAP_LOG_ASSIGNMENT(this, ptr)
#define NSCAP_LOG_RELEASE(this, ptr)
#define NSCAP_CTOR_BASE(x)   nsCOMPtr_base(x)
#define NSCAP_ASSERT_NO_QUERY_NEEDED()

Typedefs

typedef PRBool NSCAP_BOOL

Functions

template<class T >
const already_AddRefed< Tgetter_AddRefs (T *aRawPtr)
template<class T >
const already_AddRefed< Tgetter_AddRefs (const already_AddRefed< T > aAlreadyAddRefedPtr)
template<class T >
const already_AddRefed< Tdont_AddRef (T *aRawPtr)
template<class T >
const already_AddRefed< Tdont_AddRef (const already_AddRefed< T > aAlreadyAddRefedPtr)
nsQueryInterface do_QueryInterface (nsISupports *aRawPtr)
nsQueryInterfaceWithError do_QueryInterface (nsISupports *aRawPtr, nsresult *error)
template<class T >
void do_QueryInterface (already_AddRefed< T > &)
template<class T >
void do_QueryInterface (already_AddRefed< T > &, nsresult *)
template<class T >
nsCOMPtr< T > * address_of (nsCOMPtr< T > &aPtr)
template<class T >
const nsCOMPtr< T > * address_of (const nsCOMPtr< T > &aPtr)
template<class T >
nsGetterAddRefs< Tgetter_AddRefs (nsCOMPtr< T > &aSmartPtr)
template<class T , class U >
NSCAP_BOOL operator== (const nsCOMPtr< T > &lhs, const nsCOMPtr< U > &rhs)
template<class T , class U >
NSCAP_BOOL operator!= (const nsCOMPtr< T > &lhs, const nsCOMPtr< U > &rhs)
template<class T , class U >
NSCAP_BOOL operator== (const nsCOMPtr< T > &lhs, const U *rhs)
template<class T , class U >
NSCAP_BOOL operator== (const U *lhs, const nsCOMPtr< T > &rhs)
template<class T , class U >
NSCAP_BOOL operator!= (const nsCOMPtr< T > &lhs, const U *rhs)
template<class T , class U >
NSCAP_BOOL operator!= (const U *lhs, const nsCOMPtr< T > &rhs)
template<class T , class U >
NSCAP_BOOL operator== (const nsCOMPtr< T > &lhs, U *rhs)
template<class T , class U >
NSCAP_BOOL operator== (U *lhs, const nsCOMPtr< T > &rhs)
template<class T , class U >
NSCAP_BOOL operator!= (const nsCOMPtr< T > &lhs, U *rhs)
template<class T , class U >
NSCAP_BOOL operator!= (U *lhs, const nsCOMPtr< T > &rhs)
template<class T >
NSCAP_BOOL operator== (const nsCOMPtr< T > &lhs, NSCAP_Zero *rhs)
template<class T >
NSCAP_BOOL operator== (NSCAP_Zero *lhs, const nsCOMPtr< T > &rhs)
template<class T >
NSCAP_BOOL operator!= (const nsCOMPtr< T > &lhs, NSCAP_Zero *rhs)
template<class T >
NSCAP_BOOL operator!= (NSCAP_Zero *lhs, const nsCOMPtr< T > &rhs)
NSCAP_BOOL SameCOMIdentity (nsISupports *lhs, nsISupports *rhs)
template<class SourceType , class DestinationType >
nsresult CallQueryInterface (nsCOMPtr< SourceType > &aSourcePtr, DestinationType **aDestPtr)

Define Documentation

#define NS_MAY_ALIAS_PTR (   t)    t*

Definition at line 119 of file nsCOMPtr.h.

#define NSCAP_ADDREF (   this,
  ptr 
)    (ptr)->AddRef()

Definition at line 147 of file nsCOMPtr.h.

Definition at line 600 of file nsCOMPtr.h.

Definition at line 545 of file nsCOMPtr.h.

Definition at line 92 of file nsCOMPtr.h.

#define NSCAP_LOG_ASSIGNMENT (   this,
  ptr 
)

Definition at line 162 of file nsCOMPtr.h.

#define NSCAP_LOG_RELEASE (   this,
  ptr 
)

Definition at line 166 of file nsCOMPtr.h.

#define NSCAP_RELEASE (   this,
  ptr 
)    (ptr)->Release()

Definition at line 151 of file nsCOMPtr.h.


Typedef Documentation

typedef PRBool NSCAP_BOOL

Definition at line 130 of file nsCOMPtr.h.


Function Documentation

template<class T >
nsCOMPtr<T>* address_of ( nsCOMPtr< T > &  aPtr) [inline]

Definition at line 1323 of file nsCOMPtr.h.

  {
    return aPtr.get_address();
  }

Here is the call graph for this function:

template<class T >
const nsCOMPtr<T>* address_of ( const nsCOMPtr< T > &  aPtr) [inline]

Definition at line 1331 of file nsCOMPtr.h.

  {
    return aPtr.get_address();
  }

Here is the call graph for this function:

template<class SourceType , class DestinationType >
nsresult CallQueryInterface ( nsCOMPtr< SourceType > &  aSourcePtr,
DestinationType **  aDestPtr 
) [inline]

Definition at line 1644 of file nsCOMPtr.h.

  {
    return CallQueryInterface(aSourcePtr.get(), aDestPtr);
  }

Here is the call graph for this function:

nsQueryInterface do_QueryInterface ( nsISupports *  aRawPtr) [inline]

Definition at line 379 of file nsCOMPtr.h.

  {
    return nsQueryInterface(aRawPtr);
  }
nsQueryInterfaceWithError do_QueryInterface ( nsISupports *  aRawPtr,
nsresult error 
) [inline]

Definition at line 386 of file nsCOMPtr.h.

  {
    return nsQueryInterfaceWithError(aRawPtr, error);
  }
template<class T >
void do_QueryInterface ( already_AddRefed< T > &  ) [inline]

Definition at line 394 of file nsCOMPtr.h.

  {
    // This signature exists soley to _stop_ you from doing the bad thing.
    //  Saying |do_QueryInterface()| on a pointer that is not otherwise owned by
    //  someone else is an automatic leak.  See <http://bugzilla.mozilla.org/show_bug.cgi?id=8221>.
  }
template<class T >
void do_QueryInterface ( already_AddRefed< T > &  ,
nsresult  
) [inline]

Definition at line 404 of file nsCOMPtr.h.

  {
    // This signature exists soley to _stop_ you from doing the bad thing.
    //  Saying |do_QueryInterface()| on a pointer that is not otherwise owned by
    //  someone else is an automatic leak.  See <http://bugzilla.mozilla.org/show_bug.cgi?id=8221>.
  }
template<class T >
const already_AddRefed<T> dont_AddRef ( T aRawPtr) [inline]

Definition at line 301 of file nsCOMPtr.h.

  {
    return already_AddRefed<T>(aRawPtr);
  }
template<class T >
const already_AddRefed<T> dont_AddRef ( const already_AddRefed< T aAlreadyAddRefedPtr) [inline]

Definition at line 309 of file nsCOMPtr.h.

  {
    return aAlreadyAddRefedPtr;
  }
template<class T >
const already_AddRefed<T> getter_AddRefs ( T aRawPtr) [inline]

Definition at line 281 of file nsCOMPtr.h.

  {
    return already_AddRefed<T>(aRawPtr);
  }
template<class T >
const already_AddRefed<T> getter_AddRefs ( const already_AddRefed< T aAlreadyAddRefedPtr) [inline]

Definition at line 293 of file nsCOMPtr.h.

  {
    return aAlreadyAddRefedPtr;
  }
template<class T >
nsGetterAddRefs<T> getter_AddRefs ( nsCOMPtr< T > &  aSmartPtr) [inline]

Definition at line 1447 of file nsCOMPtr.h.

  {
    return nsGetterAddRefs<T>(aSmartPtr);
  }
template<class T , class U >
NSCAP_BOOL operator!= ( const nsCOMPtr< T > &  lhs,
const nsCOMPtr< U > &  rhs 
) [inline]

Definition at line 1472 of file nsCOMPtr.h.

  {
    return NS_STATIC_CAST(const T*, lhs.get()) != NS_STATIC_CAST(const U*, rhs.get());
  }

Here is the call graph for this function:

template<class T , class U >
NSCAP_BOOL operator!= ( const nsCOMPtr< T > &  lhs,
const U rhs 
) [inline]

Definition at line 1499 of file nsCOMPtr.h.

  {
    return NS_STATIC_CAST(const T*, lhs.get()) != rhs;
  }

Here is the call graph for this function:

template<class T , class U >
NSCAP_BOOL operator!= ( const U lhs,
const nsCOMPtr< T > &  rhs 
) [inline]

Definition at line 1507 of file nsCOMPtr.h.

  {
    return lhs != NS_STATIC_CAST(const T*, rhs.get());
  }

Here is the call graph for this function:

template<class T , class U >
NSCAP_BOOL operator!= ( const nsCOMPtr< T > &  lhs,
U rhs 
) [inline]

Definition at line 1548 of file nsCOMPtr.h.

  {
    return NS_STATIC_CAST(const T*, lhs.get()) != NS_CONST_CAST(const U*, rhs);
  }

Here is the call graph for this function:

template<class T , class U >
NSCAP_BOOL operator!= ( U lhs,
const nsCOMPtr< T > &  rhs 
) [inline]

Definition at line 1556 of file nsCOMPtr.h.

  {
    return NS_CONST_CAST(const U*, lhs) != NS_STATIC_CAST(const T*, rhs.get());
  }

Here is the call graph for this function:

template<class T >
NSCAP_BOOL operator!= ( const nsCOMPtr< T > &  lhs,
NSCAP_Zero *  rhs 
) [inline]

Definition at line 1589 of file nsCOMPtr.h.

  {
    return NS_STATIC_CAST(const void*, lhs.get()) != NS_REINTERPRET_CAST(const void*, rhs);
  }

Here is the call graph for this function:

template<class T >
NSCAP_BOOL operator!= ( NSCAP_Zero *  lhs,
const nsCOMPtr< T > &  rhs 
) [inline]

Definition at line 1598 of file nsCOMPtr.h.

  {
    return NS_REINTERPRET_CAST(const void*, lhs) != NS_STATIC_CAST(const void*, rhs.get());
  }

Here is the call graph for this function:

template<class T , class U >
NSCAP_BOOL operator== ( const nsCOMPtr< T > &  lhs,
const nsCOMPtr< U > &  rhs 
) [inline]

Definition at line 1463 of file nsCOMPtr.h.

  {
    return NS_STATIC_CAST(const T*, lhs.get()) == NS_STATIC_CAST(const U*, rhs.get());
  }

Here is the call graph for this function:

template<class T , class U >
NSCAP_BOOL operator== ( const nsCOMPtr< T > &  lhs,
const U rhs 
) [inline]

Definition at line 1483 of file nsCOMPtr.h.

  {
    return NS_STATIC_CAST(const T*, lhs.get()) == rhs;
  }

Here is the call graph for this function:

template<class T , class U >
NSCAP_BOOL operator== ( const U lhs,
const nsCOMPtr< T > &  rhs 
) [inline]

Definition at line 1491 of file nsCOMPtr.h.

  {
    return lhs == NS_STATIC_CAST(const T*, rhs.get());
  }

Here is the call graph for this function:

template<class T , class U >
NSCAP_BOOL operator== ( const nsCOMPtr< T > &  lhs,
U rhs 
) [inline]

Definition at line 1532 of file nsCOMPtr.h.

  {
    return NS_STATIC_CAST(const T*, lhs.get()) == NS_CONST_CAST(const U*, rhs);
  }

Here is the call graph for this function:

template<class T , class U >
NSCAP_BOOL operator== ( U lhs,
const nsCOMPtr< T > &  rhs 
) [inline]

Definition at line 1540 of file nsCOMPtr.h.

  {
    return NS_CONST_CAST(const U*, lhs) == NS_STATIC_CAST(const T*, rhs.get());
  }

Here is the call graph for this function:

template<class T >
NSCAP_BOOL operator== ( const nsCOMPtr< T > &  lhs,
NSCAP_Zero *  rhs 
) [inline]

Definition at line 1571 of file nsCOMPtr.h.

  {
    return NS_STATIC_CAST(const void*, lhs.get()) == NS_REINTERPRET_CAST(const void*, rhs);
  }

Here is the call graph for this function:

template<class T >
NSCAP_BOOL operator== ( NSCAP_Zero *  lhs,
const nsCOMPtr< T > &  rhs 
) [inline]

Definition at line 1580 of file nsCOMPtr.h.

  {
    return NS_REINTERPRET_CAST(const void*, lhs) == NS_STATIC_CAST(const void*, rhs.get());
  }

Here is the call graph for this function:

NSCAP_BOOL SameCOMIdentity ( nsISupports *  lhs,
nsISupports *  rhs 
) [inline]

Definition at line 1634 of file nsCOMPtr.h.

Here is the call graph for this function:

Here is the caller graph for this function: