]> Creatis software - gdcm.git/blob - src/gdcmCommon.h
* ENH: Update CMake stuff for accessing gdcm from CMake (4 third party lib)
[gdcm.git] / src / gdcmCommon.h
1 //gdcmCommon.h
2
3 #ifndef GDCMCOMMON_H
4 #define GDCMCOMMON_H
5
6 //This is needed when compiling in debug mode
7 #ifdef _MSC_VER
8 // 'identifier' : class 'type' needs to have dll-interface to be used by
9 // clients of class 'type2'
10 #pragma warning ( disable : 4251 )
11 // 'identifier' : identifier was truncated to 'number' characters in the
12 // debug information
13 #pragma warning ( disable : 4786 )
14 //'identifier' : decorated name length exceeded, name was truncated
15 #pragma warning ( disable : 4503 )
16 // C++ exception specification ignored except to indicate a 
17 // function is not __declspec(nothrow)
18 #pragma warning ( disable : 4290 )
19 // signed/unsigned mismatch
20 #pragma warning ( disable : 4018 )
21 // return type for 'identifier' is '' (ie; not a UDT or reference to UDT. Will
22 // produce errors if applied using infix notation
23 #pragma warning ( disable : 4284 )
24 #endif //_MSC_VER
25
26 #ifdef __GNUC__
27 #ifndef HAVE_NO_STDINT_H
28 #include <stdint.h>
29 #define guint16 uint16_t
30 #define guint32 uint32_t
31 #define gint16  int16_t
32 #define gint32  int32_t
33 #else
34 typedef  unsigned short guint16;
35 typedef  unsigned int   guint32;
36 typedef  short          gint16;
37 typedef  int            gint32;
38 #define UINT32_MAX    (4294967295U)
39 #endif //HAVE_NO_STDINT_H
40 #endif
41
42 #ifdef _MSC_VER 
43 typedef  unsigned short guint16;
44 typedef  unsigned int   guint32;
45 typedef  short          gint16;
46 typedef  int            gint32;
47 #define UINT32_MAX    (4294967295U)
48 #endif
49
50 #ifdef _MSC_VER
51 #define GDCM_EXPORT __declspec( dllexport )
52 #else
53 #define GDCM_EXPORT
54 #endif
55
56 #include <string>
57
58 const std::string GDCM_UNFOUND = "gdcm::Unfound";
59
60 typedef std::string TagKey;
61 typedef std::string TagName;
62
63 enum FileType {
64       Unknown = 0,
65       ExplicitVR,
66       ImplicitVR,
67       ACR,
68       ACR_LIBIDO
69 };
70
71 //For now gdcm is not willing cmake, try to be more quiet
72 //#cmakedefine GDCM_NO_ANSI_STRING_STREAM
73
74
75 #endif