Soprano 2.9.4
pluginmanager.h
Go to the documentation of this file.
1/*
2 * This file is part of Soprano Project.
3 *
4 * Copyright (C) 2007-2009 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_PLUGIN_MANAGER_H_
23#define _SOPRANO_PLUGIN_MANAGER_H_
24
25#include "sopranotypes.h"
26#include "soprano_export.h"
27
28#include <QtCore/QObject>
29#include <QtCore/QStringList>
30
31
32namespace Soprano
33{
34 class Backend;
35 class Parser;
36 class Serializer;
37
38 namespace Query {
39 class Parser;
40 class Serializer;
41 }
42
55 class SOPRANO_EXPORT PluginManager : public QObject
56 {
57 Q_OBJECT
58
59 public:
61
63
75 void setPluginSearchPath( const QStringList& path, bool useDefaults = true );
76
91 bool loadCustomPlugin( const QString& path );
92
106 const Backend* loadCustomBackend( const QString& path );
107
121 const Parser* loadCustomParser( const QString& path );
122
138
140
147
156 const Backend* discoverBackendByFeatures( BackendFeatures features, const QStringList& userFeatures = QStringList() );
157
160
162
169
182 const Parser* discoverParserForSerialization( RdfSerialization serialization, const QString& userSerialization = QString() );
183
186
188
195
208 const Serializer* discoverSerializerForSerialization( RdfSerialization serialization, const QString& userSerialization = QString() );
209
212
214
216
222// const Query::Parser* discoverQueryParserByName( const QString& name );
223
234// const Query::Parser* discoverQueryParserForQueryLanguage( Query::QueryLanguage lang, const QString& userQueryLanguage = QString() );
235
236// QList<const Query::Parser*> allQueryParsers();
238
240
246// const Query::Serializer* discoverQuerySerializerByName( const QString& name );
247
258// const Query::Serializer* discoverQuerySerializerForQueryLanguage( Query::QueryLanguage lang, const QString& userQueryLanguage = QString() );
259
260// QList<const Query::Serializer*> allQuerySerializers();
262
264
268 static PluginManager* instance();
269
270 private:
271 PluginManager( QObject* parent = 0 );
272 void loadAllPlugins();
273 void loadPlugin( const QString& path );
274 void loadPlugins( const QString& path );
275
276 class Private;
277 Private* const d;
278
280 };
281}
282
283#endif
Soprano::Backend defines the interface for a Soprano backend plugin.
Definition backend.h:264
Soprano::Parser defines the interface for a Soprano RDF parser plugin.
Definition parser.h:70
void setPluginSearchPath(const QStringList &path, bool useDefaults=true)
bool loadCustomPlugin(const QString &path)
const Parser * discoverParserByName(const QString &name)
QList< const Backend * > allBackends()
QList< const Serializer * > allSerializers()
const Parser * discoverParserForSerialization(RdfSerialization serialization, const QString &userSerialization=QString())
static PluginManager * instance()
const Serializer * discoverSerializerByName(const QString &name)
friend class PluginManagerFactory
const Backend * discoverBackendByFeatures(BackendFeatures features, const QStringList &userFeatures=QStringList())
QList< const Parser * > allParsers()
const Backend * loadCustomBackend(const QString &path)
const Serializer * loadCustomSerializer(const QString &path)
const Serializer * discoverSerializerForSerialization(RdfSerialization serialization, const QString &userSerialization=QString())
const Parser * loadCustomParser(const QString &path)
const Backend * discoverBackendByName(const QString &name)
Soprano::Serializer defines the interface for a Soprano RDF serializer plugin.
Definition serializer.h:69
QObject(QObject *parent=0)
#define SOPRANO_EXPORT