Qt 4.8
|
Represents a cache entry for a sequence of items. More...
#include <qcachecells_p.h>
Public Types | |
enum | CacheState { Full, Empty, PartiallyPopulated } |
typedef QList< ItemSequenceCacheCell > | List |
typedef QVector< ItemSequenceCacheCell > | Vector |
Public Functions | |
ItemSequenceCacheCell () | |
Public Variables | |
Item::List | cachedItems |
CacheState | cacheState |
bool | inUse |
Item::Iterator::Ptr | sourceIterator |
Represents a cache entry for a sequence of items.
As opposed to ItemCacheCell, ItemSequenceCacheCell can be partially populated: e.g, four items is in the cache while three remains in the source. For that reason ItemSequenceCacheCell in addition to the source also carried an QAbstractXmlForwardIterator which is the source, such that it can continue to populate the cache when it runs out.
Definition at line 111 of file qcachecells_p.h.
Definition at line 114 of file qcachecells_p.h.
Definition at line 115 of file qcachecells_p.h.
|
inline |
Definition at line 124 of file qcachecells_p.h.
Item::List QPatternist::ItemSequenceCacheCell::cachedItems |
Definition at line 129 of file qcachecells_p.h.
Referenced by QPatternist::CachingIterator::CachingIterator(), QPatternist::CachingIterator::copy(), QPatternist::EvaluationCache< IsForGlobal >::evaluateSequence(), QPatternist::EvaluationCache< IsForGlobal >::evaluateSingleton(), and QPatternist::CachingIterator::next().
CacheState QPatternist::ItemSequenceCacheCell::cacheState |
Definition at line 131 of file qcachecells_p.h.
Referenced by QPatternist::CachingIterator::CachingIterator(), QPatternist::CachingIterator::copy(), QPatternist::EvaluationCache< IsForGlobal >::evaluateSequence(), and QPatternist::CachingIterator::next().
bool QPatternist::ItemSequenceCacheCell::inUse |
In XSL-T, we can have circularity which we cannot detect statically. For instance, a global variable invokes a template, and the template uses the variable. We can't detect that, because we can't figure out what template will be invoked.
For solution we have this toggle, which is set temporarily on the cell such that EvaluationCache can detect whether it's trashing itself.
One might think that it would be sufficient to flag usage of the variable in an arbitrary template, but that would also flag valid cases.
Definition at line 146 of file qcachecells_p.h.
Referenced by QPatternist::EvaluationCache< IsForGlobal >::evaluateSequence().
Item::Iterator::Ptr QPatternist::ItemSequenceCacheCell::sourceIterator |
Definition at line 130 of file qcachecells_p.h.
Referenced by QPatternist::CachingIterator::CachingIterator(), QPatternist::EvaluationCache< IsForGlobal >::evaluateSequence(), and QPatternist::CachingIterator::next().