X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvirtualfilesystem.h;h=60e198ad3b2dcf866c2be8f67094e054edf146e9;hb=f0c0d720edc01f5faa72bb4ff4bf655445842678;hp=6a92125316b9fc7465d49a4efa88661f8daee76d;hpb=65ba6a595dd4a1d74675abcfdf96307062dc43eb;p=builder.git diff --git a/source/virtualfilesystem.h b/source/virtualfilesystem.h index 6a92125..60e198a 100644 --- a/source/virtualfilesystem.h +++ b/source/virtualfilesystem.h @@ -1,15 +1,16 @@ #ifndef VIRTUALFILESYSTEM_H_ #define VIRTUALFILESYSTEM_H_ -#include #include #include +#include #include #include "buildinfo.h" class Builder; class FileTarget; class Pattern; +class Tool; /** Provides access to the filesystem in a way that takes known targets into @@ -19,17 +20,16 @@ possible to build them. class VirtualFileSystem { public: - typedef std::list SearchPath; + using SearchPath = std::vector; private: - typedef std::map TargetMap; - Builder &builder; - TargetMap targets; + std::map targets; std::set nonexistent; + SearchPath sys_bin_path; public: - VirtualFileSystem(Builder &); + VirtualFileSystem(Builder &b): builder(b) { } /** Gets an existing target associated with a path. If no target has claimed that path, 0 is returned. */ @@ -42,7 +42,7 @@ public: /** Locates a source file. If a file is found but no target is associated with it, a new package-less target is created with the appropriate tool. If use_syspath is true, the system path reported by the tool is also searched. */ - FileTarget *find_header(const std::string &, const SearchPath &, bool use_syspath = true); + FileTarget *find_header(const std::string &, Tool *, const SearchPath &, bool use_syspath = true); /** Locates a library. The library name should be the same as what would be used in linking with the library. If a file is found but no target is