umbrello: umbrello/_unused/pluginloader.h Source File

umbrello 2.32.1 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

pluginloader.h
Go to the documentation of this file.
1 /***************************************************************************
2 pluginloader.h
3 -------------------
4 begin : Mon Jan 13 2003
5 copyright : (C) 2003 by Andrew Sutton
6 email : ansutton@kent.edu
7 Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org
8 ***************************************************************************/
9
10 /***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19 #ifndef UMBRELLO_PLUGINLOADER_H
20 #define UMBRELLO_PLUGINLOADER_H
21
22 // Qt includes
23 #include <Q3ValueList>
24 #include <QMap>
25
26 // forward declarations
27 class QString;
28
29 namespace Umbrello
30 {
31 // forward declarations
32 class Plugin;
33
66 class PluginLoader : public QObject
67 {
68 Q_OBJECT
69 public:
70
72 ~PluginLoader();
73
74
76 typedef Q3ValueList<Plugin *> PluginList;
77
79 typedef QMap<QString, Plugin *> PluginMap;
80
82 typedef QMap<QString, PluginList> CategoryMap;
83
85 static PluginLoader *instance();
86
91 Plugin *loadPlugin(const QString &name);
92
94 Plugin *findPlugin(const QString &name);
95
102 void unloadPlugin(const QString &name);
103
109 const PluginMap &plugins() const;
110
112 const CategoryMap &categories() const;
113
114 private slots:
120 void slotDestroyed(QObject *obj);
121
122 private:
124 PluginLoader();
125
126 static PluginLoader *_instance;
127 PluginMap _plugins;
128 CategoryMap _categories;
129 };
130 }
131
132 #endif
Umbrello::PluginLoader::PluginLoader
PluginLoader()
Definition: pluginloader.cpp:34
Umbrello::PluginLoader::_plugins
PluginMap _plugins
The plugin mapping.
Definition: pluginloader.h:127
Umbrello::PluginLoader::_categories
CategoryMap _categories
Categories of plugins.
Definition: pluginloader.h:128
Umbrello::Plugin::ref
void ref()
Definition: plugin.cpp:47
Umbrello::PluginLoader::unloadPlugin
void unloadPlugin(const QString &name)
Definition: pluginloader.cpp:137
plugin.h
Umbrello
Definition: configurable.h:36
Umbrello::PluginLoader::findPlugin
Plugin * findPlugin(const QString &name)
Definition: pluginloader.cpp:128
Umbrello::PluginLoader::categories
const CategoryMap & categories() const
Definition: pluginloader.cpp:149
Umbrello::Plugin::category
virtual QString category()
Definition: plugin.cpp:159
Umbrello::PluginLoader::_instance
static PluginLoader * _instance
Singleton instance.
Definition: pluginloader.h:126
Umbrello::PluginLoader::slotDestroyed
void slotDestroyed(QObject *obj)
Definition: pluginloader.cpp:155
Umbrello::Plugin
Definition: plugin.h:90
Umbrello::PluginLoader::~PluginLoader
~PluginLoader()
Definition: pluginloader.cpp:44
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
Umbrello::PluginLoader::PluginMap
QMap< QString, Plugin * > PluginMap
Definition: pluginloader.h:79
Umbrello::Plugin::init
bool init()
Definition: plugin.cpp:71
Umbrello::PluginLoader::loadPlugin
Plugin * loadPlugin(const QString &name)
Definition: pluginloader.cpp:56
Umbrello::PluginLoader
Definition: pluginloader.h:67
Umbrello::PluginLoader::CategoryMap
QMap< QString, PluginList > CategoryMap
Definition: pluginloader.h:82
pluginloader.h
Umbrello::PluginLoader::plugins
const PluginMap & plugins() const
Definition: pluginloader.cpp:143
Umbrello::PluginLoader::PluginList
Q3ValueList< Plugin * > PluginList
Definition: pluginloader.h:76
Umbrello::PluginLoader::instance
static PluginLoader * instance()
Definition: pluginloader.cpp:49