class StatementIterator


Module soprano
Namespace Soprano
Class StatementIterator
Inherits Iterator
\class StatementIterator statementiterator.h Soprano/StatementIterator

An iterator that provides a stream of Statements.

The most common use of StatementIterator is through Model.listStatements().

Many backends do lock the underlying Model during iteration. Thus, it is always a good idea to cache the results if they are to be used to modify the model to prevent a deadlock:

Soprano.StatementIterator it = model->listStatements();
QList allStatements = it.allElements();
Q_FOREACH( Soprano.Statement s, allStatements ) {
modifyTheModel( model, s );
}

For further details on %Soprano iterators see Iterator.

Be aware that iterators in Soprano are shared objects which means that copies of one iterator object work on the same data.

Author Daniele Galdi
Sebastian Trueg



methods