CSSCharsetRuleImpl::QueryInterface(const nsIID& aIID, void** aInstancePtrResult) { NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer"); if (nsnull == aInstancePtrResult) { return NS_ERROR_NULL_POINTER; } if (aIID.Equals(NS_GET_IID(nsICSSCharsetRule))) { *aInstancePtrResult = (void*) ((nsICSSCharsetRule*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(NS_GET_IID(nsICSSRule))) { *aInstancePtrResult = (void*) ((nsICSSRule*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(NS_GET_IID(nsIStyleRule))) { *aInstancePtrResult = (void*) ((nsIStyleRule*)this); NS_ADDREF_THIS(); return NS_OK; } if (aIID.Equals(kISupportsIID)) { nsICSSCharsetRule *tmp = this; nsISupports *tmp2 = tmp; *aInstancePtrResult = (void*) tmp2; NS_ADDREF_THIS(); return NS_OK; } return NS_NOINTERFACE; }
NS_INTERFACE_MAP_BEGIN(CSSCharsetRuleImpl) NS_INTERFACE_MAP_ENTRY(nsICSSCharsetRule) NS_INTERFACE_MAP_ENTRY(nsICSSRule) NS_INTERFACE_MAP_ENTRY(nsIStyleRule) NS_INTERFACE_MAP_ENTRY(nsIDOMCSSRule) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsICSSCharsetRule) NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(CSSCharsetRule) NS_INTERFACE_MAP_END
CSSCharsetRuleImpl::QueryInterface(const nsIID& aIID,                                   void** aInstancePtrResult){  NS_PRECONDITION(nsnull != aInstancePtrResult, "null pointer");  if (nsnull == aInstancePtrResult) {    return NS_ERROR_NULL_POINTER;  }  if (aIID.Equals(NS_GET_IID(nsICSSCharsetRule))) {    *aInstancePtrResult = (void*) ((nsICSSCharsetRule*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(NS_GET_IID(nsICSSRule))) {    *aInstancePtrResult = (void*) ((nsICSSRule*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(NS_GET_IID(nsIStyleRule))) {    *aInstancePtrResult = (void*) ((nsIStyleRule*)this);    NS_ADDREF_THIS();    return NS_OK;  }  if (aIID.Equals(kISupportsIID)) {    nsICSSCharsetRule *tmp = this;    nsISupports *tmp2 = tmp;    *aInstancePtrResult = (void*) tmp2;    NS_ADDREF_THIS();    return NS_OK;  }  return NS_NOINTERFACE;}