pathfinder.h
1 //------------------------------------------------------------------------------
2 // pathfinder.h
3 //------------------------------------------------------------------------------
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301, USA.
19 //
20 //------------------------------------------------------------------------------
21 // Copyright (C) 2009 "Zalewa" <zalewapl@gmail.com>
22 //------------------------------------------------------------------------------
23 
24 #ifndef __PATHFINDER_H_
25 #define __PATHFINDER_H_
26 
27 #include "pathfinder/filesearchpath.h"
28 #include "dptr.h"
29 #include "global.h"
30 #include <QStringList>
31 
32 class IniSection;
33 class IniVariable;
34 
41 class MAIN_EXPORT PathFinderResult
42 {
43  public:
45  virtual ~PathFinderResult();
46 
50  QStringList& foundFiles();
51  const QStringList& foundFiles() const;
52 
56  QStringList& missingFiles();
57  const QStringList& missingFiles() const;
58 
59  private:
61 };
62 
81 class MAIN_EXPORT PathFinder
82 {
83  public:
88  PathFinder();
94  PathFinder(const QStringList& paths);
95  // [Zalewa] This may seem strange, but I don't see any reason why
96  // PathFinder can't be copyable. All in all, it's just a set of paths.
97  virtual ~PathFinder();
98 
105  void addPrioritySearchDir(const QString& dir);
109  QString findFile(const QString& fileName) const;
114  PathFinderResult findFiles(const QStringList& files) const;
115 
116  private:
118 };
119 
120 #endif
Result of multiple file search operation done by PathFinder.
Definition: pathfinder.h:41
Performs a case-insensitive (OS independent) file searches.
Definition: pathfinder.h:81
INI variable representation.
Definition: inivariable.h:41
INI section representation.
Definition: inisection.h:40