Soprano 2.9.4
datastream.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2008 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_DATA_STREAM_H_
23#define _SOPRANO_DATA_STREAM_H_
24
25#include "soprano_export.h"
26#include "error.h"
27
28class QUrl;
29class QByteArray;
30
31namespace Soprano {
32
33 class LiteralValue;
34 class BindingSet;
35 class BackendSetting;
36 class Node;
37 class Statement;
38 namespace Error {
39 class Locator;
40 }
41
56 {
57 public:
59 virtual ~DataStream();
60
61 bool writeByteArray( const QByteArray& );
62 bool writeString( const QString& );
63 bool writeUrl( const QUrl& );
64// bool writeVariant( const QVariant& );
65 bool writeUnsignedInt8( quint8 );
66 bool writeUnsignedInt16( quint16 );
67 bool writeUnsignedInt32( quint32 );
68 bool writeInt32( qint32 );
69 bool writeBool( bool );
70
73 bool writeError( const Error::Error& );
74// bool writeBackendSetting( const BackendSetting& );
76 bool writeNode( const Node& );
77 bool writeStatement( const Statement& );
79
82 bool readUrl( QUrl& );
83// bool readVariant( QVariant& );
84 bool readUnsignedInt8( quint8& );
85 bool readUnsignedInt16( quint16& );
86 bool readUnsignedInt32( quint32& );
87 bool readInt32( qint32& );
88 bool readBool( bool& );
89
93// bool readBackendSetting( BackendSetting& );
95 bool readNode( Node& );
98
99 protected:
104 virtual bool read( char* data, qint64 size ) = 0;
105
110 virtual bool write( const char* data, qint64 size ) = 0;
111 };
112}
113
114#endif
Wraps one setting for Model creation.
Definition backend.h:53
Represents one set of bindings in the result of a select query.
Definition bindingset.h:49
bool readUnsignedInt32(quint32 &)
bool writeLocator(const Error::Locator &)
bool readUrl(QUrl &)
bool writeStatement(const Statement &)
bool writeUnsignedInt32(quint32)
bool readString(QString &)
bool readStatement(Statement &)
bool writeError(const Error::Error &)
bool writeNode(const Node &)
virtual bool write(const char *data, qint64 size)=0
bool writeUnsignedInt16(quint16)
bool writeByteArray(const QByteArray &)
bool readLiteralValue(LiteralValue &)
bool writeBindingSet(const BindingSet &)
bool writeBool(bool)
bool writeInt32(qint32)
bool readBool(bool &)
bool readBindingSet(BindingSet &)
bool writeString(const QString &)
bool readLocator(Error::Locator &)
bool writeUrl(const QUrl &)
virtual bool read(char *data, qint64 size)=0
bool writeLiteralValue(const LiteralValue &)
bool readUnsignedInt8(quint8 &)
bool readNode(Node &)
bool readUnsignedInt16(quint16 &)
bool readInt32(qint32 &)
bool readErrorCode(Error::ErrorCode &code)
bool writeErrorCode(Error::ErrorCode code)
bool readByteArray(QByteArray &)
bool readError(Error::Error &)
bool writeUnsignedInt8(quint8)
Core class of Soprano's exception system.
Definition error.h:235
Represents an error in Soprano.
Definition error.h:78
Details of a parser Error.
Definition locator.h:41
Represents a literal value of an RDF Node.
A Node represents one RDF resource.
Definition node.h:54
A Statement instance represents one RDF quadruple.
Definition statement.h:48
#define SOPRANO_EXPORT