Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkTubeGraphModuleActivator.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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #include <usModuleActivator.h>
17 #include <usModuleContext.h>
18 
19 #include "mitkTubeGraphIO.h"
20 
21 namespace mitk
22 {
26  class TubeGraphActivator : public us::ModuleActivator
27  {
28  std::vector<AbstractFileIO *> m_FileIOs;
29 
30  public:
31  void Load(us::ModuleContext * /*context*/) override { m_FileIOs.push_back(new TubeGraphIO()); }
32  void Unload(us::ModuleContext *) override
33  {
34  for (auto &elem : m_FileIOs)
35  {
36  delete elem;
37  }
38  }
39  };
40 }
41 
42 US_EXPORT_MODULE_ACTIVATOR(mitk::TubeGraphActivator)
DataCollection - Class to facilitate loading/accessing structured data.
virtual void Unload(ModuleContext *context)=0
virtual void Load(ModuleContext *context)=0
US_EXPORT_MODULE_ACTIVATOR(mitk::SimulationActivator)