diff options
author | Tobias Koenig <tokoe@kde.org> | 2009-05-16 10:30:25 (GMT) |
---|---|---|
committer | Tobias Koenig <tokoe@kde.org> | 2009-05-16 10:30:25 (GMT) |
commit | 456463169c6d00b9938f0d975dbd7f398edea39d (patch) | |
tree | 13c1b245cffa15828ef1b12ac24c271c301221f2 /src/xmlpatterns/schema/qxsdstatemachine.cpp | |
parent | 135a028d9dc9a28a0a072665a7dc43b7e9e187be (diff) | |
download | Qt-456463169c6d00b9938f0d975dbd7f398edea39d.zip Qt-456463169c6d00b9938f0d975dbd7f398edea39d.tar.gz Qt-456463169c6d00b9938f0d975dbd7f398edea39d.tar.bz2 |
Various api, documentation and code cleanups
Diffstat (limited to 'src/xmlpatterns/schema/qxsdstatemachine.cpp')
-rw-r--r-- | src/xmlpatterns/schema/qxsdstatemachine.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/xmlpatterns/schema/qxsdstatemachine.cpp b/src/xmlpatterns/schema/qxsdstatemachine.cpp index e40e55b..4f36f22 100644 --- a/src/xmlpatterns/schema/qxsdstatemachine.cpp +++ b/src/xmlpatterns/schema/qxsdstatemachine.cpp @@ -114,6 +114,20 @@ bool XsdStateMachine<TransitionType>::proceed(TransitionType transition) } template <typename TransitionType> +QList<TransitionType> XsdStateMachine<TransitionType>::possibleTransitions() const +{ + // check that we are not in an invalid state + if (!m_transitions.contains(m_currentState)) { + return QList<TransitionType>(); + } + + // fetch the transition entry for the current state + const QHash<TransitionType, QVector<StateId> > &entry = m_transitions[m_currentState]; + + return entry.keys(); +} + +template <typename TransitionType> template <typename InputType> bool XsdStateMachine<TransitionType>::proceed(InputType input) { @@ -259,7 +273,7 @@ typename XsdStateMachine<TransitionType>::StateId XsdStateMachine<TransitionType } // check if the NFA state set contains a Start or End - // state, in that case our new DFA state will be a + // state, in that case our new DFA state will be a // Start or End state as well StateType type = InternalState; QSetIterator<StateId> it(nfaState); |