Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CacheOutputQuery.cs
Go to the documentation of this file.
4
6
7internal abstract class CacheOutputQuery : Query
8{
9 internal Query input;
10
12
13 public override XPathNavigator Current
14 {
15 get
16 {
17 if (count == 0)
18 {
19 return null;
20 }
21 return outputBuffer[count - 1];
22 }
23 }
24
25 public override XPathResultType StaticType => XPathResultType.NodeSet;
26
27 public override int CurrentPosition => count;
28
29 public override int Count => outputBuffer.Count;
30
31 public override QueryProps Properties => (QueryProps)23;
32
34 {
35 this.input = input;
37 count = 0;
38 }
39
41 : base(other)
42 {
43 input = Query.Clone(other.input);
44 outputBuffer = new List<XPathNavigator>(other.outputBuffer);
45 count = other.count;
46 }
47
48 public override void Reset()
49 {
50 count = 0;
51 }
52
53 public override void SetXsltContext(XsltContext context)
54 {
55 input.SetXsltContext(context);
56 }
57
58 public override object Evaluate(XPathNodeIterator context)
59 {
61 count = 0;
62 return input.Evaluate(context);
63 }
64
65 public override XPathNavigator Advance()
66 {
68 {
69 return outputBuffer[count++];
70 }
71 return null;
72 }
73}
override object Evaluate(XPathNodeIterator context)
override void SetXsltContext(XsltContext context)
object Evaluate(XPathNodeIterator nodeIterator)
virtual void SetXsltContext(XsltContext context)
Definition Query.cs:52
static Query Clone(Query input)
Definition Query.cs:66