content/xul/templates/src/nsXULTemplateResultSetRDF.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsXULTemplateResultSetRDF_h__
     7 #define nsXULTemplateResultSetRDF_h__
     9 #include "nsISimpleEnumerator.h"
    10 #include "nsRuleNetwork.h"
    11 #include "nsRDFQuery.h"
    12 #include "nsXULTemplateResultRDF.h"
    13 #include "mozilla/Attributes.h"
    15 class nsXULTemplateQueryProcessorRDF;
    16 class nsXULTemplateResultRDF;
    18 /**
    19  * An enumerator used to iterate over a set of results.
    20  */
    21 class nsXULTemplateResultSetRDF MOZ_FINAL : public nsISimpleEnumerator
    22 {
    23 private:
    24     nsXULTemplateQueryProcessorRDF* mProcessor;
    26     nsRDFQuery* mQuery;
    28     const InstantiationSet* mInstantiations;
    30     nsCOMPtr<nsIRDFResource> mResource;
    32     InstantiationSet::List *mCurrent;
    34     bool mCheckedNext;
    36 public:
    38     // nsISupports interface
    39     NS_DECL_ISUPPORTS
    41     // nsISimpleEnumerator interface
    42     NS_DECL_NSISIMPLEENUMERATOR
    44     nsXULTemplateResultSetRDF(nsXULTemplateQueryProcessorRDF *aProcessor,
    45                               nsRDFQuery* aQuery,
    46                               const InstantiationSet* aInstantiations)
    47         : mProcessor(aProcessor),
    48           mQuery(aQuery),
    49           mInstantiations(aInstantiations),
    50           mCurrent(nullptr),
    51           mCheckedNext(false)
    52     { }
    54     ~nsXULTemplateResultSetRDF()
    55     {
    56         delete mInstantiations;
    57     }
    58 };
    60 #endif // nsXULTemplateResultSetRDF_h__

mercurial