X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fpbd%2Fsearch_path.h;h=cc53dbebac606a4e06c3e5b2eedc5ffd498b3a9c;hb=350ed31655b00f3043e5d723606cdd50099fa91b;hp=1148384daa5e4a0a6ca64ea9db078a56706d66b1;hpb=3b89d9eaa03406a5e03648f47734211f09b89d62;p=ardour.git diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h index 1148384daa..cc53dbebac 100644 --- a/libs/pbd/pbd/search_path.h +++ b/libs/pbd/pbd/search_path.h @@ -20,15 +20,19 @@ #ifndef PBD_SEARCH_PATH_INCLUDED #define PBD_SEARCH_PATH_INCLUDED +#ifdef SearchPath +#undef SearchPath +#endif + #include #include -#include "pbd/filesystem.h" - namespace PBD { /** - * @class The SearchPath class is a helper class for getting a + * @class SearchPath + * + * The SearchPath class is a helper class for getting a * vector of paths contained in a search path string where a * "search path string" contains absolute directory paths * separated by a colon(:) or a semi-colon(;) on windows. @@ -36,7 +40,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 +class SearchPath : public std::vector { public: /** @@ -57,20 +61,13 @@ 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 path A path. + * @param paths A vector of paths. */ - SearchPath (const std::vector& paths); + SearchPath (const std::vector& paths); /** * @return a search path string. @@ -88,7 +85,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 +95,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 +105,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& paths); + + void add_directory (const std::string& directory_path); + void add_directories (const std::vector& paths); }; } // namespace PBD