Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1307
niftkToolFactoryMacros.h
Public
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
espak
Mar 26 2016, 11:24 AM
2016-03-26 11:24:24 (UTC+1)
Size
1 KB
Referenced Files
None
Subscribers
None
niftkToolFactoryMacros.h
View Options
/*=============================================================================
NifTK: A software platform for medical image computing.
Copyright (c) University College London (UCL). All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
See LICENSE.txt in the top level directory for details.
=============================================================================*/
#ifndef __niftkToolFactoryMacros_h
#define __niftkToolFactoryMacros_h
// Note:
// MITK_TOOL_MACRO assumes that the type is in the 'mitk' namespace.
// To overcome this assumption, we create an 'alias' to our class with
// the desired name.
#define NIFTK_TOOL_MACRO(EXPORT_SPEC, TOOL_CLASS_NAME, DESCRIPTION)\
namespace mitk\
{\
class TOOL_CLASS_NAME : public niftk::TOOL_CLASS_NAME\
{\
};\
\
MITK_TOOL_MACRO(EXPORT_SPEC, TOOL_CLASS_NAME, DESCRIPTION);\
}\
// Note:
// QmitkToolSelectionBox looks for tool controls with a "Qmitk" prefix and
// "GUI" suffix added to the class name of the tool. To overcome this assumption
// we create an 'alias' to our class with the desired name.
#define NIFTK_TOOL_GUI_MACRO(EXPORT_SPEC, TOOL_CLASS_NAME, TOOL_GUI_CLASS_NAME, DESCRIPTION)\
\
class EXPORT_SPEC Qmitk ## TOOL_CLASS_NAME ## GUI : public TOOL_GUI_CLASS_NAME\
{\
};\
\
MITK_TOOL_GUI_MACRO(EXPORT_SPEC, Qmitk ## TOOL_CLASS_NAME ## GUI, DESCRIPTION)\
#endif
File Metadata
Details
Attached
Mime Type
application/octet-stream
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1266
Default Alt Text
niftkToolFactoryMacros.h (1 KB)
Attached To
Mode
T19601: Tool registration macro hard coded to use mitk namespace
Attached
Detach File
Event Timeline
espak
added a comment.
Mar 26 2016, 11:24 AM
2016-03-26 11:24:24 (UTC+1)
Comment Actions
macros to overcome assumption about tool and tool gui class names
Log In to Comment