Classes | Defines | Typedefs | Functions

nsCOMPtr.h File Reference

#include "nsDebug.h"
#include "nsISupportsUtils.h"
#include "nscore.h"
Include dependency graph for nsCOMPtr.h:

Classes

struct  already_AddRefed< T >
class  nsCOMPtr_helper
class  nsQueryInterface
class  nsQueryInterfaceWithError
class  nsGetServiceByCID
class  nsGetServiceByCIDWithError
class  nsGetServiceByContractID
class  nsGetServiceByContractIDWithError
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< T > getter_AddRefs (T *aRawPtr)
template<class T >
const already_AddRefed< T > getter_AddRefs (const already_AddRefed< T > aAlreadyAddRefedPtr)
template<class T >
const already_AddRefed< T > dont_AddRef (T *aRawPtr)
template<class T >
const already_AddRefed< T > dont_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< T > getter_AddRefs (nsCOMPtr< T > &aSmartPtr)
template<class T , class DestinationType >
nsresult CallQueryInterface (T *aSource, nsGetterAddRefs< DestinationType > aDestination)
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*
#define NSCAP_ADDREF (   this,
  ptr 
)    (ptr)->AddRef()
#define NSCAP_ASSERT_NO_QUERY_NEEDED (  ) 
#define NSCAP_CTOR_BASE (   x  )     nsCOMPtr_base(x)
#define NSCAP_FEATURE_USE_BASE
#define NSCAP_LOG_ASSIGNMENT (   this,
  ptr 
)
#define NSCAP_LOG_RELEASE (   this,
  ptr 
)
#define NSCAP_RELEASE (   this,
  ptr 
)    (ptr)->Release()

Typedef Documentation

typedef PRBool NSCAP_BOOL

Function Documentation

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