NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
niftk-nightly
MITK
Modules
MIDAS
Interactions
niftkToolFactoryMacros.h
Go to the documentation of this file.
1
/*=============================================================================
2
3
NifTK: A software platform for medical image computing.
4
5
Copyright (c) University College London (UCL). All rights reserved.
6
7
This software is distributed WITHOUT ANY WARRANTY; without even
8
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9
PURPOSE.
10
11
See LICENSE.txt in the top level directory for details.
12
13
=============================================================================*/
14
15
#ifndef niftkToolFactoryMacros_h
16
#define niftkToolFactoryMacros_h
17
18
// Note:
19
// MITK_TOOL_MACRO assumes that the type is in the 'mitk' namespace.
20
// To overcome this assumption, we create an 'alias' to our class with
21
// the desired name.
22
23
#define NIFTK_TOOL_MACRO(EXPORT_SPEC, TOOL_CLASS_NAME, DESCRIPTION)\
24
namespace mitk\
25
{\
26
class TOOL_CLASS_NAME : public niftk::TOOL_CLASS_NAME\
27
{\
28
};\
29
\
30
MITK_TOOL_MACRO(EXPORT_SPEC, TOOL_CLASS_NAME, DESCRIPTION);\
31
}\
32
33
// Note:
34
// QmitkToolSelectionBox looks for tool controls with a "Qmitk" prefix and
35
// "GUI" suffix added to the class name of the tool. To overcome this assumption
36
// we create an 'alias' to our class with the desired name.
37
// This version of the macro does not export the class.
38
39
#define FAKE_EXPORT_SPEC
40
41
#define NIFTK_TOOL_GUI_MACRO_NO_EXPORT(TOOL_CLASS_NAME, TOOL_GUI_CLASS_NAME, DESCRIPTION)\
42
\
43
class Qmitk ## TOOL_CLASS_NAME ## GUI : public TOOL_GUI_CLASS_NAME\
44
{\
45
};\
46
\
47
MITK_TOOL_GUI_MACRO(FAKE_EXPORT_SPEC, Qmitk ## TOOL_CLASS_NAME ## GUI, DESCRIPTION)\
48
49
// Note:
50
// QmitkToolSelectionBox looks for tool controls with a "Qmitk" prefix and
51
// "GUI" suffix added to the class name of the tool. To overcome this assumption
52
// we create an 'alias' to our class with the desired name.
53
// This version of the macro exports the class.
54
55
#define NIFTK_TOOL_GUI_MACRO(EXPORT_SPEC, TOOL_CLASS_NAME, TOOL_GUI_CLASS_NAME, DESCRIPTION)\
56
\
57
class EXPORT_SPEC Qmitk ## TOOL_CLASS_NAME ## GUI : public TOOL_GUI_CLASS_NAME\
58
{\
59
};\
60
\
61
MITK_TOOL_GUI_MACRO(EXPORT_SPEC, Qmitk ## TOOL_CLASS_NAME ## GUI, DESCRIPTION)\
62
63
#endif
Generated on Thu Aug 4 2016 06:02:51 for NifTK by
1.8.8