X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvirtualfilesystem.h;h=a3327de2490001c1f3e3c349ac284e66fb9c7611;hb=HEAD;hp=72465857480e47e465a0aae5f7ba39dc3492fe32;hpb=7c0fc22e2ecd8d8c1843f797d52b36610d880227;p=builder.git diff --git a/source/virtualfilesystem.h b/source/virtualfilesystem.h deleted file mode 100644 index 7246585..0000000 --- a/source/virtualfilesystem.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef VIRTUALFILESYSTEM_H_ -#define VIRTUALFILESYSTEM_H_ - -#include -#include -#include - -class Builder; -class FileTarget; -class Pattern; - -class VirtualFileSystem -{ -public: - typedef std::list SearchPath; - -private: - typedef std::map TargetMap; - - Builder &builder; - TargetMap targets; - TargetMap include_cache; - TargetMap library_cache; - -public: - VirtualFileSystem(Builder &); - - FileTarget *get_target(const Msp::FS::Path &) const; - - void register_path(const Msp::FS::Path &, FileTarget *); - - /** Tries to locate a header based on location of including file and include - path. Considers known targets as well as existing files. If a matching - target is not found but a file exists, a new SystemHeader target will be - created and returned. */ - FileTarget *find_header(const std::string &, const SearchPath &); - - /** Tries to locate a library in a library path. The library name should be - the same as would be given to the linker with -l, i.e. without the "lib" - prefix or extension. Considers known targets as well as existing files. If - a matching target is not found but a file exists, a new SystemLibrary target - will be created and returned. */ - FileTarget *find_library(const std::string &, const SearchPath &, LibMode); - -private: - /** - Check if a header exists, either as a target or a file. Returns an existing - target of one was found, or a new SystemHeader target if there was no known - target but the file exists. - */ - FileTarget *get_header(const Msp::FS::Path &, const Tool &); - - FileTarget *get_library(const std::string &, const Msp::FS::Path &, LibMode); - - Msp::FS::Path try_patterns(const Msp::FS::Path &, const std::list &, const std::string &); -}; - -#endif