Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
Src
E
elastix
Core
Install
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" int _classname##InstallComponent(::elastix::ComponentDatabase * _cdb) \
99
{ \
100
return ::elastix::ComponentInstaller<::elastix::_classname>::DO(_cdb); \
101
}
// ignore semicolon
102
103
123
#define elxClassNameMacro(_name) \
124
static const char * elxGetClassNameStatic() { return _name; } \
125
const char * elxGetClassName() const override { return _name; }
126
130
#define elxDeclarePureVirtualGetSelfMacro(type) \
131
virtual const type & GetSelf() const override = 0; \
132
virtual type & GetSelf() override = 0
133
138
#define elxOverrideGetSelfMacro \
139
auto GetSelf() const->decltype(*this) override { return *this; } \
140
auto GetSelf()->decltype(*this) override { return *this; } \
141
static void GetSelf(const void *) = delete
142
143
155
#define elxout ::xl::xout["standard"]
156
157
/********************************************************************************
158
* *
159
* Dll export *
160
* *
161
********************************************************************************/
162
163
#if (defined(_WIN32) || defined(WIN32))
164
# define ELASTIXLIB_API
165
#else
166
# if (__GNUC__ >= 4 || defined(__clang__))
167
# define ELASTIXLIB_API __attribute__((visibility("default")))
168
# else
169
# define ELASTIXLIB_API
170
# endif
171
#endif
172
173
#endif
// end #ifndef elxMacro_h
Generated on 2024-07-17 for elastix by
1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d)