]> git.tdb.fi Git - builder.git/blobdiff - source/virtualfilesystem.h
Refactor transitive dependencies to work on all targets
[builder.git] / source / virtualfilesystem.h
diff --git a/source/virtualfilesystem.h b/source/virtualfilesystem.h
deleted file mode 100644 (file)
index aef6ab0..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef VIRTUALFILESYSTEM_H_
-#define VIRTUALFILESYSTEM_H_
-
-#include <list>
-#include <map>
-#include <msp/fs/path.h>
-
-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<Msp::FS::Path> SearchPath;
-
-private:
-       typedef std::map<Msp::FS::Path, FileTarget *> TargetMap;
-
-       Builder &builder;
-       TargetMap targets;
-       std::set<Msp::FS::Path> 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);
-
-private:
-       bool file_exists(const Msp::FS::Path &);
-};
-
-#endif