X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmGlobal.cxx;h=79e3962cf7cdb1bbed40baaf52401874ead0f49e;hb=9d913797d3bf5a18625f4d8d8b42c8f5c8c10d99;hp=f6278f622705beef9b621e6a7958d48601fdfc06;hpb=2012716d624d631dcdb825fdd4470908e115a717;p=gdcm.git diff --git a/src/gdcmGlobal.cxx b/src/gdcmGlobal.cxx index f6278f62..79e3962c 100644 --- a/src/gdcmGlobal.cxx +++ b/src/gdcmGlobal.cxx @@ -3,12 +3,12 @@ Program: gdcm Module: $RCSfile: gdcmGlobal.cxx,v $ Language: C++ - Date: $Date: 2004/06/20 18:08:47 $ - Version: $Revision: 1.2 $ + Date: $Date: 2005/01/07 19:20:38 $ + Version: $Revision: 1.9 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or - http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details. + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR @@ -17,91 +17,106 @@ =========================================================================*/ #include "gdcmGlobal.h" + #include "gdcmDebug.h" -#include -#include // For isspace -#include // CLEANME: could this be only string ? Related to Win32 ? +#include "gdcmVR.h" +#include "gdcmTS.h" +#include "gdcmDictSet.h" +#include "gdcmDicomDirElement.h" + +namespace gdcm +{ /** * \ingroup Globals * \brief Pointer to a container, holding _all_ the Dicom Dictionaries. */ -gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0; +DictSet *Global::Dicts = (DictSet *)0; /** * \ingroup Globals * \brief Pointer to a hash table containing the 'Value Representations'. */ -gdcmVR *gdcmGlobal::VR = (gdcmVR *)0; +VR *Global::ValRes = (VR *)0; /** * \ingroup Globals * \brief Pointer to a hash table containing the Transfer Syntax codes * and their english description */ -gdcmTS *gdcmGlobal::TS = (gdcmTS *)0; +TS *Global::TranSyn = (TS *)0; /** * \ingroup Globals * \brief Pointer to the hash table containing the Dicom Elements * necessary to describe each part of a DICOMDIR */ -gdcmDicomDirElement *gdcmGlobal::ddElem = (gdcmDicomDirElement *)0; +DicomDirElement *Global::ddElem = (DicomDirElement *)0; /** * \ingroup Globals * \brief Global container */ -gdcmGlobal gdcmGlob; +Global Glob; /** - * \ingroup gdcmGlobal + * \ingroup Global * \brief constructor : populates the various H Tables */ -gdcmGlobal::gdcmGlobal(void) { - if (VR || TS || Dicts || ddElem) - dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated"); - Dicts = new gdcmDictSet(); - VR = new gdcmVR(); - TS = new gdcmTS(); - ddElem = new gdcmDicomDirElement(); +Global::Global() +{ + if (ValRes || TranSyn || Dicts || ddElem) + { + gdcmVerboseMacro("Global::Global : VR or TS or Dicts already allocated"); + return; + } + Dicts = new DictSet(); + ValRes = new VR(); + TranSyn = new TS(); + ddElem = new DicomDirElement(); } /** - * \ingroup gdcmGlobal + * \ingroup Global * \brief canonical destructor */ -gdcmGlobal::~gdcmGlobal() { +Global::~Global() +{ delete Dicts; - delete VR; - delete TS; + delete ValRes; + delete TranSyn; delete ddElem; } /** - * \ingroup gdcmGlobal + * \ingroup Global * \brief returns a pointer to the 'Value Representation Table' */ -gdcmVR *gdcmGlobal::GetVR(void) { - return VR; +VR *Global::GetVR() +{ + return ValRes; } /** - * \ingroup gdcmGlobal + * \ingroup Global * \brief returns a pointer to the 'Transfert Syntax Table' */ -gdcmTS *gdcmGlobal::GetTS(void) { - return TS; +TS *Global::GetTS() +{ + return TranSyn; } /** - * \ingroup gdcmGlobal + * \ingroup Global * \brief returns a pointer to Dictionaries Table */ -gdcmDictSet *gdcmGlobal::GetDicts(void) { +DictSet *Global::GetDicts() +{ return Dicts; } /** - * \ingroup gdcmGlobal + * \ingroup Global * \brief returns a pointer to the DicomDir related elements Table */ -gdcmDicomDirElement *gdcmGlobal::GetDicomDirElements(void) { +DicomDirElement *Global::GetDicomDirElements() +{ return ddElem; } +} // end namespace gdcm