Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros
CacheAxisQuery.cs
Go to the documentation of this file.
3
5
6internal abstract class CacheAxisQuery : BaseAxisQuery
7{
9
10 public override XPathNavigator Current
11 {
12 get
13 {
14 if (count == 0)
15 {
16 return null;
17 }
18 return outputBuffer[count - 1];
19 }
20 }
21
22 public override int CurrentPosition => count;
23
24 public override int Count => outputBuffer.Count;
25
26 public override QueryProps Properties => (QueryProps)23;
27
28 public CacheAxisQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest)
29 : base(qyInput, name, prefix, typeTest)
30 {
32 count = 0;
33 }
34
36 : base(other)
37 {
38 outputBuffer = new List<XPathNavigator>(other.outputBuffer);
39 count = other.count;
40 }
41
42 public override void Reset()
43 {
44 count = 0;
45 }
46
47 public override object Evaluate(XPathNodeIterator context)
48 {
49 base.Evaluate(context);
51 return this;
52 }
53
54 public override XPathNavigator Advance()
55 {
57 {
58 return outputBuffer[count++];
59 }
60 return null;
61 }
62}
List< XPathNavigator > outputBuffer
override XPathNavigator Advance()
CacheAxisQuery(Query qyInput, string name, string prefix, XPathNodeType typeTest)
override object Evaluate(XPathNodeIterator context)