]> Creatis software - gdcm.git/blobdiff - src/gdcmDirList.cxx
Propagate GDCM_DATA_ROOT into other tests
[gdcm.git] / src / gdcmDirList.cxx
index 21c0c21b6726e01809cb2024ec4c5603801aff5b..f49c0ba92c0168caa0fa2b42137ca15558fefaf3 100644 (file)
@@ -1,6 +1,7 @@
 // gdcmDirList.cxx
 //-----------------------------------------------------------------------------
 #include "gdcmDirList.h"
+#include "gdcmUtil.h"
 
 #include <iostream>
 #include <algorithm>
    #include <unistd.h>
 #endif
 
-//-----------------------------------------------------------------------------
-const char gdcmDirList::SEPARATOR_X      = '/';
-const char gdcmDirList::SEPARATOR_WIN    = '\\';
-const std::string gdcmDirList::SEPARATOR = "/";
-
-//-----------------------------------------------------------------------------
 // Constructor / Destructor
-/*
+/**
  * \ingroup gdcmDirList
  * \brief Constructor  
- * @param  dirName
- * @param  recursive 
+ * @param  dirName root directory name
+ * @param  recursive whether we want to explore recursively or not 
  */
 gdcmDirList::gdcmDirList(std::string dirName,bool recursive)
 {
@@ -41,7 +36,7 @@ gdcmDirList::gdcmDirList(std::string dirName,bool recursive)
    Explore(name,recursive);
 }
 
-/*
+/**
  * \ingroup gdcmDirList
  * \brief  Destructor
  */
@@ -54,7 +49,7 @@ gdcmDirList::~gdcmDirList(void)
 
 //-----------------------------------------------------------------------------
 // Public
-/*
+/**
  * \ingroup gdcmDirList
  * \brief   Get the directory name
  * @return the directory name 
@@ -69,21 +64,8 @@ std::string gdcmDirList::GetDirName(void)
 
 //-----------------------------------------------------------------------------
 // Private
-/*
- * \ingroup gdcmDirList
- * \brief   Add a SEPARATOR to the end of the directory name is necessary
- * @param   
- */
-void gdcmDirList::NormalizePath(std::string &dirName)
-{
-   int size=dirName.size();
-   if((dirName[size-1]!=SEPARATOR_X)&&(dirName[size-1]!=SEPARATOR_WIN))
-   {
-      dirName+=SEPARATOR;
-   }
-}
 
-/*
+/**
  * \ingroup gdcmDirList
  * \brief   Explore a directory with possibility of recursion
  * @param  dirName directory to explore