Go to the documentation of this file.
32#if defined _WIN32 || defined __CYGWIN__
34# define SITK_ABI_EXPORT __attribute__((dllexport))
35# define SITK_ABI_IMPORT __attribute__((dllimport))
36# define SITK_ABI_HIDDEN
38# define SITK_ABI_EXPORT __declspec(dllexport)
39# define SITK_ABI_IMPORT __declspec(dllimport)
40# define SITK_ABI_HIDDEN
44# define SITK_ABI_EXPORT __attribute__((visibility("default")))
45# define SITK_ABI_IMPORT __attribute__((visibility("default")))
46# define SITK_ABI_HIDDEN __attribute__((visibility("hidden")))
48# define SITK_ABI_EXPORT
49# define SITK_ABI_IMPORT
50# define SITK_ABI_HIDDEN
54#if defined(SITK_HAS_TEMPLATE_DISAMBIGUATOR_DEPENDENT_NAME)
55# define CLANG_TEMPLATE template
57# define CLANG_TEMPLATE
63class GenericException;
65#define sitkExceptionMacro(x) \
67 std::ostringstream message; \
68 message << "sitk::ERROR: " x; \
69 throw ::itk::simple::GenericException(__FILE__, __LINE__, message.str().c_str()); \
72#define sitkWarningMacro(x) \
74 std::ostringstream msg; \
75 msg << this->GetName() << " (" << this << "): " x; \
76 itk::OutputWindowDisplayWarningText(msg.str().c_str()); \
80#define sitkDebugMacro(x) \
82 if (this->GetDebug()) \
84 std::ostringstream msg; \
85 msg << "Debug: " << this->GetName() << " (" << this << "): " x << "\n\n"; \
86 ::itk::OutputWindowDisplayDebugText(msg.str().c_str()); \
90#define sitkMacroJoin(X, Y) sitkDoMacroJoin(X, Y)
91#define sitkDoMacroJoin(X, Y) sitkDoMacroJoin2(X, Y)
92#define sitkDoMacroJoin2(X, Y) X##Y
96#define sitkPragma(x) _Pragma(#x)
98#if defined(__clang__) && defined(__has_warning)
99# define sitkClangDiagnosticPush() sitkPragma(clang diagnostic push)
100# define sitkClangDiagnosticPop() sitkPragma(clang diagnostic pop)
101# define sitkClangWarningIgnore_0(x)
102# define sitkClangWarningIgnore_1(x) sitkPragma(clang diagnostic ignored x)
103# define sitkClangWarningIgnore(x) sitkMacroJoin(sitkClangWarningIgnore_, __has_warning(x))(x)
105# define sitkClangDiagnosticPush()
106# define sitkClangDiagnosticPop()
107# define sitkClangWarningIgnore(x)