Soprano  2.9.4
bindingset.h
Go to the documentation of this file.
1 /*
2  * This file is part of Soprano Project.
3  *
4  * Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef _SOPRANO_QUERY_BINDINGS_H_
23 #define _SOPRANO_QUERY_BINDINGS_H_
24 
25 #include "soprano_export.h"
26 
27 #include <QtCore/QSharedDataPointer>
28 
29 
30 class QStringList;
31 
32 namespace Soprano {
33 
34  class Node;
35 
49  {
50  public:
54  BindingSet();
55 
59  BindingSet( const BindingSet& other );
60 
64  ~BindingSet();
65 
66  BindingSet& operator=( const BindingSet& );
67 
71  QStringList bindingNames() const;
72 
78  Node operator[]( int offset ) const;
79 
85  Node operator[]( const QString name ) const;
86 
97  Node value( int offset ) const;
98 
109  Node value( const QString& name ) const;
110 
119  bool contains( const QString& name ) const;
120 
126  int count() const;
127 
131  void insert( const QString& name, const Node& value );
132 
138  void replace( int offset, const Node& value );
139 
145  void replace( const QString& name, const Node& value );
146 
152  bool operator==( const BindingSet& other ) const;
153 
159  bool operator!=( const BindingSet& other ) const;
160 
161  private:
162  class Private;
164  };
165 }
166 
167 class QDebug;
168 class QTextStream;
169 
170 SOPRANO_EXPORT QDebug operator<<( QDebug s, const Soprano::BindingSet& );
172 
173 #endif
soprano_export.h
QSharedDataPointer< Private >
SOPRANO_EXPORT
#define SOPRANO_EXPORT
Definition: soprano_export.h:37
Soprano::Vocabulary::RDF::value
SOPRANO_EXPORT QUrl value()
Soprano::Node::operator<<
SOPRANO_EXPORT QDebug operator<<(QDebug s, const Soprano::Node &)
QTextStream
Soprano::Vocabulary::Xesam::name
SOPRANO_EXPORT QUrl name()
Soprano
Definition: backend.h:35
Soprano::BindingSet
Represents one set of bindings in the result of a select query.
Definition: bindingset.h:48
Soprano::Vocabulary::Xesam::contains
SOPRANO_EXPORT QUrl contains()
Soprano::Node
A Node represents one RDF resource.
Definition: node.h:53
QString
QStringList