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 nsXULTemplateResultSetRDF_h__ michael@0: #define nsXULTemplateResultSetRDF_h__ michael@0: michael@0: #include "nsISimpleEnumerator.h" michael@0: #include "nsRuleNetwork.h" michael@0: #include "nsRDFQuery.h" michael@0: #include "nsXULTemplateResultRDF.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: class nsXULTemplateQueryProcessorRDF; michael@0: class nsXULTemplateResultRDF; michael@0: michael@0: /** michael@0: * An enumerator used to iterate over a set of results. michael@0: */ michael@0: class nsXULTemplateResultSetRDF MOZ_FINAL : public nsISimpleEnumerator michael@0: { michael@0: private: michael@0: nsXULTemplateQueryProcessorRDF* mProcessor; michael@0: michael@0: nsRDFQuery* mQuery; michael@0: michael@0: const InstantiationSet* mInstantiations; michael@0: michael@0: nsCOMPtr mResource; michael@0: michael@0: InstantiationSet::List *mCurrent; michael@0: michael@0: bool mCheckedNext; michael@0: michael@0: public: michael@0: michael@0: // nsISupports interface michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: // nsISimpleEnumerator interface michael@0: NS_DECL_NSISIMPLEENUMERATOR michael@0: michael@0: nsXULTemplateResultSetRDF(nsXULTemplateQueryProcessorRDF *aProcessor, michael@0: nsRDFQuery* aQuery, michael@0: const InstantiationSet* aInstantiations) michael@0: : mProcessor(aProcessor), michael@0: mQuery(aQuery), michael@0: mInstantiations(aInstantiations), michael@0: mCurrent(nullptr), michael@0: mCheckedNext(false) michael@0: { } michael@0: michael@0: ~nsXULTemplateResultSetRDF() michael@0: { michael@0: delete mInstantiations; michael@0: } michael@0: }; michael@0: michael@0: #endif // nsXULTemplateResultSetRDF_h__