From 4f8a16eb71d56cb7de732e23aaf0fcf1625dcd0c Mon Sep 17 00:00:00 2001 From: "warren%netscape.com" Date: Mon, 10 Jan 2000 23:14:32 +0000 Subject: [PATCH] Added NS_IMPL_AGGREGATED_QUERY_HEAD macro. --- xpcom/base/nsAgg.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xpcom/base/nsAgg.h b/xpcom/base/nsAgg.h index 8126e9f4b75..49c32e2e60f 100644 --- a/xpcom/base/nsAgg.h +++ b/xpcom/base/nsAgg.h @@ -32,7 +32,7 @@ #define NS_DECL_AGGREGATED \ NS_DECL_ISUPPORTS \ \ -public: \ +public: \ \ /* You must implement this operation instead of the nsISupports */ \ /* methods if you inherit from nsAggregated. */ \ @@ -123,4 +123,14 @@ _class::Internal::Release(void) \ return agg->mRefCnt; \ } \ +// for use with QI macros in nsISupportsUtils.h: + +#define NS_IMPL_AGGREGATED_QUERY_HEAD(_class) \ +NS_IMETHODIMP _class::AggregatedQueryInterface(REFNSIID aIID, void** aInstancePtr) \ +{ \ + NS_ASSERTION(aInstancePtr, "AggregatedQueryInterface requires a non-NULL destination!"); \ + if ( !aInstancePtr ) \ + return NS_ERROR_NULL_POINTER; \ + nsISupports* foundInterface; + #endif /* nsAgg_h___ */