Qt 4.8
Public Types | Public Functions | Public Variables | List of all members
QPatternist::ItemSequenceCacheCell Class Reference

Represents a cache entry for a sequence of items. More...

#include <qcachecells_p.h>

Public Types

enum  CacheState { Full, Empty, PartiallyPopulated }
 
typedef QList< ItemSequenceCacheCellList
 
typedef QVector< ItemSequenceCacheCellVector
 

Public Functions

 ItemSequenceCacheCell ()
 

Public Variables

Item::List cachedItems
 
CacheState cacheState
 
bool inUse
 
Item::Iterator::Ptr sourceIterator
 

Detailed Description

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.

Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 111 of file qcachecells_p.h.

Typedefs

◆ List

Definition at line 114 of file qcachecells_p.h.

◆ Vector

Definition at line 115 of file qcachecells_p.h.

Enumerations

◆ CacheState

Constructors and Destructors

◆ ItemSequenceCacheCell()

QPatternist::ItemSequenceCacheCell::ItemSequenceCacheCell ( )
inline

Properties

◆ cachedItems

Item::List QPatternist::ItemSequenceCacheCell::cachedItems

◆ cacheState

CacheState QPatternist::ItemSequenceCacheCell::cacheState

◆ inUse

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().

◆ sourceIterator

Item::Iterator::Ptr QPatternist::ItemSequenceCacheCell::sourceIterator

The documentation for this class was generated from the following file: