michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsXULTemplateResultXML_h__ michael@0: #define nsXULTemplateResultXML_h__ michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIURI.h" michael@0: #include "nsIRDFResource.h" michael@0: #include "nsXULTemplateQueryProcessorXML.h" michael@0: #include "nsIXULTemplateResult.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: /** michael@0: * An single result of an query michael@0: */ michael@0: class nsXULTemplateResultXML MOZ_FINAL : public nsIXULTemplateResult michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: NS_DECL_NSIXULTEMPLATERESULT michael@0: michael@0: nsXULTemplateResultXML(nsXMLQuery* aQuery, michael@0: nsIDOMNode* aNode, michael@0: nsXMLBindingSet* aBindings); michael@0: michael@0: ~nsXULTemplateResultXML() {} michael@0: michael@0: void GetNode(nsIDOMNode** aNode); michael@0: michael@0: protected: michael@0: michael@0: // ID used for persisting data. It is constructed using the mNode's michael@0: // base uri plus the node's id to form 'baseuri#id'. If the node has no michael@0: // id, then an id of the form 'row' is generated. In the michael@0: // latter case, persistence will not work as there won't be a unique id. michael@0: nsAutoString mId; michael@0: michael@0: // query that generated the result michael@0: nsCOMPtr mQuery; michael@0: michael@0: // context node in datasource michael@0: nsCOMPtr mNode; michael@0: michael@0: // assignments in query michael@0: nsXMLBindingValues mRequiredValues; michael@0: michael@0: // extra assignments made by rules ( tags) michael@0: nsXMLBindingValues mOptionalValues; michael@0: }; michael@0: michael@0: #endif // nsXULTemplateResultXML_h__