X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDirList.cxx;h=badef7290b15e37f78e7905b6704f611e05a199c;hb=209f09716365d35c7cdc5b94684d1d1fb00335c7;hp=c2e6a8abe0414100214a51c56ca17bfdc25c9d89;hpb=327ad94af0b7e8bce9c8931789133757b318132b;p=gdcm.git diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index c2e6a8ab..badef729 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -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