48 template<
typename TSuperClass>
50 m_expressionVariables(10),
51 m_positionIterators(5),
53 m_itemSequenceCacheCells(5)
58 template<
typename TSuperClass>
60 : TSuperClass(prevContext),
62 m_expressionVariables(10),
63 m_positionIterators(5),
65 m_itemSequenceCacheCells(5)
70 template<
typename TSuperClass>
73 if(slot >= m_itemCacheCells.size())
74 m_itemCacheCells.resize(
qMax(slot + 1, m_itemCacheCells.size()));
76 return m_itemCacheCells[slot];
79 template<
typename TSuperClass>
82 if(slot >= m_itemSequenceCacheCells.size())
83 m_itemSequenceCacheCells.resize(
qMax(slot + 1, m_itemSequenceCacheCells.size()));
85 return m_itemSequenceCacheCells;
88 template<
typename TSuperClass>
91 Q_ASSERT(slot < m_rangeVariables.size());
93 return m_rangeVariables.at(slot);
96 template<
typename TSuperClass>
99 Q_ASSERT(slot < m_expressionVariables.size());
100 Q_ASSERT(m_expressionVariables.at(slot));
101 return m_expressionVariables.at(slot);
104 template<
typename TSuperClass>
107 Q_ASSERT(slot < m_positionIterators.size());
108 return m_positionIterators.at(slot);
111 template<
typename TSuperClass>
112 template<
typename VectorType,
typename UnitType>
115 const UnitType &newValue,
116 VectorType &container)
const 118 if(slot < container.size())
119 container.replace(slot, newValue);
122 container.resize(slot + 1);
123 container.replace(slot, newValue);
127 template<
typename TSuperClass>
129 const Item &newValue)
131 setSlotVariable(slot, newValue, m_rangeVariables);
134 template<
typename TSuperClass>
138 setSlotVariable(slot, newValue, m_expressionVariables);
141 template<
typename TSuperClass>
145 setSlotVariable(slot, newValue, m_positionIterators);
148 template<
typename TSuperClass>
151 return m_templateParameterStore;
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Base class for all DynamicContext classes that needs to supply variables. It has a new frame for loca...
Represents a cache entry for a single Item, as opposed to for a sequence of items.
Represents an item in the XPath 2.0 Data Model.