]> Creatis software - gdcm.git/blob - src/gdcmDirList.h
ENH: Remove GDCM_EXPORT keyword from gdcm::DirList
[gdcm.git] / src / gdcmDirList.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDirList.h,v $
5   Language:  C++
6   Date:      $Date: 2004/10/16 14:34:12 $
7   Version:   $Revision: 1.12 $
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 namespace gdcm 
27 {
28
29 //-----------------------------------------------------------------------------
30 /**
31  * \ingroup DirList
32  * \brief   List containing the file headers from root directory. 
33  */
34 // NOTE: Due to a VC6 'feature' we can not export a std::list in a dll, 
35 // so GDCM_EXPORT keyword was removed for this class only
36 class DirList: public std::list<std::string>
37 {
38 public :
39    DirList(std::string dirName,bool recursive=false);
40    virtual ~DirList();
41
42    std::string GetDirName();
43
44    /// Character '\' 
45    static const char SEPARATOR_X;
46    /// Character '/'  
47    static const char SEPARATOR_WIN;
48    /// depending on the O.S.
49    static const std::string SEPARATOR;
50
51 private :
52    int Explore(std::string dirName,bool recursive=false);
53    /// name of the root directory to explore
54    std::string name;
55 };
56 } // end namespace gdcm
57 //-----------------------------------------------------------------------------
58 #endif