txForwardContext.h 908 B

123456789101112131415161718192021222324252627282930313233
  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 __TX_XPATH_CONTEXT
  6. #define __TX_XPATH_CONTEXT
  7. #include "txIXPathContext.h"
  8. #include "nsAutoPtr.h"
  9. #include "txNodeSet.h"
  10. class txForwardContext : public txIEvalContext
  11. {
  12. public:
  13. txForwardContext(txIMatchContext* aContext,
  14. const txXPathNode& aContextNode,
  15. txNodeSet* aContextNodeSet)
  16. : mInner(aContext),
  17. mContextNode(aContextNode),
  18. mContextSet(aContextNodeSet)
  19. {}
  20. TX_DECL_EVAL_CONTEXT;
  21. private:
  22. txIMatchContext* mInner;
  23. const txXPathNode& mContextNode;
  24. RefPtr<txNodeSet> mContextSet;
  25. };
  26. #endif // __TX_XPATH_CONTEXT