1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/xul/templates/src/nsInstantiationNode.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsInstantiationNode_h__ 1.10 +#define nsInstantiationNode_h__ 1.11 + 1.12 +#include "mozilla/Attributes.h" 1.13 +#include "nsRuleNetwork.h" 1.14 +#include "nsRDFQuery.h" 1.15 + 1.16 +class nsXULTemplateQueryProcessorRDF; 1.17 + 1.18 +/** 1.19 + * A leaf-level node in the rule network. If any instantiations 1.20 + * propagate to this node, then we know we've matched a rule. 1.21 + */ 1.22 +class nsInstantiationNode : public ReteNode 1.23 +{ 1.24 +public: 1.25 + nsInstantiationNode(nsXULTemplateQueryProcessorRDF* aProcessor, 1.26 + nsRDFQuery* aRule); 1.27 + 1.28 + ~nsInstantiationNode(); 1.29 + 1.30 + // "downward" propagations 1.31 + virtual nsresult Propagate(InstantiationSet& aInstantiations, 1.32 + bool aIsUpdate, bool& aMatched) MOZ_OVERRIDE; 1.33 + 1.34 +protected: 1.35 + 1.36 + nsXULTemplateQueryProcessorRDF* mProcessor; 1.37 + nsRDFQuery* mQuery; 1.38 +}; 1.39 + 1.40 +#endif // nsInstantiationNode_h__