nsInstantiationNode.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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/. */
  5. #ifndef nsInstantiationNode_h__
  6. #define nsInstantiationNode_h__
  7. #include "mozilla/Attributes.h"
  8. #include "nsRuleNetwork.h"
  9. #include "nsRDFQuery.h"
  10. class nsXULTemplateQueryProcessorRDF;
  11. /**
  12. * A leaf-level node in the rule network. If any instantiations
  13. * propagate to this node, then we know we've matched a rule.
  14. */
  15. class nsInstantiationNode : public ReteNode
  16. {
  17. public:
  18. nsInstantiationNode(nsXULTemplateQueryProcessorRDF* aProcessor,
  19. nsRDFQuery* aRule);
  20. ~nsInstantiationNode();
  21. // "downward" propagations
  22. virtual nsresult Propagate(InstantiationSet& aInstantiations,
  23. bool aIsUpdate, bool& aMatched) override;
  24. protected:
  25. nsXULTemplateQueryProcessorRDF* mProcessor;
  26. nsRDFQuery* mQuery;
  27. };
  28. #endif // nsInstantiationNode_h__