class VirtualFileSystem
{
public:
- typedef std::list<std::string> SearchPath;
+ typedef std::list<Msp::FS::Path> SearchPath;
private:
- typedef std::map<std::string, FileTarget *> TargetMap;
+ typedef std::map<Msp::FS::Path, FileTarget *> TargetMap;
Builder &builder;
TargetMap targets;
- TargetMap include_cache;
- TargetMap library_cache;
+ 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
FileTarget *find_library(const std::string &, const SearchPath &, LibMode);
private:
- 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<Pattern> &, const std::string &);
+ bool file_exists(const Msp::FS::Path &);
};
#endif