X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstallmap.h;h=955decc04d8f7eea188f3c77b9fede5ba175da80;hb=HEAD;hp=49211d7676aca975260e4d0a89cbbf9dea9f99a2;hpb=aa053d637e8259755af7d2e4b510a242f4d29c7b;p=builder.git diff --git a/source/installmap.h b/source/installmap.h deleted file mode 100644 index 49211d7..0000000 --- a/source/installmap.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef INSTALLMAP_H_ -#define INSTALLMAP_H_ - -#include -#include -#include - -class FileTarget; - -/** -Maps install locations based on location in the source tree. Mappings are -defined as pairs of source and install locations. Targets within a source -location are mapped if their default install location shares a common prefix -with the mapped install location. The remainder of the source location is -appended to the mapped install location to form the final install location. -*/ -class InstallMap -{ -public: - class Loader: public Msp::DataFile::ObjectLoader - { - private: - Msp::FS::Path source_base; - - public: - Loader(InstallMap &, const Msp::FS::Path &); - - private: - void map(const std::string &, const std::string &); - }; - -private: - struct Entry - { - Msp::FS::Path source; - Msp::FS::Path install; - }; - - std::vector entries; - -public: - /** Adds an install mapping. Multiple mappings can be specified for the - same source location, but the first one that matches both that and the - target's default install location will be used. */ - void add_mapping(const Msp::FS::Path &, const Msp::FS::Path &); - - /** Returns the install location for a target. If no defined mappings match - the target, its default install location is returned. */ - Msp::FS::Path get_install_location(const FileTarget &) const; -}; - -#endif