ctkPluginFrameworkContext_p.h

Go to the documentation of this file.
00001 /*=============================================================================
00002 
00003   Library: CTK
00004 
00005   Copyright (c) 2010 German Cancer Research Center,
00006     Division of Medical and Biological Informatics
00007 
00008   Licensed under the Apache License, Version 2.0 (the "License");
00009   you may not use this file except in compliance with the License.
00010   You may obtain a copy of the License at
00011 
00012     http://www.apache.org/licenses/LICENSE-2.0
00013 
00014   Unless required by applicable law or agreed to in writing, software
00015   distributed under the License is distributed on an "AS IS" BASIS,
00016   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017   See the License for the specific language governing permissions and
00018   limitations under the License.
00019 
00020 =============================================================================*/
00021 
00022 #ifndef CTKPLUGINFRAMEWORKCONTEXT_P_H
00023 #define CTKPLUGINFRAMEWORKCONTEXT_P_H
00024 
00025 #include <QDebug>
00026 #include <QMutex>
00027 
00028 #include "ctkPluginFrameworkFactory.h"
00029 #include "ctkPluginFramework.h"
00030 #include "ctkPluginStorage_p.h"
00031 #include "ctkPlugins_p.h"
00032 #include "ctkPluginFrameworkListeners_p.h"
00033 #include "ctkServices_p.h"
00034 
00035 
00036   class ctkPlugin;
00037 
00038   class ctkPluginFrameworkContext {
00039 
00040   public:
00041 
00045       ctkPlugins* plugins;
00046 
00050       ctkPluginFrameworkListeners listeners;
00051 
00055       ctkServices services;
00056 
00060       ctkPluginFramework systemPlugin;
00061 
00065       ctkPluginStorage storage;
00066 
00070       int id;
00071 
00075       static QMutex globalFwLock;
00076 
00080       static int globalId;
00081 
00082       ctkPluginFrameworkFactory::Properties props;
00083 
00088       ctkPluginFrameworkContext(const ctkPluginFrameworkFactory::Properties& initProps);
00089 
00090 
00095       void init();
00096 
00097 
00102       void uninit();
00103 
00104 
00108       int getId() const;
00109 
00110 
00115       void checkOurPlugin(ctkPlugin* plugin) const;
00116 
00117 
00126       void resolvePlugin(ctkPluginPrivate* plugin);
00127 
00128 
00133       QDebug log() const;
00134 
00135   private:
00136 
00137       QSet<ctkPluginPrivate*> tempResolved;
00138 
00139       void checkRequirePlugin(ctkPluginPrivate* plugin);
00140   };
00141 
00142 
00143 #endif // CTKPLUGINFRAMEWORKCONTEXT_P_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1