Soprano
2.9.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
soprano
util
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
28
namespace
Soprano {
29
namespace
Util {
30
class
MutexIteratorBase;
31
44
class
SOPRANO_EXPORT
MutexModel
:
public
FilterModel
45
{
46
Q_OBJECT
47
48
public
:
49
enum
ProtectionMode
{
56
PlainMultiThreading
,
57
67
ReadWriteMultiThreading
,
68
73
ReadWriteSingleThreading
74
};
75
83
MutexModel
( ProtectionMode mode,
Model
* parent = 0 );
84
88
~
MutexModel
();
89
90
Error::ErrorCode
addStatement(
const
Statement
&statement );
91
Error::ErrorCode
removeStatement(
const
Statement
&statement );
92
Error::ErrorCode
removeAllStatements(
const
Statement
&statement );
93
StatementIterator
listStatements(
const
Statement
&partial )
const
;
94
NodeIterator
listContexts()
const
;
95
QueryResultIterator
executeQuery(
const
QString
& query,
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
Generated by
1.8.3.1