00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _GDCMMACRO_H_
00020 #define _GDCMMACRO_H_
00021
00022
00023 #define gdcmTypeMacro(type) \
00024 private : \
00025 type(type &); \
00026 type &operator=(type &)
00027
00028 #define gdcmNewMacro(type) \
00029 public : \
00030 static type *New() {return new type(); }
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #if defined(GDCM_LEGACY_REMOVE)
00044
00045 # define GDCM_LEGACY(method)
00046 #elif defined(GDCM_LEGACY_SILENT)
00047
00048 # define GDCM_LEGACY(method) method;
00049 #else
00050
00051
00052 # if defined(__GNUC__) && !defined(__INTEL_COMPILER) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
00053 #if defined(__APPLE__) && (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)
00054
00055
00056 # define GDCM_LEGACY(method) method;
00057 #else
00058 # define GDCM_LEGACY(method) method __attribute__((deprecated));
00059 #endif
00060 # elif defined(_MSC_VER) && _MSC_VER >= 1300
00061 # define GDCM_LEGACY(method) __declspec(deprecated) method;
00062 # else
00063 # define GDCM_LEGACY(method) method;
00064 # endif
00065 #endif
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 #if defined(GDCM_LEGACY_REMOVE) || defined(GDCM_LEGACY_SILENT)
00081 # define GDCM_LEGACY_BODY(method, version)
00082 # define GDCM_LEGACY_REPLACED_BODY(method, version, replace)
00083 #else
00084 # define GDCM_LEGACY_BODY(method, version) \
00085 gdcmWarningMacro(#method " was deprecated for gdcm" #version " and will be removed in a future version.")
00086 # define GDCM_LEGACY_REPLACED_BODY(method, version, replace) \
00087 gdcmWarningMacro(#method " was deprecated for gdcm" #version " and will be removed in a future version. Use " #replace " instead.")
00088 #endif
00089
00090
00091 #endif