From 29bdd1e88a28b6267618f633f304e1154537ce7b Mon Sep 17 00:00:00 2001 From: malaterre Date: Thu, 2 Oct 2003 11:26:15 +0000 Subject: [PATCH] src/*.cxx removed pragma thingies to src/gdcmCommon.h Two reasons: - clear things - third parties access gdcm through header files, so won't suffer anymore VC++ complains --- ChangeLog | 6 ++++++ src/gdcmCommon.h | 12 ++++++++++++ src/gdcmDict.cxx | 12 +----------- src/gdcmDict.h | 2 +- src/gdcmDictEntry.cxx | 11 +---------- src/gdcmDictSet.cxx | 15 ++------------- src/gdcmDictSet.h | 2 +- src/gdcmElValSet.cxx | 11 +---------- src/gdcmElValSet.h | 7 ++++--- src/gdcmException.cxx | 10 ---------- src/gdcmException.h | 2 +- src/gdcmFile.cxx | 12 ------------ src/gdcmHeader.cxx | 15 ++------------- src/gdcmHeader.h | 4 ++-- src/gdcmHeaderHelper.cxx | 14 ++------------ src/gdcmHeaderIdo.cxx | 10 ---------- src/gdcmIdo.h | 2 +- src/gdcmJpeg.cxx | 9 --------- src/gdcmJpeg12.cxx | 9 --------- src/gdcmJpeg2000.cxx | 10 ---------- src/gdcmRLE.cxx | 9 --------- src/gdcmTS.cxx | 10 ---------- src/gdcmTS.h | 2 +- src/gdcmUtil.cxx | 13 ++----------- src/gdcmUtil.h | 8 ++++---- src/gdcmVR.cxx | 10 ---------- src/gdcmVR.h | 2 +- 27 files changed, 45 insertions(+), 184 deletions(-) diff --git a/ChangeLog b/ChangeLog index f845d025..e0734ce2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-10-02 Mathieu Malaterre + * src/*.cxx removed pragma thingies to src/gdcmCommon.h + Two reasons: - clear things + - third parties acces gdcm through header files, so won't + suffer anymore VC++ complains + 2003-09-22 Benoit Regrain * src/gdcmUtil.[cxx|h] : change the _CreateCleanString return value from char* to std::string. Thus, the use of strdup becoomes useless. (see diff --git a/src/gdcmCommon.h b/src/gdcmCommon.h index b3300d90..cc80d9e9 100644 --- a/src/gdcmCommon.h +++ b/src/gdcmCommon.h @@ -3,6 +3,18 @@ #ifndef GDCMCOMMON_H #define GDCMCOMMON_H +//This is needed when compiling in debug mode +#ifdef _MSC_VER +// 'identifier' : class 'type' needs to have dll-interface to be used by +// clients of class 'type2' +#pragma warning ( disable : 4251 ) +// 'identifier' : identifier was truncated to 'number' characters in the +// debug information +#pragma warning ( disable : 4786 ) +//'identifier' : decorated name length exceeded, name was truncated +#pragma warning ( disable : 4503 ) +#endif //_MSC_VER + #ifdef __GNUC__ #include #define guint16 uint16_t diff --git a/src/gdcmDict.cxx b/src/gdcmDict.cxx index ad8945f5..3acd3fc3 100644 --- a/src/gdcmDict.cxx +++ b/src/gdcmDict.cxx @@ -1,18 +1,8 @@ // gdcmDict.cxx -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER - -#include #include "gdcmDict.h" #include "gdcmUtil.h" +#include /** * \ingroup gdcmDict diff --git a/src/gdcmDict.h b/src/gdcmDict.h index 37d0076e..db6f0e04 100644 --- a/src/gdcmDict.h +++ b/src/gdcmDict.h @@ -3,9 +3,9 @@ #ifndef GDCMDICT_H #define GDCMDICT_H -#include #include "gdcmCommon.h" #include "gdcmDictEntry.h" +#include typedef std::map TagKeyHT; typedef std::map TagNameHT; diff --git a/src/gdcmDictEntry.cxx b/src/gdcmDictEntry.cxx index 1e135cb6..763dc3b0 100644 --- a/src/gdcmDictEntry.cxx +++ b/src/gdcmDictEntry.cxx @@ -1,17 +1,8 @@ // gdcmDictEntry.cxx -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER +#include "gdcmDictEntry.h" #include // FIXME For sprintf -#include "gdcmDictEntry.h" #include "gdcmUtil.h" diff --git a/src/gdcmDictSet.cxx b/src/gdcmDictSet.cxx index 3306b73d..99b89020 100644 --- a/src/gdcmDictSet.cxx +++ b/src/gdcmDictSet.cxx @@ -1,20 +1,9 @@ // gdcmDictEntry -#ifdef _MSC_VER -//'identifier' : decorated name length exceeded, name was truncated -//#pragma warning ( disable : 4503 ) -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER - +#include "gdcmDictSet.h" +#include "gdcmUtil.h" #include #include // For getenv -#include "gdcmUtil.h" -#include "gdcmDictSet.h" #define PUB_DICT_NAME "DicomV3Dict" #ifndef PUB_DICT_PATH diff --git a/src/gdcmDictSet.h b/src/gdcmDictSet.h index f71a1eb8..4256ad8e 100644 --- a/src/gdcmDictSet.h +++ b/src/gdcmDictSet.h @@ -3,9 +3,9 @@ #ifndef GDCMDICTSET_H #define GDCMDICTSET_H +#include "gdcmDict.h" #include #include -#include "gdcmDict.h" typedef std::string DictKey; typedef std::map DictSetHT; diff --git a/src/gdcmElValSet.cxx b/src/gdcmElValSet.cxx index 7f877388..a2781df6 100644 --- a/src/gdcmElValSet.cxx +++ b/src/gdcmElValSet.cxx @@ -1,18 +1,9 @@ // gdcmElValSet.cxx -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER - -#include #include "gdcmUtil.h" #include "gdcmElValSet.h" #include "gdcmTS.h" +#include gdcmElValSet::~gdcmElValSet() { for (TagElValueHT::iterator tag = tagHt.begin(); tag != tagHt.end(); ++tag) { diff --git a/src/gdcmElValSet.h b/src/gdcmElValSet.h index 08490cfd..fe97e3c8 100644 --- a/src/gdcmElValSet.h +++ b/src/gdcmElValSet.h @@ -1,13 +1,14 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.16 2003/07/23 08:43:03 jpr Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmElValSet.h,v 1.17 2003/10/02 11:26:15 malaterre Exp $ #ifndef GDCMELVALSET_H #define GDCMELVALSET_H -#include // FIXME For FILE on GCC only -#include #include "gdcmCommon.h" #include "gdcmElValue.h" +#include // FIXME For FILE on GCC only +#include + //////////////////////////////////////////////////////////////////////////// // Container for a set of successfully parsed ElValues. diff --git a/src/gdcmException.cxx b/src/gdcmException.cxx index ef908db9..d2d3d7cd 100644 --- a/src/gdcmException.cxx +++ b/src/gdcmException.cxx @@ -1,13 +1,3 @@ -#ifdef _MSC_VER -//'identifier' : not all control paths return a value -//#pragma warning ( disable : 4715 ) -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER #include "gdcmException.h" diff --git a/src/gdcmException.h b/src/gdcmException.h index 03d74fb9..fee65d6c 100644 --- a/src/gdcmException.h +++ b/src/gdcmException.h @@ -1,10 +1,10 @@ #ifndef GDCM_EXCEPTION_H #define GDCM_EXCEPTION_H +#include "gdcmCommon.h" #include #include #include -#include "gdcmCommon.h" /** * Any exception thrown in the gdcm library diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index 475ec04e..678a5494 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -1,17 +1,5 @@ // gdcmFile.cxx -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'type' : forcing value to bool 'true' or 'false' (performance warning) -//#pragma warning ( disable : 4800 ) -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER - #include "gdcmFile.h" #include "gdcmUtil.h" #include "iddcmjpeg.h" // for the 'LibIDO' Jpeg LossLess diff --git a/src/gdcmHeader.cxx b/src/gdcmHeader.cxx index 1dc78fa7..7a6c7bd4 100644 --- a/src/gdcmHeader.cxx +++ b/src/gdcmHeader.cxx @@ -1,16 +1,6 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.91 2003/09/24 16:46:38 jpr Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.cxx,v 1.92 2003/10/02 11:26:15 malaterre Exp $ -//This is needed when compiling in debug mode -#ifdef _MSC_VER -//'identifier' : not all control paths return a value -//#pragma warning ( disable : 4715 ) -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER +#include "gdcmHeader.h" #include #include @@ -23,7 +13,6 @@ #include // for isalpha #include #include "gdcmUtil.h" -#include "gdcmHeader.h" #include "gdcmTS.h" // Refer to gdcmHeader::CheckSwap() diff --git a/src/gdcmHeader.h b/src/gdcmHeader.h index a5a21fb0..e377f90a 100644 --- a/src/gdcmHeader.h +++ b/src/gdcmHeader.h @@ -1,9 +1,8 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.h,v 1.38 2003/09/18 09:32:15 regrain Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmHeader.h,v 1.39 2003/10/02 11:26:16 malaterre Exp $ #ifndef GDCMHEADER_H #define GDCMHEADER_H -#include #include "gdcmCommon.h" #include "gdcmVR.h" #include "gdcmTS.h" @@ -11,6 +10,7 @@ #include "gdcmDictSet.h" #include "gdcmElValue.h" #include "gdcmElValSet.h" +#include typedef std::string VRKey; typedef std::string VRAtr; diff --git a/src/gdcmHeaderHelper.cxx b/src/gdcmHeaderHelper.cxx index 02690541..35088039 100644 --- a/src/gdcmHeaderHelper.cxx +++ b/src/gdcmHeaderHelper.cxx @@ -1,17 +1,7 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmHeaderHelper.cxx,v 1.8 2003/09/24 16:46:38 jpr Exp $ - -//This is needed when compiling in debug mode -#ifdef _MSC_VER -#pragma warning ( disable : 4800 ) -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER +// $Header: /cvs/public/gdcm/src/Attic/gdcmHeaderHelper.cxx,v 1.9 2003/10/02 11:26:16 malaterre Exp $ #include "gdcmHeaderHelper.h" + #include "gdcmUtil.h" //for debug #include #include diff --git a/src/gdcmHeaderIdo.cxx b/src/gdcmHeaderIdo.cxx index 4c75ba78..91a9aecf 100644 --- a/src/gdcmHeaderIdo.cxx +++ b/src/gdcmHeaderIdo.cxx @@ -1,15 +1,5 @@ // gdcmHeaderIdo.cxx -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER - #include "gdcmIdo.h" #include "gdcmUtil.h" diff --git a/src/gdcmIdo.h b/src/gdcmIdo.h index 61796397..5884baea 100644 --- a/src/gdcmIdo.h +++ b/src/gdcmIdo.h @@ -1,6 +1,6 @@ // gdcmIdo.h -#include "gdcm.h" +#include "gdcmHeader.h" class gdcmHeaderIdo: protected gdcmHeader { private: diff --git a/src/gdcmJpeg.cxx b/src/gdcmJpeg.cxx index 01416f35..4b614640 100644 --- a/src/gdcmJpeg.cxx +++ b/src/gdcmJpeg.cxx @@ -1,12 +1,3 @@ -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER #include #include "gdcmFile.h" diff --git a/src/gdcmJpeg12.cxx b/src/gdcmJpeg12.cxx index 4b1cff5d..1d21f4b2 100644 --- a/src/gdcmJpeg12.cxx +++ b/src/gdcmJpeg12.cxx @@ -1,12 +1,3 @@ -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER #include #include "gdcmFile.h" diff --git a/src/gdcmJpeg2000.cxx b/src/gdcmJpeg2000.cxx index 29393004..d8505c26 100644 --- a/src/gdcmJpeg2000.cxx +++ b/src/gdcmJpeg2000.cxx @@ -1,13 +1,3 @@ -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER - /* -------------------------------------------------------------------- */ // diff --git a/src/gdcmRLE.cxx b/src/gdcmRLE.cxx index 7bdcee60..ae9149c3 100644 --- a/src/gdcmRLE.cxx +++ b/src/gdcmRLE.cxx @@ -1,12 +1,3 @@ -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER #include #include "gdcmFile.h" diff --git a/src/gdcmTS.cxx b/src/gdcmTS.cxx index 8ed38d0b..33f49501 100644 --- a/src/gdcmTS.cxx +++ b/src/gdcmTS.cxx @@ -1,15 +1,5 @@ // gdcmTS.cxx -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER - #include #include "gdcmTS.h" diff --git a/src/gdcmTS.h b/src/gdcmTS.h index 14d4909c..6380c07c 100644 --- a/src/gdcmTS.h +++ b/src/gdcmTS.h @@ -3,9 +3,9 @@ #ifndef GDCMTS_H #define GDCMTS_H +#include "gdcmCommon.h" #include #include -#include "gdcmCommon.h" typedef std::string TSKey; typedef std::string TSAtr; diff --git a/src/gdcmUtil.cxx b/src/gdcmUtil.cxx index 90e945b2..729d400e 100644 --- a/src/gdcmUtil.cxx +++ b/src/gdcmUtil.cxx @@ -1,19 +1,10 @@ -// $Header: /cvs/public/gdcm/src/gdcmUtil.cxx,v 1.24 2003/09/24 13:29:49 jpr Exp $ +// $Header: /cvs/public/gdcm/src/gdcmUtil.cxx,v 1.25 2003/10/02 11:26:16 malaterre Exp $ -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER +#include "gdcmUtil.h" #include #include // For isspace #include -#include "gdcmUtil.h" // Library globals. gdcmDebug dbg; diff --git a/src/gdcmUtil.h b/src/gdcmUtil.h index b96faa3c..2566e82f 100644 --- a/src/gdcmUtil.h +++ b/src/gdcmUtil.h @@ -1,14 +1,14 @@ -// $Header: /cvs/public/gdcm/src/gdcmUtil.h,v 1.15 2003/09/22 08:28:43 regrain Exp $ +// $Header: /cvs/public/gdcm/src/gdcmUtil.h,v 1.16 2003/10/02 11:26:16 malaterre Exp $ #ifndef GDCMUTIL_H #define GDCMUTIL_H -#include -#include -#include #include "gdcmVR.h" #include "gdcmTS.h" #include "gdcmDictSet.h" +#include +#include +#include class gdcmDebug { private: diff --git a/src/gdcmVR.cxx b/src/gdcmVR.cxx index 64d708e3..c20aa4a2 100644 --- a/src/gdcmVR.cxx +++ b/src/gdcmVR.cxx @@ -1,15 +1,5 @@ // gdcmVR.cxx -//This is needed when compiling in debug mode -#ifdef _MSC_VER -// 'identifier' : class 'type' needs to have dll-interface to be used by -// clients of class 'type2' -#pragma warning ( disable : 4251 ) -// 'identifier' : identifier was truncated to 'number' characters in the -// debug information -#pragma warning ( disable : 4786 ) -#endif //_MSC_VER - #include "gdcmVR.h" gdcmVR::gdcmVR(void) { diff --git a/src/gdcmVR.h b/src/gdcmVR.h index 68d7fee3..9301e24a 100644 --- a/src/gdcmVR.h +++ b/src/gdcmVR.h @@ -3,9 +3,9 @@ #ifndef GDCMVR_H #define GDCMVR_H +#include "gdcmCommon.h" #include #include -#include "gdcmCommon.h" typedef std::string VRKey; typedef std::string VRAtr; -- 2.45.2