00001
00045 #ifndef QSPARQLRESULTROW_H
00046 #define QSPARQLRESULTROW_H
00047
00048 #include "qsparql.h"
00049
00050 #include <QtCore/qstring.h>
00051
00052 QT_BEGIN_HEADER
00053
00054 QT_BEGIN_NAMESPACE
00055
00056 QT_MODULE(Sparql)
00057
00058 class QSparqlBinding;
00059 class QStringList;
00060 class QVariant;
00061 class QSparqlResultRowPrivate;
00062
00063 class Q_SPARQL_EXPORT QSparqlResultRow
00064 {
00065 public:
00066 QSparqlResultRow();
00067 QSparqlResultRow(const QSparqlResultRow& other);
00068 QSparqlResultRow& operator=(const QSparqlResultRow& other);
00069 ~QSparqlResultRow();
00070
00071 bool operator==(const QSparqlResultRow &other) const;
00072 inline bool operator!=(const QSparqlResultRow &other) const { return !operator==(other); }
00073
00074 int indexOf(const QString &name) const;
00075 QString variableName(int i) const;
00076
00077 QSparqlBinding binding(int i) const;
00078 QSparqlBinding binding(const QString &name) const;
00079 QVariant value(int i) const;
00080 QVariant value(const QString &name) const;
00081
00082 void append(const QSparqlBinding& binding);
00083
00084 bool isEmpty() const;
00085 bool contains(const QString& name) const;
00086 void clear();
00087 void clearValues();
00088 int count() const;
00089
00090 private:
00091 void detach();
00092 QSparqlResultRowPrivate* d;
00093 };
00094
00095 #ifndef QT_NO_DEBUG_STREAM
00096 Q_SPARQL_EXPORT QDebug operator<<(QDebug, const QSparqlResultRow &);
00097 #endif
00098
00099 QT_END_NAMESPACE
00100
00101 QT_END_HEADER
00102
00103 #endif // QSPARQLRESULTROW_H