]> Creatis software - gdcm.git/blobdiff - src/gdcmGlobal.cxx
ENH: First pass at my big endian emulation on little endian
[gdcm.git] / src / gdcmGlobal.cxx
index a3a46599e12984cf7965514d5b624e854ea5fc6a..1a31c1c60ee27c4054f766ed7e345939c75a2797 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmGlobal.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/18 08:01:41 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2005/02/11 15:22:18 $
+  Version:   $Revision: 1.21 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 
 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
+//-----------------------------------------------------------------------------
+/// \brief 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";
 
-/**
- * \brief Pointer to a container, holding _all_ the Dicom Dictionaries.
- */
-DictSet         *Global::Dicts  = (DictSet *)0;
-
-/**
- * \brief   Pointer to a hash table containing the 'Value Representations'.
- */
-VR              *Global::ValRes     = (VR *)0;
-
-/**
- * \brief   Pointer to a hash table containing the Transfer Syntax codes
- *          and their english description 
- */
-TS              *Global::TranSyn     = (TS *)0;
-
-/**
- * \brief   Pointer to the hash table containing the Dicom Elements
- *          necessary to describe each part of a DICOMDIR 
- */
-DicomDirElement *Global::ddElem = (DicomDirElement *)0;
+//-----------------------------------------------------------------------------
+DictSet         *Global::Dicts   = (DictSet *)0;
+VR              *Global::ValRes  = (VR *)0;
+TS              *Global::TranSyn = (TS *)0;
+DicomDirElement *Global::ddElem  = (DicomDirElement *)0;
 
+//-----------------------------------------------------------------------------
 /**
  * \brief   Global container
  */
 Global Glob;
 
+//-------------------------------------------------------------------------
+// Constructor / Destructor
 /**
  * \brief   constructor : populates the various H Tables
  */
@@ -72,7 +60,7 @@ 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();
@@ -91,6 +79,17 @@ Global::~Global()
    delete TranSyn;
    delete ddElem;
 }
+
+//-----------------------------------------------------------------------------
+// Public
+/**
+ * \brief   returns a pointer to Dictionaries Table 
+ */
+DictSet *Global::GetDicts()
+{
+   return Dicts;
+}
+
 /**
  * \brief   returns a pointer to the 'Value Representation Table' 
  */
@@ -98,6 +97,7 @@ VR *Global::GetVR()
 {
    return ValRes;
 }
+
 /**
  * \brief   returns a pointer to the 'Transfer Syntax Table' 
  */
@@ -105,13 +105,7 @@ TS *Global::GetTS()
 {
    return TranSyn;
 }
-/**
- * \brief   returns a pointer to Dictionaries Table 
- */
-DictSet *Global::GetDicts()
-{
-   return Dicts;
-}
+
 /**
  * \brief   returns a pointer to the DicomDir related elements Table 
  */
@@ -119,4 +113,15 @@ DicomDirElement *Global::GetDicomDirElements()
 {
    return ddElem;
 }
+
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
+
+//-----------------------------------------------------------------------------
+// Print
+
+//-----------------------------------------------------------------------------
 } // end namespace gdcm