Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmDirList.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmDirList.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/02/02 15:07:41 $
00007   Version:   $Revision: 1.23 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
00016                                                                                 
00017 =========================================================================*/
00018 
00019 #ifndef GDCMDIRLIST_H
00020 #define GDCMDIRLIST_H
00021 
00022 #include "gdcmCommon.h"
00023 
00024 #include <string>
00025 #include <vector>
00026 #include <iostream>
00027 
00028 namespace gdcm 
00029 {
00030 
00031 typedef std::vector<std::string> DirListType;
00032 
00033 //-----------------------------------------------------------------------------
00034 
00035 // NOTE: Due to a VC6 'feature' we can not export a std::list in a dll, 
00036 // so GDCM_EXPORT keyword was removed for this class only
00037 
00042 class GDCM_EXPORT DirList
00043 {
00044 public :
00045    DirList(std::string const &dirName, bool recursive=false);
00046    ~DirList();
00047 
00048    void Print(std::ostream &os = std::cout);
00049 
00051    std::string const &GetDirName() const { return DirName; }
00052 
00054    DirListType const &GetFilenames() const { return Filenames; };
00055 
00056    static bool IsDirectory(std::string const &dirName);
00057 
00058 private :
00059    int Explore(std::string const &dirName, bool recursive=false);
00060 
00062    DirListType Filenames;
00064    std::string DirName;
00065 };
00066 } // end namespace gdcm
00067 //-----------------------------------------------------------------------------
00068 #endif

Generated on Thu Feb 10 22:17:57 2005 for gdcm by doxygen 1.3.6