umbrello API Documentation

pluginloader.h

00001 /***************************************************************************
00002                           pluginloader.h
00003                              -------------------
00004     begin                : Mon Jan 13 2003
00005     copyright            : (C) 2003 by Andrew Sutton
00006     email                : ansutton@kent.edu
00007   Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
00008 ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifndef UMBRELLO_PLUGINLOADER_H
00020 #define UMBRELLO_PLUGINLOADER_H
00021 
00022 // Qt includes
00023 #include <qobject.h>
00024 #include <qvaluelist.h>
00025 #include <qmap.h>
00026 
00027 // forward declarations
00028 class QString;
00029 
00030 namespace Umbrello
00031 {
00032 // forward declarations
00033 class Plugin;
00034 
00067 class PluginLoader : public QObject
00068 {
00069     Q_OBJECT
00070 public:
00072     ~PluginLoader();
00073 
00074 
00076     typedef QValueList<Plugin *> PluginList;
00077 
00079     typedef QMap<QString, Plugin *> PluginMap;
00080 
00082     typedef QMap<QString, PluginList> CategoryMap;
00083 
00085     static PluginLoader *instance();
00086 
00091     Plugin *loadPlugin(const QString &name);
00092 
00094     Plugin *findPlugin(const QString &name);
00095 
00102     void unloadPlugin(const QString &name);
00103 
00109     const PluginMap &plugins() const;
00110 
00112     const CategoryMap &categories() const;
00113 
00114 private slots:
00120     void slotDestroyed(QObject *obj);
00121 
00122 private:
00124     PluginLoader();
00125 
00126     static PluginLoader        *_instance;      
00127     PluginMap                   _plugins;       
00128     CategoryMap                 _categories;    
00129 };
00130 }
00131 
00132 #endif
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:59 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003