X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmGlobal.cxx;h=4120c2a60b996730a2a5a321e69b4d732c517e36;hb=31c63a6cb25b49a119e0132201c051ade2e17704;hp=d875390a31a8c121edd37b003aaba4f5981e43e3;hpb=1d69b92978803204089d270599133917d944c651;p=gdcm.git diff --git a/src/gdcmGlobal.cxx b/src/gdcmGlobal.cxx index d875390a..4120c2a6 100644 --- a/src/gdcmGlobal.cxx +++ b/src/gdcmGlobal.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmGlobal.cxx,v $ Language: C++ - Date: $Date: 2004/10/12 04:35:46 $ - Version: $Revision: 1.5 $ + Date: $Date: 2005/01/11 11:37:14 $ + Version: $Revision: 1.14 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -17,10 +17,26 @@ =========================================================================*/ #include "gdcmGlobal.h" + #include "gdcmDebug.h" +#include "gdcmVR.h" +#include "gdcmTS.h" +#include "gdcmDictSet.h" +#include "gdcmDicomDirElement.h" namespace gdcm { +// Those global string that are return by reference everywhere in gdcm code +// used to be in gdcmCommon.h but due to a 'bug' in gcc/MacOSX +// you cannot have static initialization in a multithreaded environment +// since there is a lazy construction everything got skrew up somehow +// Therefore the actual initiliazation is done in a cxx file (avoid +// duplicated symbol), and an extern is used in gdcmCommon.h +const std::string GDCM_UNKNOWN = "gdcm::Unknown"; +const std::string GDCM_UNFOUND = "gdcm::Unfound"; +const std::string GDCM_BINLOADED = "gdcm::Binary data loaded"; +const std::string GDCM_NOTLOADED = "gdcm::NotLoaded"; +const std::string GDCM_UNREAD = "gdcm::UnRead"; /** * \ingroup Globals @@ -62,7 +78,8 @@ Global::Global() { if (ValRes || TranSyn || Dicts || ddElem) { - dbg.Verbose(0, "Global::Global : VR or TS or Dicts already allocated"); + gdcmVerboseMacro( "VR or TS or Dicts already allocated"); + return; } Dicts = new DictSet(); ValRes = new VR(); @@ -91,7 +108,7 @@ VR *Global::GetVR() } /** * \ingroup Global - * \brief returns a pointer to the 'Transfert Syntax Table' + * \brief returns a pointer to the 'Transfer Syntax Table' */ TS *Global::GetTS() {