• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/tmp/buildd/soprano-2.5.0.e5.20100910.1174752/soprano/queryresultiterator.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of Soprano Project.
00003  *
00004  * Copyright (C) 2006 Daniele Galdi <daniele.galdi@gmail.com>
00005  * Copyright (C) 2007-2009 Sebastian Trueg <trueg@kde.org>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public License
00018  * along with this library; see the file COPYING.LIB.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef SOPRANO_RESULT_SET_H
00024 #define SOPRANO_RESULT_SET_H
00025 
00026 #include "iterator.h"
00027 #include "bindingset.h"
00028 #include "statement.h"
00029 #include "soprano_export.h"
00030 
00031 #include <QtCore/QString>
00032 #include <QtCore/QStringList>
00033 
00034 
00035 namespace Soprano {
00036 
00037     class Node;
00038     class NodeIterator;
00039     class QueryResultIteratorBackend;
00040     class StatementIterator;
00041     class BindingSet;
00042 
00108     class SOPRANO_EXPORT QueryResultIterator : public Iterator<BindingSet>
00109     {
00110     public:
00112 
00115         QueryResultIterator();
00116 
00120         QueryResultIterator( const QueryResultIterator& );
00121 
00126         QueryResultIterator( QueryResultIteratorBackend *qr );
00127 
00131         virtual ~QueryResultIterator();
00132 
00136         QueryResultIterator& operator=( const QueryResultIterator& );
00138 
00140 
00144         Statement currentStatement() const;
00145 
00150         BindingSet currentBindings() const;
00151 
00159         bool boolValue() const;
00161 
00163 
00175         Node operator[]( int offset ) const;
00176 
00189         Node operator[]( const QString name ) const;
00190 
00201         Node binding( const QString &name ) const;
00202 
00213         Node binding( int offset ) const;
00214 
00222         int bindingCount() const;
00223 
00229         QStringList bindingNames() const;
00231 
00233 
00239         bool isGraph() const;
00240 
00247         bool isBinding() const;
00248 
00258         bool isBool() const;
00260 
00262 
00266         QList<BindingSet> allBindings();
00267 
00277         StatementIterator iterateStatements() const;
00278 
00291         NodeIterator iterateBindings( const QString& variableName ) const;
00292 
00305         NodeIterator iterateBindings( int offset ) const;
00306 
00337         StatementIterator iterateStatementsFromBindings( const QString& subjectBindingName, 
00338                                                          const QString& predicateBindingName, 
00339                                                          const QString& objectBindingName, 
00340                                                          const QString& contextBindingName = QString(),
00341                                                          const Statement& templateStatement = Statement() ) const;
00343     };
00344 }
00345 
00346 #endif // SOPRANO_RESULT_SET_H

Generated on Mon Sep 13 2010 08:51:56 for Soprano by  doxygen 1.7.1