~ubuntu-branches/debian/sid/libdc0/sid

« back to all changes in this revision

Viewing changes to dclib/cpluginmanager.h

  • Committer: Bazaar Package Importer
  • Author(s): Pasi Savilaakso
  • Date: 2004-06-05 23:01:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040605230137-2ty5g6rcfyguk4et
Tags: upstream-0.3.2
Import upstream version 0.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                           cpluginmanager.h  -  description
 
3
                             -------------------
 
4
    begin                : Fri Sep 27 2002
 
5
    copyright            : (C) 2002-2003 by Mathias K�ster
 
6
    email                : mathen@users.berlios.de
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
 
 
18
#ifndef CPLUGINMANAGER_H
 
19
#define CPLUGINMANAGER_H
 
20
 
 
21
/**
 
22
  *@author Mathias K�ster
 
23
  */
 
24
 
 
25
#include <dclib/dcos.h>
 
26
#include <dclib/core/cobject.h>
 
27
#include <dclib/core/cplugin.h>
 
28
#include <dclib/core/clist.h>
 
29
#include <dclib/core/csingleton.h>
 
30
 
 
31
class CPluginManager;
 
32
class CPluginObject;
 
33
 
 
34
#ifdef WIN32
 
35
template class DLL_EXPORT CList<CPlugin>;
 
36
template class DLL_EXPORT CSingleton<CPluginManager>;
 
37
template class DLL_EXPORT CList<CPluginObject>;
 
38
#endif
 
39
 
 
40
class DLL_EXPORT CPluginObject : public CObject {
 
41
public:
 
42
        /** */
 
43
        CPluginObject() {};
 
44
        /** */
 
45
        virtual ~CPluginObject() {};
 
46
 
 
47
        /** */
 
48
        ePluginStruct * m_ePluginStruct;
 
49
        /** */
 
50
#ifndef WIN32
 
51
        void * m_Handle;
 
52
#else
 
53
        HINSTANCE m_Handle;
 
54
#endif
 
55
};
 
56
 
 
57
class DLL_EXPORT CPluginManager : public CSingleton<CPluginManager>, public CObject {
 
58
public:
 
59
        /** */
 
60
        CPluginManager();
 
61
        /** */
 
62
        virtual ~CPluginManager();
 
63
 
 
64
        /** */
 
65
        void Load();
 
66
        /** */
 
67
        void InitPlugins();
 
68
        /** */
 
69
        void DeInitPlugins();
 
70
        /** */
 
71
        virtual bool Init( CPluginObject * plugin );
 
72
 
 
73
private:
 
74
        /** */
 
75
        friend class CSingleton<CPluginManager>;
 
76
 
 
77
        /** */
 
78
        CList<CPluginObject> * m_pPluginList;
 
79
        /** */
 
80
        CPluginInstance * m_pPluginInstance;
 
81
};
 
82
 
 
83
#endif