content/xul/templates/src/nsRDFTestNode.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.

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef nsRDFTestNode_h__
michael@0 7 #define nsRDFTestNode_h__
michael@0 8
michael@0 9 #include "nsRuleNetwork.h"
michael@0 10
michael@0 11 class nsIRDFResource;
michael@0 12 class nsIRDFNode;
michael@0 13
michael@0 14 /**
michael@0 15 * An abstract base class for all of the RDF-related tests. This interface
michael@0 16 * allows us to iterate over all of the RDF tests to find the one in the
michael@0 17 * network that is apropos for a newly-added assertion.
michael@0 18 */
michael@0 19 class nsRDFTestNode : public TestNode
michael@0 20 {
michael@0 21 public:
michael@0 22 nsRDFTestNode(TestNode* aParent)
michael@0 23 : TestNode(aParent) {}
michael@0 24
michael@0 25 /**
michael@0 26 * Determine whether the node can propagate an assertion
michael@0 27 * with the specified source, property, and target. If the
michael@0 28 * assertion can be propagated, aInitialBindings will be
michael@0 29 * initialized with appropriate variable-to-value assignments
michael@0 30 * to allow the rule network to start a constrain and propagate
michael@0 31 * search from this node in the network.
michael@0 32 *
michael@0 33 * @return true if the node can propagate the specified
michael@0 34 * assertion.
michael@0 35 */
michael@0 36 virtual bool CanPropagate(nsIRDFResource* aSource,
michael@0 37 nsIRDFResource* aProperty,
michael@0 38 nsIRDFNode* aTarget,
michael@0 39 Instantiation& aInitialBindings) const = 0;
michael@0 40
michael@0 41 /**
michael@0 42 *
michael@0 43 */
michael@0 44 virtual void Retract(nsIRDFResource* aSource,
michael@0 45 nsIRDFResource* aProperty,
michael@0 46 nsIRDFNode* aTarget) const = 0;
michael@0 47 };
michael@0 48
michael@0 49 #endif // nsRDFTestNode_h__

mercurial