pathfinder.h
1 //------------------------------------------------------------------------------
2 // pathfinder.h
3 //------------------------------------------------------------------------------
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library 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 GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; 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:
90  static PathFinder genericPathFinder(const QStringList &suffixes);
91 
96  PathFinder();
102  PathFinder(const QStringList& paths);
103  virtual ~PathFinder();
104 
111  void addPrioritySearchDir(const QString& dir);
119  void addSearchDir(const QString& dir);
123  QString findFile(const QString& fileName) const;
128  PathFinderResult findFiles(const QStringList& files) const;
129 
130  private:
132 };
133 
134 #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