]> Creatis software - gdcm.git/blobdiff - src/gdcmDirList.cxx
Add class DicomDirPrivate, for dealing with SERIE/PRIVATE
[gdcm.git] / src / gdcmDirList.cxx
index c2e6a8abe0414100214a51c56ca17bfdc25c9d89..badef7290b15e37f78e7905b6704f611e05a199c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDirList.cxx,v $
   Language:  C++
-  Date:      $Date: 2006/05/12 09:36:09 $
-  Version:   $Revision: 1.59 $
+  Date:      $Date: 2006/11/15 15:53:08 $
+  Version:   $Revision: 1.60 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -83,6 +83,33 @@ bool DirList::IsDirectory(std::string const &dirName)
    }
 }
 
+/**
+ * \brief   Get the first entry while visiting Filenames
+ * \return  The first  if found, otherwhise ""
+ */ 
+std::string DirList::GetFirst()
+{
+   ItDirList = Filenames.begin();
+   if (ItDirList != Filenames.end())
+      return *ItDirList;
+   return "";
+} 
+
+/**
+ * \brief   Get the next entry while visiting Filenames
+ * \return  The next  if found, otherwhise ""
+ */ 
+std::string DirList::GetNext()
+{
+   gdcmAssertMacro (ItDirList != Filenames.end())
+   {
+      ++ItDirList;
+      if (ItDirList != Filenames.end())
+         return *ItDirList;      
+   }
+   return "";
+} 
+
 //-----------------------------------------------------------------------------
 // Protected