MeVisLab Toolbox Reference
mlMacros.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2009, MeVis Medical Solutions AG
4
**
5
** The user may use this file in accordance with the license agreement provided with
6
** the Software or, alternatively, in accordance with the terms contained in a
7
** written agreement between the user and MeVis Medical Solutions AG.
8
**
9
** For further information use the contact form at https://www.mevislab.de/contact
10
**
11
**************************************************************************************/
12
13
#ifndef ML_MACROS_H
14
#define ML_MACROS_H
15
16
#include "MeVisLabVersion.h"
17
19
23
#define ML_DISALLOW_COPY_AND_ASSIGN(className) \
24
private: \
25
className(const className&) = delete; \
26
className& operator=(const className &) = delete;
27
28
#if ML_DEPRECATED_SINCE(3, 5, 0)
29
30
#ifndef ML_DEPRECATED_WARNINGS
31
#define ML_NO_DEPRECATED_WARNINGS
32
#endif
33
34
#ifdef ML_DISABLE_CPP
35
36
#ifdef UNIX
37
#define ML_DECL_DEPRECATED __attribute__ ((__deprecated__))
38
#elif defined(WIN32)
39
#define ML_DECL_DEPRECATED __declspec(deprecated("This ML function/class has been deprecated."
))
40
#else
41
#define ML_DECL_DEPRECATED
42
#endif
43
44
#else
45
46
#define ML_DECL_DEPRECATED [[deprecated("This ML function/class has been deprecated."
)]]
47
48
#endif
49
50
// If the deprecated API is turned on, defining ML_NO_DEPRECATED_WARNINGS turns compile-time usage warnings off.
51
#ifndef ML_NO_DEPRECATED_WARNINGS
52
#define ML_DEPRECATED_CONSTRUCTOR ML_DECL_DEPRECATED
53
#define ML_DEPRECATED ML_DECL_DEPRECATED
54
#else
55
#define ML_DEPRECATED_CONSTRUCTOR
56
#define ML_DEPRECATED
57
#endif
58
59
#endif
60
65
#define ML_FRIEND_TEST(test_case_name, test_name) \
66
friend class test_case_name##_##test_name##_Test
67
68
74
#if defined(WIN32)
76
#define ML_UNIX_ONLY_EXPORT(A)
77
#else
79
#define ML_UNIX_ONLY_EXPORT(A) A
80
#endif
81
82
86
#ifdef WIN32
87
#define ML_FORCE_INLINE __forceinline
88
#else
89
#define ML_FORCE_INLINE inline
90
#endif
91
92
93
#endif
94
95
MeVis
Foundation
Sources
MLUtilities
mlMacros.h
Generated by
1.9.1