2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsXULTemplateResultSetRDF_h__
|
|
|
|
#define nsXULTemplateResultSetRDF_h__
|
|
|
|
|
|
|
|
#include "nsISimpleEnumerator.h"
|
|
|
|
#include "nsRuleNetwork.h"
|
|
|
|
#include "nsRDFQuery.h"
|
|
|
|
#include "nsXULTemplateResultRDF.h"
|
2012-06-18 19:30:09 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsXULTemplateQueryProcessorRDF;
|
|
|
|
class nsXULTemplateResultRDF;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An enumerator used to iterate over a set of results.
|
|
|
|
*/
|
2015-03-21 09:28:04 -07:00
|
|
|
class nsXULTemplateResultSetRDF final : public nsISimpleEnumerator
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
nsXULTemplateQueryProcessorRDF* mProcessor;
|
|
|
|
|
|
|
|
nsRDFQuery* mQuery;
|
|
|
|
|
|
|
|
const InstantiationSet* mInstantiations;
|
|
|
|
|
|
|
|
nsCOMPtr<nsIRDFResource> mResource;
|
|
|
|
|
|
|
|
InstantiationSet::List *mCurrent;
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool mCheckedNext;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-06-24 19:09:15 -07:00
|
|
|
~nsXULTemplateResultSetRDF()
|
|
|
|
{
|
|
|
|
delete mInstantiations;
|
|
|
|
}
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
public:
|
|
|
|
|
|
|
|
// nsISupports interface
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// nsISimpleEnumerator interface
|
|
|
|
NS_DECL_NSISIMPLEENUMERATOR
|
|
|
|
|
|
|
|
nsXULTemplateResultSetRDF(nsXULTemplateQueryProcessorRDF *aProcessor,
|
|
|
|
nsRDFQuery* aQuery,
|
|
|
|
const InstantiationSet* aInstantiations)
|
|
|
|
: mProcessor(aProcessor),
|
|
|
|
mQuery(aQuery),
|
|
|
|
mInstantiations(aInstantiations),
|
2012-07-30 07:20:58 -07:00
|
|
|
mCurrent(nullptr),
|
2011-10-17 07:59:28 -07:00
|
|
|
mCheckedNext(false)
|
2007-03-22 10:30:00 -07:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsXULTemplateResultSetRDF_h__
|