Soprano 2.9.4
mutexmodel.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2007-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_MUTEX_MODEL_H_
23#define _SOPRANO_MUTEX_MODEL_H_
24
25#include "filtermodel.h"
26#include "soprano_export.h"
27
28namespace Soprano {
29 namespace Util {
30 class MutexIteratorBase;
31
45 {
46 Q_OBJECT
47
48 public:
57
68
73 ReadWriteSingleThreading
74 };
75
83 MutexModel( ProtectionMode mode, Model* parent = 0 );
84
89
96 Query::QueryLanguage language,
97 const QString& userQueryLanguage = QString() ) const;
98 bool containsStatement( const Statement &statement ) const;
99 bool containsAnyStatement( const Statement &statement ) const;
100 bool isEmpty() const;
101 int statementCount() const;
102
103 using FilterModel::addStatement;
104 using FilterModel::removeStatement;
105 using FilterModel::removeAllStatements;
106 using FilterModel::listStatements;
107 using FilterModel::containsStatement;
108 using FilterModel::containsAnyStatement;
109
110 private:
111 void removeIterator( MutexIteratorBase* it ) const;
112
113 class Private;
114 Private* const d;
115
116 friend class MutexIteratorBase;
117 };
118 }
119}
120
121#endif
A FilterModel is a virtual model that wraps another Model.
Definition: filtermodel.h:49
A Model is the central class in Soprano. It is a queryable collection of RDF quadruples,...
Definition: model.h:95
An iterator that provides a stream of Nodes.
Definition: nodeiterator.h:73
An iterator for query results.
An iterator that provides a stream of Statements.
A Statement instance represents one RDF quadruple.
Definition: statement.h:48
Protect a Model for multiple calls in multi-threaded applications.
Definition: mutexmodel.h:45
MutexModel(ProtectionMode mode, Model *parent=0)
Error::ErrorCode removeStatement(const Statement &statement)
StatementIterator listStatements(const Statement &partial) const
bool containsAnyStatement(const Statement &statement) const
NodeIterator listContexts() const
bool containsStatement(const Statement &statement) const
Error::ErrorCode removeAllStatements(const Statement &statement)
Error::ErrorCode addStatement(const Statement &statement)
QueryResultIterator executeQuery(const QString &query, Query::QueryLanguage language, const QString &userQueryLanguage=QString()) const
#define SOPRANO_EXPORT