Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

DirectoryIterator.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2004 University of Massachusetts.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010 */
00011 
00012 
00013 //
00014 // DirectoryIterator
00015 //
00016 // 26 May 2004 -- tds
00017 //
00018 
00019 #ifndef INDRI_DIRECTORYITERATOR_HPP
00020 #define INDRI_DIRECTORYITERATOR_HPP
00021 
00022 #include <string>
00025 class DirectoryIterator {
00026 private:
00027   static DirectoryIterator _end;
00028 
00029   bool _relative;
00030   std::string _current;
00031   void* _platform;
00032   std::string _path;
00033 
00034   void _copyCurrent();
00035   void _next();
00036   
00037 public:
00038   DirectoryIterator();
00039   DirectoryIterator( const std::string& path, bool relative = true );
00040   ~DirectoryIterator();
00041 
00042   void operator ++ (int);
00043   void operator ++ ();
00044   bool operator == ( const DirectoryIterator& other );
00045   const std::string& operator* ();
00046   const std::string& base() const;
00047   void close();
00048 
00049   static const DirectoryIterator& end();
00050 };
00051 
00052 #endif // INDRI_DIRECTORYITERATOR_HPP
00053 

Generated on Wed Nov 3 12:58:53 2004 for Lemur Toolkit by doxygen1.2.18