cgma
CubitDirIterator.hpp
Go to the documentation of this file.
00001 //- Class:          CubitDirIterator
00002 //- Description:    Class with functions to iterate over files in directories
00003 
00004 #ifndef CubitDirIterator_HPP
00005 #define CubitDirIterator_HPP
00006 
00007 #include "CubitString.hpp"
00008 #include "CGMUtilConfigure.h"
00009 
00010 // an iterator to iterate over files in a directory
00011 class CUBIT_UTIL_EXPORT CubitDirIterator
00012 {
00013 public:
00014   CubitDirIterator(const CubitString& path,
00015                    const CubitString& pattern_match = "");
00016   virtual ~CubitDirIterator();
00017   void open(const CubitString& path,
00018             const CubitString& pattern_match = "");
00019   bool has_next();
00020   CubitString next();
00021 protected:
00022   struct Helper;
00023   Helper* mHelper;
00024   CubitString mPattern;
00025   bool mDirs;
00026   bool atEnd;
00027   void cleanup();
00028 };
00029 
00030 #endif
00031 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines