diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:06:54 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:06:54 +0000 |
commit | 105caf23daf5aed16c7ee8b904fcca2ddbd4f59f (patch) | |
tree | 4d74f6c8722790e6fb9d58888ea225866fc98d3c /libs/pbd/pbd | |
parent | 22e478e7fc4952dd386391e85d8e7fa2491ae953 (diff) |
Use std::string instead of PBD::sys::path in pbd/search_path.h, pbd/file_utils.h and ardour/session_dir.h
git-svn-id: svn://localhost/ardour2/branches/3.0@12829 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/pbd')
-rw-r--r-- | libs/pbd/pbd/file_utils.h | 14 | ||||
-rw-r--r-- | libs/pbd/pbd/search_path.h | 22 |
2 files changed, 14 insertions, 22 deletions
diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index d63f02f787..b303936fab 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -38,7 +38,7 @@ namespace PBD { * @param result A vector of filenames. */ void -get_files_in_directory (const sys::path& path, +get_files_in_directory (const std::string& path, std::vector<std::string>& result); /** @@ -50,9 +50,9 @@ get_files_in_directory (const sys::path& path, * @param result A vector in which to place the resulting matches. */ void -find_matching_files_in_directory (const sys::path& directory, +find_matching_files_in_directory (const std::string& directory, const Glib::PatternSpec& pattern, - std::vector<sys::path>& result); + std::vector<std::string>& result); /** * Takes a number of directory paths and returns all the files matching @@ -63,9 +63,9 @@ find_matching_files_in_directory (const sys::path& directory, * @param result A vector in which to place the resulting matches. */ void -find_matching_files_in_directories (const std::vector<sys::path>& directory_paths, +find_matching_files_in_directories (const std::vector<std::string>& directory_paths, const Glib::PatternSpec& pattern, - std::vector<sys::path>& result); + std::vector<std::string>& result); /** * Takes a SearchPath and puts a list of all the files in the search path @@ -78,7 +78,7 @@ find_matching_files_in_directories (const std::vector<sys::path>& directory_path void find_matching_files_in_search_path (const SearchPath& search_path, const Glib::PatternSpec& pattern, - std::vector<sys::path>& result); + std::vector<std::string>& result); /** * Takes a search path and a file name and place the full path @@ -89,7 +89,7 @@ find_matching_files_in_search_path (const SearchPath& search_path, bool find_file_in_search_path (const SearchPath& search_path, const std::string& filename, - sys::path& result); + std::string& result); } // namespace PBD diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h index de0eeeeb5a..2a14510ad2 100644 --- a/libs/pbd/pbd/search_path.h +++ b/libs/pbd/pbd/search_path.h @@ -23,8 +23,6 @@ #include <string> #include <vector> -#include "pbd/filesystem.h" - namespace PBD { /** @@ -36,7 +34,7 @@ namespace PBD { * The SearchPath class does not test whether the paths exist * or are directories. It is basically just a container. */ -class SearchPath : public std::vector<sys::path> +class SearchPath : public std::vector<std::string> { public: /** @@ -58,19 +56,12 @@ public: SearchPath (const std::string& search_path); /** - * Initialize SearchPath from a sys::path. - * - * @param directory_path A directory path. - */ - SearchPath (const PBD::sys::path& directory_path); - - /** * Initialize SearchPath from a vector of paths that may or may * not exist. * * @param paths A vector of paths. */ - SearchPath (const std::vector<PBD::sys::path>& paths); + SearchPath (const std::vector<std::string>& paths); /** * @return a search path string. @@ -88,7 +79,7 @@ public: /** * Add another directory path to the search path. */ - SearchPath& operator+= (const PBD::sys::path& directory_path); + SearchPath& operator+= (const std::string& directory_path); /** * Concatenate another SearchPath onto this. @@ -98,7 +89,7 @@ public: /** * Add another path to the search path. */ - SearchPath& operator+ (const PBD::sys::path& directory_path); + SearchPath& operator+ (const std::string& directory_path); /** * Add a sub-directory to each path in the search path. @@ -108,8 +99,9 @@ public: SearchPath& add_subdirectory_to_paths (const std::string& subdir); protected: - void add_directory (const sys::path& directory_path); - void add_directories (const std::vector<PBD::sys::path>& paths); + + void add_directory (const std::string& directory_path); + void add_directories (const std::vector<std::string>& paths); }; } // namespace PBD |