Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXDirVisitor.h

Go to the documentation of this file.
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,2010 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 
00027 /**
00028 * Directory visitor frequents all files and directories
00029 * recursively, calling visit() for every file, and enter()/leave()
00030 * for every directory.
00031 */
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 
00047 #endif

Copyright © 1997-2010 Jeroen van der Zijp