X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmGlobal.cxx;h=0e737e4475755d622f4e759b0ed0fbef4ce26067;hb=4e65268c21f5f159b5da7cf82a9b3ced64a3d374;hp=8df156b59d369ce511207d72463ab45a0bd4435a;hpb=ba78e6c6d47d6db1528e8e88e5ebde7296a26692;p=gdcm.git diff --git a/src/gdcmGlobal.cxx b/src/gdcmGlobal.cxx index 8df156b5..0e737e44 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/12/03 20:16:58 $ - Version: $Revision: 1.7 $ + Date: $Date: 2005/02/05 01:37:08 $ + Version: $Revision: 1.19 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -26,48 +26,41 @@ 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 +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 - * \brief Pointer to a container, holding _all_ the Dicom Dictionaries. - */ +//----------------------------------------------------------------------------- DictSet *Global::Dicts = (DictSet *)0; - -/** - * \ingroup Globals - * \brief Pointer to a hash table containing the 'Value Representations'. - */ VR *Global::ValRes = (VR *)0; - -/** - * \ingroup Globals - * \brief Pointer to a hash table containing the Transfer Syntax codes - * and their english description - */ 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 - */ DicomDirElement *Global::ddElem = (DicomDirElement *)0; +//----------------------------------------------------------------------------- /** - * \ingroup Globals * \brief Global container */ Global Glob; +//------------------------------------------------------------------------- +// Constructor / Destructor /** - * \ingroup Global * \brief constructor : populates the various H Tables */ Global::Global() { if (ValRes || TranSyn || Dicts || ddElem) { - dbg.Verbose(0, "Global::Global : VR or TS or Dicts already allocated"); + gdcmWarningMacro( "VR or TS or Dicts already allocated"); return; } Dicts = new DictSet(); @@ -77,7 +70,6 @@ Global::Global() } /** - * \ingroup Global * \brief canonical destructor */ Global::~Global() @@ -87,36 +79,49 @@ Global::~Global() delete TranSyn; delete ddElem; } + +//----------------------------------------------------------------------------- +// Public +/** + * \brief returns a pointer to Dictionaries Table + */ +DictSet *Global::GetDicts() +{ + return Dicts; +} + /** - * \ingroup Global * \brief returns a pointer to the 'Value Representation Table' */ VR *Global::GetVR() { return ValRes; } + /** - * \ingroup Global - * \brief returns a pointer to the 'Transfert Syntax Table' + * \brief returns a pointer to the 'Transfer Syntax Table' */ TS *Global::GetTS() { return TranSyn; } + /** - * \ingroup Global - * \brief returns a pointer to Dictionaries Table - */ -DictSet *Global::GetDicts() -{ - return Dicts; -} -/** - * \ingroup Global * \brief returns a pointer to the DicomDir related elements Table */ DicomDirElement *Global::GetDicomDirElements() { return ddElem; } + +//----------------------------------------------------------------------------- +// Protected + +//----------------------------------------------------------------------------- +// Private + +//----------------------------------------------------------------------------- +// Print + +//----------------------------------------------------------------------------- } // end namespace gdcm