]> Creatis software - gdcm.git/blob - src/gdcmDirList.h
* Erroneous leading white fix:
[gdcm.git] / src / gdcmDirList.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDirList.h,v $
5   Language:  C++
6   Date:      $Date: 2004/06/20 18:08:47 $
7   Version:   $Revision: 1.7 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef GDCMDIRLIST_H
20 #define GDCMDIRLIST_H
21
22 #include "gdcmCommon.h"
23
24 #include <string>
25 #include <list>
26
27 //-----------------------------------------------------------------------------
28 /**
29  * \ingroup gdcmDirList
30  * \brief   List containing the file headers from root directory. 
31  */
32 class GDCM_EXPORT gdcmDirList: public std::list<std::string>
33 {
34 public :
35    gdcmDirList(std::string dirName,bool recursive=false);
36    virtual ~gdcmDirList(void);
37
38    std::string GetDirName(void);
39
40    /// Character '\' 
41    static const char SEPARATOR_X;
42    /// Character '/'  
43    static const char SEPARATOR_WIN;
44    /// depending on the O.S.
45    static const std::string SEPARATOR;
46
47 private :
48    void Explore(std::string dirName,bool recursive=false);
49    /// name of the root directory to explore
50    std::string name;
51 };
52
53 //-----------------------------------------------------------------------------
54 #endif