X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmGlobal.cxx;h=704bc3f88222518307bdf5cf043ba9808a832378;hb=8ba6105c39056bba295025f4b46d2cdf24dab792;hp=5f455db33ddda99807ab2e6aaffe07ffa473b0fe;hpb=d1c68c2c2ae9fadf927053150f7fbc625a7c7366;p=gdcm.git diff --git a/src/gdcmGlobal.cxx b/src/gdcmGlobal.cxx index 5f455db3..704bc3f8 100644 --- a/src/gdcmGlobal.cxx +++ b/src/gdcmGlobal.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmGlobal.cxx,v $ Language: C++ - Date: $Date: 2005/02/01 10:29:55 $ - Version: $Revision: 1.17 $ + Date: $Date: 2005/06/06 12:37:58 $ + Version: $Revision: 1.24 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,18 +21,20 @@ #include "gdcmDebug.h" #include "gdcmVR.h" #include "gdcmTS.h" +#include "gdcmDictGroupName.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 initialization is done in a cxx file (avoid -// duplicated symbol), and an extern is used in gdcmCommon.h +/// \brief Those global string that are returned 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 initialization 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"; @@ -40,10 +42,11 @@ const std::string GDCM_NOTLOADED = "gdcm::NotLoaded"; const std::string GDCM_UNREAD = "gdcm::UnRead"; //----------------------------------------------------------------------------- -DictSet *Global::Dicts = (DictSet *)0; -VR *Global::ValRes = (VR *)0; -TS *Global::TranSyn = (TS *)0; -DicomDirElement *Global::ddElem = (DicomDirElement *)0; +DictSet *Global::Dicts = (DictSet *)0; +VR *Global::ValRes = (VR *)0; +TS *Global::TranSyn = (TS *)0; +DictGroupName *Global::GroupName = (DictGroupName *)0; +DicomDirElement *Global::ddElem = (DicomDirElement *)0; //----------------------------------------------------------------------------- /** @@ -60,13 +63,14 @@ Global::Global() { if (ValRes || TranSyn || Dicts || ddElem) { - gdcmVerboseMacro( "VR or TS or Dicts already allocated"); + gdcmWarningMacro( "VR or TS or Dicts already allocated"); return; } - Dicts = new DictSet(); - ValRes = new VR(); - TranSyn = new TS(); - ddElem = new DicomDirElement(); + Dicts = new DictSet(); + ValRes = new VR(); + TranSyn = new TS(); + GroupName = new DictGroupName(); + ddElem = new DicomDirElement(); } /** @@ -77,11 +81,20 @@ Global::~Global() delete Dicts; delete ValRes; delete TranSyn; + delete GroupName; delete ddElem; } //----------------------------------------------------------------------------- // Public +/** + * \brief returns a pointer to Dictionaries Table + */ +DictSet *Global::GetDicts() +{ + return Dicts; +} + /** * \brief returns a pointer to the 'Value Representation Table' */ @@ -89,6 +102,7 @@ VR *Global::GetVR() { return ValRes; } + /** * \brief returns a pointer to the 'Transfer Syntax Table' */ @@ -96,13 +110,15 @@ TS *Global::GetTS() { return TranSyn; } + /** - * \brief returns a pointer to Dictionaries Table + * \brief returns a pointer to the Group name correspondance table */ -DictSet *Global::GetDicts() +DictGroupName *Global::GetDictGroupName() { - return Dicts; + return GroupName; } + /** * \brief returns a pointer to the DicomDir related elements Table */