Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
Medical Imaging Interaction Toolkit
berryPlugin.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "berryPlugin.h"
14 #include "internal/berryInternalPlatform.h"
15 
16 namespace berry {
17 
19  : m_Context(nullptr)
20 {
21 }
22 
23 void Plugin::start(ctkPluginContext* context)
24 {
25  m_Context = context;
26 }
27 
28 void Plugin::stop(ctkPluginContext* /*context*/)
29 {
30  m_Context = nullptr;
31 }
32 
34 {
35  return m_Context->getPlugin();
36 }
37 
39 {
40  return InternalPlatform::GetInstance()->GetLog(m_Context->getPlugin());
41 }
42 
43 QString Plugin::GetStateLocation() const
44 {
45  return InternalPlatform::GetInstance()->GetStateLocation(GetPlugin()).absolutePath();
46 }
47 
48 }
void stop(ctkPluginContext *context) override
Definition: berryPlugin.cpp:28
QString GetStateLocation() const
Definition: berryPlugin.cpp:43
void start(ctkPluginContext *context) override
Definition: berryPlugin.cpp:23
ILog * GetLog() const
Definition: berryPlugin.cpp:38
QSharedPointer< ctkPlugin > GetPlugin() const
Definition: berryPlugin.cpp:33
ctkPluginContext * m_Context
Definition: berryPlugin.h:67