This commit is contained in:
scc%mozilla.org 2000-06-11 01:22:58 +00:00
Родитель 6ac6a0494a
Коммит 1d482b725a
1 изменённых файлов: 17 добавлений и 15 удалений

Просмотреть файл

@ -16,8 +16,10 @@
* Communications, Inc. Portions created by Netscape are * Communications, Inc. Portions created by Netscape are
* Copyright (C) 1999, Mozilla. All Rights Reserved. * Copyright (C) 1999, Mozilla. All Rights Reserved.
* *
* Original Author:
* Scott Collins <scc@mozilla.org>
*
* Contributor(s): * Contributor(s):
* Scott Collins <scc@netscape.com>
* Pierre Phaneuf <pp@ludusdesign.com> * Pierre Phaneuf <pp@ludusdesign.com>
*/ */
@ -92,7 +94,7 @@ typedef nsCOMPtr<nsIWeakReference> nsWeakPtr;
*/ */
extern NS_COM extern NS_COM
nsIWeakReference* nsIWeakReference*
NS_GetWeakReference( nsISupports* , nsresult* aResult = 0); NS_GetWeakReference( nsISupports* , nsresult* aResult=0 );
/** /**
@ -111,21 +113,21 @@ CallQueryReferent( nsIWeakReference* aSource, T** aDestination )
class NS_EXPORT nsQueryReferent : public nsCOMPtr_helper class NS_EXPORT nsQueryReferent : public nsCOMPtr_helper
{ {
public: public:
nsQueryReferent( nsIWeakReference* aWeakPtr, nsresult* error ) nsQueryReferent( nsIWeakReference* aWeakPtr, nsresult* error )
: mWeakPtr(aWeakPtr), : mWeakPtr(aWeakPtr),
mErrorPtr(error) mErrorPtr(error)
{ {
// nothing else to do here // nothing else to do here
} }
virtual nsresult operator()( const nsIID& aIID, void** ) const; virtual nsresult operator()( const nsIID& aIID, void** ) const;
private: private:
nsIWeakReference* mWeakPtr; nsIWeakReference* mWeakPtr;
nsresult* mErrorPtr; nsresult* mErrorPtr;
}; };
inline inline
const nsQueryReferent const nsQueryReferent