1 /*=============================================================================
2 
3   Library: CTK
4 
5   Copyright (c) German Cancer Research Center,
6     Division of Medical and Biological Informatics
7 
8   Licensed under the Apache License, Version 2.0 (the "License");
9   you may not use this file except in compliance with the License.
10   You may obtain a copy of the License at
11 
12     http://www.apache.org/licenses/LICENSE-2.0
13 
14   Unless required by applicable law or agreed to in writing, software
15   distributed under the License is distributed on an "AS IS" BASIS,
16   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   See the License for the specific language governing permissions and
18   limitations under the License.
19 
20 =============================================================================*/
21 
22 
23 #ifndef CTKPLUGINGENERATORCOREPLUGIN_H
24 #define CTKPLUGINGENERATORCOREPLUGIN_H
25 
26 #include <ctkPluginActivator.h>
27 
28 class ctkPluginGeneratorCodeModel;
29 
30 class ctkPluginGeneratorCorePlugin : public QObject,
31                                      public ctkPluginActivator
32 {
33   Q_OBJECT
34   Q_INTERFACES(ctkPluginActivator)
35 #ifdef HAVE_QT5
36   Q_PLUGIN_METADATA(IID "org_commontk_plugingenerator_core")
37 #endif
38 
39 public:
40 
41   void start(ctkPluginContext* context);
42   void stop(ctkPluginContext* context);
43 
44   ctkPluginContext* getContext() const;
45 
46   ctkPluginGeneratorCodeModel* getCodeModel() const;
47 
48   static ctkPluginGeneratorCorePlugin* getInstance();
49 
50 private:
51 
52   static ctkPluginGeneratorCorePlugin* instance;
53 
54   ctkPluginContext* pluginContext;
55 
56   ctkPluginGeneratorCodeModel* codeModel;
57 };
58 
59 #endif // CTKPLUGINGENERATORCOREPLUGIN_H
60