From 80825d491fc818a903ee53e331d53a6c6247e9a9 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 17 Apr 2017 18:57:00 -0700 Subject: Use read-only pattern for InstallationDirs --- toolsrc/include/vcpkg_Commands.h | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 8535e27c4..ef6020e1a 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -45,19 +45,23 @@ namespace vcpkg::Commands { struct InstallationDirs { - static InstallationDirs initiliaze_dirs(Files::Filesystem& fs, - const fs::path& source_dir, - const fs::path& destination_root, - const std::string& destination_subdirectory, - const fs::path& listfile); - - - fs::path source_dir; // "source" from source-destination, not source code. - fs::path destination_root; - std::string destination_subdirectory; - fs::path listfile; - - fs::path destination() const; + static InstallationDirs initiliaze(Files::Filesystem& fs, + const fs::path& source_dir, + const fs::path& destination_root, + const std::string& destination_subdirectory, + const fs::path& listfile); + + private: + fs::path m_source_dir; // "source" from source-destination, not source code. + fs::path m_destination; + std::string m_destination_subdirectory; + fs::path m_listfile; + + public: + const fs::path& source_dir() const; + const fs::path& destination() const; + const std::string& destination_subdirectory() const; + const fs::path& listfile() const; }; void install_files_and_write_listfile(Files::Filesystem& fs, const InstallationDirs& dirs); -- cgit v1.2.3