X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fpackagemanager.h;h=fc0aa982e38fd4666800c867b482c07ab1a7b560;hb=1ed833343bc83b83c5f61cbfd74423bbba677a04;hp=b168d723e174739c3c652f376f7f1cefe407cda2;hpb=d6d1d6ef8f589747b996f223c6c65dd293fedd93;p=builder.git diff --git a/source/packagemanager.h b/source/packagemanager.h index b168d72..fc0aa98 100644 --- a/source/packagemanager.h +++ b/source/packagemanager.h @@ -1,9 +1,10 @@ #ifndef PACKAGEMANAGER_H_ #define PACKAGEMANAGER_H_ -#include #include +#include #include +#include #include class Builder; @@ -15,25 +16,20 @@ packages by name. */ class PackageManager { -public: - typedef std::map PackageMap; - private: - typedef std::list SearchPath; - Builder &builder; - SearchPath pkg_path; - SearchPath pkg_dirs; - SearchPath binpkg_path; - SearchPath binpkg_files; - bool no_externals; - PackageMap packages; - Package *main_pkg; + std::vector pkg_path; + std::vector pkg_dirs; + std::vector binpkg_path; + std::vector binpkg_files; + bool no_externals = false; + std::map packages; + Package *main_pkg = 0; std::set not_found; - bool env_set; + bool env_set = false; public: - PackageManager(Builder &); + PackageManager(Builder &b): builder(b) { } ~PackageManager(); /// Adds a location to look for source packages from. @@ -55,7 +51,7 @@ public: the primary build target. */ Package &get_main_package() const; - const PackageMap &get_packages() const { return packages; } + const std::map &get_packages() const { return packages; } /** Locates a package and loads it if necessary. */ Package *find_package(const std::string &);