Public Member Functions | Public Attributes

already_AddRefed< T > Struct Template Reference

#include <nsCOMPtr.h>

Collaboration diagram for already_AddRefed< T >:

List of all members.

Public Member Functions

 already_AddRefed (T *aRawPtr)
T * get () const
template<class U >
 operator already_AddRefed< U > ()
 This helper is useful in cases like.

Public Attributes

T * mRawPtr

template<class T>
struct already_AddRefed< T >


Constructor & Destructor Documentation

template<class T>
already_AddRefed< T >::already_AddRefed ( T *  aRawPtr  )  [inline]

Member Function Documentation

template<class T>
T* already_AddRefed< T >::get (  )  const [inline]
template<class T>
template<class U >
already_AddRefed< T >::operator already_AddRefed< U > (  )  [inline]

This helper is useful in cases like.

already_AddRefed<BaseClass> Foo() { nsRefPtr<SubClass> x = ...; return x.forget(); }

The autoconversion allows one to omit the idiom

nsRefPtr<BaseClass> y = x.forget(); return y.forget();


Member Data Documentation

template<class T>
T* already_AddRefed< T >::mRawPtr

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