![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
00001 /******************************************************************************** 00002 * * 00003 * D i r e c t o r y V i s i t o r * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2008,2012 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published by * 00010 * the Free Software Foundation; either version 3 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00020 ********************************************************************************/ 00021 #ifndef FXDIRVISITOR_H 00022 #define FXDIRVISITOR_H 00023 00024 namespace FX { 00025 00026 00032 class FXAPI FXDirVisitor { 00033 private: 00034 struct Seen; 00035 protected: 00036 virtual FXuint recurse(const FXString& path,Seen *seen); 00037 public: 00038 FXuint traverse(const FXString& path); 00039 virtual FXuint enter(const FXString& path); 00040 virtual FXuint visit(const FXString& path); 00041 virtual FXuint leave(const FXString& path); 00042 virtual ~FXDirVisitor(){} 00043 }; 00044 00045 00046 00050 class FXAPI FXGlobVisitor : public FXDirVisitor { 00051 private: 00052 FXString pattern; 00053 FXuint flags; 00054 FXuint mode; 00055 public: 00056 FXuint traverse(const FXString& path,const FXString& pat="*",FXuint flg=FXDir::MatchAll); 00057 virtual FXuint enter(const FXString& path); 00058 virtual FXuint visit(const FXString& path); 00059 }; 00060 00061 } 00062 00063 #endif
|
|