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 
32 namespace Soprano
33 {
34  class Backend;
35  class Parser;
36  class Serializer;
37 
38  namespace Query {
39  class Parser;
40  class Serializer;
41  }
42 
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 
136  const Serializer* loadCustomSerializer( const QString& path );
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 
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 
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 
279  friend class PluginManagerFactory;
280  };
281 }
282 
283 #endif
Soprano::PluginManager::discoverBackendByName
const Backend * discoverBackendByName(const QString &name)
Soprano::PluginManager::discoverParserForSerialization
const Parser * discoverParserForSerialization(RdfSerialization serialization, const QString &userSerialization=QString())
Soprano::PluginManager::discoverBackendByFeatures
const Backend * discoverBackendByFeatures(BackendFeatures features, const QStringList &userFeatures=QStringList())
soprano_export.h
Soprano::PluginManager::instance
static PluginManager * instance()
Soprano::Serializer
Soprano::Serializer defines the interface for a Soprano RDF serializer plugin.
Definition: serializer.h:69
SOPRANO_EXPORT
#define SOPRANO_EXPORT
Definition: soprano_export.h:37
QList
Soprano::PluginManager::loadCustomParser
const Parser * loadCustomParser(const QString &path)
Soprano::PluginManager::allParsers
QList< const Parser * > allParsers()
Soprano::PluginManager::discoverSerializerForSerialization
const Serializer * discoverSerializerForSerialization(RdfSerialization serialization, const QString &userSerialization=QString())
QObject
sopranotypes.h
Soprano::PluginManager::discoverParserByName
const Parser * discoverParserByName(const QString &name)
Soprano::PluginManager::loadCustomBackend
const Backend * loadCustomBackend(const QString &path)
Soprano::Parser
Soprano::Parser defines the interface for a Soprano RDF parser plugin.
Definition: parser.h:70
Soprano::PluginManager::allSerializers
QList< const Serializer * > allSerializers()
Soprano::PluginManager::discoverSerializerByName
const Serializer * discoverSerializerByName(const QString &name)
Soprano::Vocabulary::Xesam::name
SOPRANO_EXPORT QUrl name()
Soprano
Definition: backend.h:36
Soprano::PluginManager::allBackends
QList< const Backend * > allBackends()
Soprano::PluginManager::loadCustomPlugin
bool loadCustomPlugin(const QString &path)
Soprano::Backend
Soprano::Backend defines the interface for a Soprano backend plugin.
Definition: backend.h:264
Soprano::RdfSerialization
RdfSerialization
Definition: sopranotypes.h:39
Soprano::PluginManager::~PluginManager
~PluginManager()
Soprano::PluginManager
The PluginManager loads and maintains all Soprano plugins.
Definition: pluginmanager.h:56
Soprano::PluginManager::loadCustomSerializer
const Serializer * loadCustomSerializer(const QString &path)
QString
Soprano::PluginManager::setPluginSearchPath
void setPluginSearchPath(const QStringList &path, bool useDefaults=true)
QStringList