X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvirtualfilesystem.h;h=a3327de2490001c1f3e3c349ac284e66fb9c7611;hb=HEAD;hp=a2ce05c4dad880c7f1bfea7c790a4d72c67a3256;hpb=19a821ee581f0fe60860627472cc59065247bf13;p=builder.git diff --git a/source/virtualfilesystem.h b/source/virtualfilesystem.h deleted file mode 100644 index a2ce05c..0000000 --- a/source/virtualfilesystem.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef VIRTUALFILESYSTEM_H_ -#define VIRTUALFILESYSTEM_H_ - -#include -#include -#include - -class Builder; -class FileTarget; -class Pattern; - -/** -Provides access to the filesystem in a way that takes known targets into -account. Thus, targets may be returned for files that do not exist yet if it's -possible to build them. -*/ -class VirtualFileSystem -{ -public: - typedef std::list SearchPath; - -private: - typedef std::map TargetMap; - - Builder &builder; - TargetMap targets; - std::set nonexistent; - -public: - VirtualFileSystem(Builder &); - - /** Gets an existing target associated with a path. If no target has claimed - that path, 0 is returned. */ - FileTarget *get_target(const Msp::FS::Path &) const; - - /** Registers a target with the VFS. A target may be registered at multiple - paths if building it results in multiple files. */ - void register_path(const Msp::FS::Path &, FileTarget *); - - /** 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. */ - FileTarget *find_header(const std::string &, const SearchPath &); - - /** 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 - associated with it, a new package-less target of appropriate type is - created. */ - FileTarget *find_library(const std::string &, const SearchPath &, LibMode); - - /** Locates a binary. The normal search path for binaries is used (usually - this means the PATH environment variable). If a file is found but no target - is associated with it, a new package-less Executable target is created. */ - FileTarget *find_binary(const std::string &); - -private: - bool file_exists(const Msp::FS::Path &); -}; - -#endif