ESyS-Particle  4.0.1
PathSearcher.h
00001 
00002 //                                                         //
00003 // Copyright (c) 2003-2011 by The University of Queensland //
00004 // Earth Systems Science Computational Centre (ESSCC)      //
00005 // http://www.uq.edu.au/esscc                              //
00006 //                                                         //
00007 // Primary Business: Brisbane, Queensland, Australia       //
00008 // Licensed under the Open Software License version 3.0    //
00009 // http://www.opensource.org/licenses/osl-3.0.php          //
00010 //                                                         //
00012 
00013 
00014 #ifndef ESYS_LSMPATHSEARCHER_H
00015 #define ESYS_LSMPATHSEARCHER_H
00016 
00017 #include <boost/filesystem/path.hpp>
00018 #include <vector>
00019 
00020 namespace esys
00021 {
00022   namespace lsm
00023   {
00024     class PathSearcher
00025     {
00026     public:
00027       PathSearcher(const std::string &delimitedPathList, const std::string &delim = ":");
00028       
00029       bool exists(const std::string &fileName);
00030       
00031       boost::filesystem::path findPath(const std::string &fileName);
00032       
00033       std::string find(const std::string &fileName);
00034       
00035     private:
00036       typedef std::vector<boost::filesystem::path> PathVector;
00037       PathVector m_pathVector;
00038     };
00039   }
00040 }
00041 
00042 #endif