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