]> Creatis software - gdcm.git/blobdiff - src/gdcmGlobal.cxx
Fix mistypings
[gdcm.git] / src / gdcmGlobal.cxx
index 6f98bbfe9ff8f6436d37f3cf6b06238f60131940..7ae08b6e0a16ed5277aad44ba21e2a28c9188dcc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmGlobal.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/11/28 15:20:33 $
-  Version:   $Revision: 1.29 $
+  Date:      $Date: 2007/09/17 12:20:01 $
+  Version:   $Revision: 1.37 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -25,7 +25,7 @@
 #include "gdcmDictSet.h"
 #include "gdcmDicomDirElement.h"
 
-namespace gdcm 
+namespace  GDCM_NAME_SPACE
 {
 //-----------------------------------------------------------------------------
 /// \brief Those global string that are returned by reference everywhere in 
@@ -35,15 +35,21 @@ namespace gdcm
 /// 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";
-const std::string GDCM_NOTASCII  = "gdcm::NotAscii";
-const std::string GDCM_PIXELDATA = "gdcm::Pixel Data to be loaded";
+const std::string GDCM_UNKNOWN   = "GDCM::Unknown";
+const std::string GDCM_UNFOUND   = "GDCM::Unfound";
+const std::string GDCM_BINLOADED = "GDCM::Binary data";
+const std::string GDCM_NOTLOADED = "GDCM::NotLoaded";
+const std::string GDCM_UNREAD    = "GDCM::UnRead";
+const std::string GDCM_NOTASCII  = "GDCM::NotAscii";
+const std::string GDCM_PIXELDATA = "GDCM::Pixel Data to be loaded";
 
-const std::string GDCM_VRUNKNOWN = "  ";
+const char GDCM_VRUNKNOWN[2] = {' ',' '}; // avoid useless std::string stuff
+
+#ifdef _WIN32
+const char GDCM_FILESEPARATOR = '\\';
+#else
+const char GDCM_FILESEPARATOR = '/';
+#endif
 
 //-----------------------------------------------------------------------------
 DictSet         *Global::Dicts     = (DictSet *)0;
@@ -52,6 +58,8 @@ TS              *Global::TranSyn   = (TS *)0;
 DictGroupName   *Global::GroupName = (DictGroupName *)0;
 DicomDirElement *Global::ddElem    = (DicomDirElement *)0;
 
+Dict            *Global::DefaultPubDict = (Dict *)0;
+
 //-----------------------------------------------------------------------------
 /**
  * \brief   Global container
@@ -65,9 +73,9 @@ Global Glob;
  */
 Global::Global()
 {
-   if (ValRes || TranSyn || Dicts || ddElem)
+   if (ValRes || TranSyn || Dicts || ddElem || GroupName )
    {
-      gdcmStaticWarningMacro( "VR or TS or Dicts already allocated");
+      gdcmStaticWarningMacro( "VR or TS or Dicts or ... already allocated");
       return;
    }
    Dicts     = DictSet::New();
@@ -91,45 +99,6 @@ Global::~Global()
 
 //-----------------------------------------------------------------------------
 // Public
-/**
- * \brief   returns a pointer to Dictionaries Table 
- */
-DictSet *Global::GetDicts()
-{
-   return Dicts;
-}
-
-/**
- * \brief   returns a pointer to the 'Value Representation Table' 
- */
-VR *Global::GetVR()
-{
-   return ValRes;
-}
-
-/**
- * \brief   returns a pointer to the 'Transfer Syntax Table' 
- */
-TS *Global::GetTS()
-{
-   return TranSyn;
-}
-
-/**
- * \brief   returns a pointer to the Group name correspondance table
- */
-DictGroupName *Global::GetDictGroupName()
-{
-   return GroupName;
-}
-
-/**
- * \brief   returns a pointer to the DicomDir related elements Table 
- */
-DicomDirElement *Global::GetDicomDirElements()
-{
-   return ddElem;
-}
 
 //-----------------------------------------------------------------------------
 // Protected