]> Creatis software - gdcm.git/blob - src/gdcmDirList.h
STYLE: Naming convention require a capital letter for member variable + the accessor...
[gdcm.git] / src / gdcmDirList.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDirList.h,v $
5   Language:  C++
6   Date:      $Date: 2005/01/12 22:09:55 $
7   Version:   $Revision: 1.16 $
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.html 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 namespace gdcm 
28 {
29
30 //-----------------------------------------------------------------------------
31 /**
32  * \ingroup DirList
33  * \brief   List containing the file Header s of all the gdcm readable files
34  *          found by exploring recursively a root directory. 
35  */
36 // NOTE: Due to a VC6 'feature' we can not export a std::list in a dll, 
37 // so GDCM_EXPORT keyword was removed for this class only
38
39 class DirList: public std::list<std::string>
40 {
41 public :
42    DirList(std::string const &dirName, bool recursive=false);
43    virtual ~DirList();
44
45    std::string const &GetDirName() const;
46
47    /// Character '\' 
48    static const char SEPARATOR_X;
49    /// Character '/'  
50    static const char SEPARATOR_WIN;
51    /// depending on the O.S.
52    static const std::string SEPARATOR;
53
54 private :
55    int Explore(std::string const &dirName, bool recursive=false);
56
57    /// name of the root directory to explore
58    std::string DirName;
59 };
60 } // end namespace gdcm
61 //-----------------------------------------------------------------------------
62 #endif