go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Loading...
Searching...
No Matches
elxMacro.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef elxMacro_h
19#define elxMacro_h
20
21// Avoid creation of multiple instances of `itk::ImageIOFactoryRegisterManager`, `itk::MeshIOFactoryRegisterManager`,
22// and `itk::TransformIOFactoryRegisterManager`.
23#undef ITK_IO_FACTORY_REGISTER_MANAGER
24
33#include "itkWin32Header.h"
34#include "itkMacro.h"
35
97#define elxInstallMacro(_classname) \
98 extern "C" ELX_PLUGIN_EXPORT int _classname##InstallComponent(::elastix::ComponentDatabase * _cdb) \
99 { \
100 return ::elastix::ComponentInstaller<::elastix::_classname>::DO(_cdb); \
101 } // ignore semicolon
102
122#define elxClassNameMacro(_name) \
123 static const char * elxGetClassNameStatic() { return _name; } \
124 const char * elxGetClassName() const override { return _name; }
125
129#define elxDeclarePureVirtualGetSelfMacro(type) \
130 virtual const type & GetSelf() const override = 0; \
131 virtual type & GetSelf() override = 0
132
137#define elxOverrideGetSelfMacro \
138 auto GetSelf() const -> decltype(*this) override { return *this; } \
139 auto GetSelf() -> decltype(*this) override { return *this; } \
140 static void GetSelf(const void *) = delete
141
142
154#define elxout ::xl::xout["standard"]
155
156/********************************************************************************
157 * *
158 * Dll export *
159 * *
160 ********************************************************************************/
161
162#if (defined(_WIN32) || defined(WIN32))
163# define ELASTIXLIB_API
164#else
165# if (__GNUC__ >= 4 || defined(__clang__))
166# define ELASTIXLIB_API __attribute__((visibility("default")))
167# else
168# define ELASTIXLIB_API
169# endif
170#endif
171
172#if defined(_WIN32) && !defined(__CYGWIN__)
173# define ELX_PLUGIN_EXPORT __declspec(dllexport)
174#else
175# define ELX_PLUGIN_EXPORT __attribute__((visibility("default")))
176#endif
177
178#endif // end #ifndef elxMacro_h


Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo