/src/mozilla-central/dom/xslt/xpath/txNodeSetContext.cpp
Line | Count | Source (jump to first uncovered line) |
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 | | #include "txNodeSetContext.h" |
7 | | #include "txNodeSet.h" |
8 | | |
9 | | const txXPathNode& txNodeSetContext::getContextNode() |
10 | 0 | { |
11 | 0 | return mContextSet->get(mPosition - 1); |
12 | 0 | } |
13 | | |
14 | | uint32_t txNodeSetContext::size() |
15 | 0 | { |
16 | 0 | return (uint32_t)mContextSet->size(); |
17 | 0 | } |
18 | | |
19 | | uint32_t txNodeSetContext::position() |
20 | 0 | { |
21 | 0 | NS_ASSERTION(mPosition, "Should have called next() at least once"); |
22 | 0 | return mPosition; |
23 | 0 | } |
24 | | |
25 | | nsresult txNodeSetContext::getVariable(int32_t aNamespace, nsAtom* aLName, |
26 | | txAExprResult*& aResult) |
27 | 0 | { |
28 | 0 | NS_ASSERTION(mInner, "mInner is null!!!"); |
29 | 0 | return mInner->getVariable(aNamespace, aLName, aResult); |
30 | 0 | } |
31 | | |
32 | | nsresult |
33 | | txNodeSetContext::isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed) |
34 | 0 | { |
35 | 0 | NS_ASSERTION(mInner, "mInner is null!!!"); |
36 | 0 | return mInner->isStripSpaceAllowed(aNode, aAllowed); |
37 | 0 | } |
38 | | |
39 | | void* txNodeSetContext::getPrivateContext() |
40 | 0 | { |
41 | 0 | NS_ASSERTION(mInner, "mInner is null!!!"); |
42 | 0 | return mInner->getPrivateContext(); |
43 | 0 | } |
44 | | |
45 | | txResultRecycler* txNodeSetContext::recycler() |
46 | 0 | { |
47 | 0 | NS_ASSERTION(mInner, "mInner is null!!!"); |
48 | 0 | return mInner->recycler(); |
49 | 0 | } |
50 | | |
51 | | void txNodeSetContext::receiveError(const nsAString& aMsg, nsresult aRes) |
52 | 0 | { |
53 | 0 | NS_ASSERTION(mInner, "mInner is null!!!"); |
54 | | #ifdef DEBUG |
55 | | nsAutoString error(NS_LITERAL_STRING("forwarded error: ")); |
56 | | error.Append(aMsg); |
57 | | mInner->receiveError(error, aRes); |
58 | | #else |
59 | | mInner->receiveError(aMsg, aRes); |
60 | 0 | #endif |
61 | 0 | } |