My Project
defines.hh
Go to the documentation of this file.
1/* -*- mia-c++ -*-
2 *
3 * This file is part of MIA - a toolbox for medical image analysis
4 * Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
5 *
6 * MIA is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with MIA; if not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
27#ifndef mia_core_defines_hh
28#define mia_core_defines_hh
29
31
33#define NS_MIA_BEGIN namespace mia {
34
36#define NS_MIA_END }
37
39#define NS_MIA_USE using namespace mia;
40
42#define NS_BEGIN(NS) namespace NS {
43
45#define NS_END }
46
48#define NS_USE(NS) using namespace NS
49
50
51/*
52
53 The mia namespace is the general namespace of this library.
54 Currently, only plug-ins have additional namespace to avoid name clashes
55 between dynamically loaded modules that might have been developed outside
56 this source package.
57*/
59
60
74
80
82
84#define MIA_MODULE_SUFFIX "mia"
85
86#ifndef __GNUC__
87// remove the __attribute__ syntax if the compiler is not GCC compatible
88# define __attribute__(x)
89# define MIA_PARAM_UNUSED(x) x
90#endif
91
92#ifndef MIA_PARAM_UNUSED
93#define MIA_PARAM_UNUSED(x) x __attribute__((unused))
94#endif
95
96#ifdef miacore_EXPORTS
98# define EXPORT_CORE DO_EXPORT
99#else
101# define EXPORT_CORE DO_IMPORT
102#endif
103
105#define EXPORT DO_EXPORT
106
107#ifdef WIN32
108#ifdef _DEBUG
109#define _CRTDBG_MAP_ALLOC
110#include <stdlib.h>
111#include <crtdbg.h>
112#endif
113
114#ifdef _MSC_VER
115#pragma warning(disable: 4251) // class needs to have dll interface to be used ...
116#pragma warning(disable: 4231) // nonstandard extension used "extern" before explicit template instanciation
117#pragma warning(disable: 4275) // non-dll class used as base
118#pragma warning(disable: 4244) // warning about int->float conversion
119#pragma warning(disable: 4305) // truncation from double to float
120#pragma warning(disable: 4800) // performance warning about forcing value to true or false
121#endif
122#endif
123
124#ifdef miacore_EXPORTS
125# ifdef VSTREAM
126# undef VSTREAM
127# endif
128# define VSTREAM "MIA-CORE"
129#endif
130
132
133EXPORT_CORE extern char const *get_revision();
134
136
137#endif
138
EXPORT_CORE char const * get_revision()
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition defines.hh:101
EInterpolationFactory
Enumerate for the types of possible interpolator factories.
Definition defines.hh:76
@ ipf_spline
Definition defines.hh:77
@ ipf_unknown
Definition defines.hh:78
EInterpolation
some constants for interpoation types
Definition defines.hh:62
@ ip_bspline3
Definition defines.hh:68
@ ip_bspline5
Definition defines.hh:70
@ ip_bspline4
Definition defines.hh:69
@ ip_bspline2
Definition defines.hh:67
@ ip_bspline1
Definition defines.hh:66
@ ip_omoms3
Definition defines.hh:71
@ ip_nn
Definition defines.hh:63
@ ip_unknown
Definition defines.hh:72
@ ip_bspline0
Definition defines.hh:65
@ ip_linear
Definition defines.hh:64
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36