72 if (input.
count() == 1)
76 for (
int i = 0; i < input.
count(); ++i) {
78 T value = subList.
takeAt(i);
81 for (
int j = 0; j < subLists.
count(); ++j) {
91 : m_stateMachine(machine), m_namePool(namePool), m_mode(mode)
129 currentStartState = t;
135 for (
int i = 0; i < count; ++i) {
136 currentStartState =
buildTerm(particle->
term(), currentEndState);
137 m_stateMachine->addEpsilonTransition(currentStartState, endState);
138 currentEndState = currentStartState;
146 for (
int i = 0; i < minOccurs; ++i) {
147 currentStartState =
buildTerm(particle->
term(), currentEndState);
148 currentEndState = currentStartState;
151 return currentStartState;
170 for (
int i = 0; i < substGroups.
count(); ++i)
174 for (
int i = 0; i < substGroups.
count(); ++i) {
189 if (particle->maximumOccurs() != 0) {
202 if (particle->maximumOccurs() != 0) {
203 currentStartState =
buildParticle(particle, currentEndState);
204 currentEndState = currentStartState;
208 return currentStartState;
214 for (
int i = 0; i < list.
count(); ++i) {
219 for (
int j = (particles.
count() - 1); j >= 0; --j) {
221 if (particle->maximumOccurs() != 0) {
222 currentStartState =
buildParticle(particle, currentEndState);
223 currentEndState = currentStartState;
226 m_stateMachine->addEpsilonTransition(newStartState, currentStartState);
232 return newStartState;
247 for (
int i = 0; i < particles.count(); ++i)
static uint hash(const uchar *p, int n)
XsdElement::WeakList substitutionGroups() const
XsdStateMachine< XsdTerm::Ptr >::StateId addStartState(XsdStateMachine< XsdTerm::Ptr >::StateId state)
#define QT_END_NAMESPACE
This macro expands to.
The model group is a choice.
XsdStateMachine< XsdTerm::Ptr >::StateId reset()
XsdTerm::Ptr term() const
The model group contains elements only.
XsdStateMachine< XsdTerm::Ptr >::StateId buildParticle(const XsdParticle::Ptr &particle, XsdStateMachine< XsdTerm::Ptr >::StateId endState)
int count(const T &t) const
Returns the number of occurrences of value in the list.
XsdStateMachine< XsdTerm::Ptr >::StateId buildTerm(const XsdTerm::Ptr &term, XsdStateMachine< XsdTerm::Ptr >::StateId endState)
The QHash class is a template class that provides a hash-table-based dictionary.
virtual bool isWildcard() const
XsdStateMachineBuilder(XsdStateMachine< XsdTerm::Ptr > *machine, const NamePool::Ptr &namePool, Mode mode=CheckingMode)
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
unsigned int maximumOccurs() const
virtual bool isElement() const
#define QT_BEGIN_NAMESPACE
This macro expands to.
unsigned int minimumOccurs() const
XsdParticle::List particles() const
void prepend(const T &t)
Inserts value at the beginning of the list.
const T & at(int i) const
Returns the item at index position i in the list.
The namespace for the internal API of QtXmlPatterns.
static void internalParticleLookupMap(const XsdParticle::Ptr &particle, QHash< XsdTerm::Ptr, XsdParticle::Ptr > &hash)
XsdStateMachine< XsdTerm::Ptr > * m_stateMachine
bool maximumOccursUnbounded() const
T takeAt(int i)
Removes the item at index position i and returns it.
virtual bool isModelGroup() const
A state machine used for evaluation.
static QHash< XsdTerm::Ptr, XsdParticle::Ptr > particleLookupMap(const XsdParticle::Ptr &particle)
static bool substitutionGroupOkTransitive(const XsdElement::Ptr &head, const XsdElement::Ptr &member, const NamePool::Ptr &namePool)
ModelCompositor compositor() const
QList< QList< T > > allCombinations(const QList< T > &input)
The model group is a sequence.
The QList class is a template class that provides lists.