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