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