Ardour
9.0-pre0-822-g12e3bc5c20
|
#include <search_path.h>
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.
The Searchpath class does not test whether the paths exist or are directories. It is basically just a container.
Definition at line 44 of file search_path.h.
LIBPBD_TEMPLATE_MEMBER_API PBD::Searchpath::Searchpath | ( | ) |
Create an empty Searchpath.
LIBPBD_TEMPLATE_MEMBER_API PBD::Searchpath::Searchpath | ( | const std::string & | search_path | ) |
Initialize Searchpath from a string where the string contains one or more absolute paths to directories which are delimited by a path separation character. The path delimeter is a colon(:) on unix and a semi-colon(;) on windows.
Each path contained in the search path may or may not resolve to an existing directory in the filesystem.
search_path | A path string. |
LIBPBD_TEMPLATE_MEMBER_API PBD::Searchpath::Searchpath | ( | const std::vector< std::string > & | paths | ) |
Initialize Searchpath from a vector of paths that may or may not exist.
paths | A vector of paths. |
|
inline |
Definition at line 73 of file search_path.h.
LIBPBD_TEMPLATE_MEMBER_API void PBD::Searchpath::add_directories | ( | const std::vector< std::string > & | paths | ) |
Add directories in paths to this Searchpath.
LIBPBD_TEMPLATE_MEMBER_API void PBD::Searchpath::add_directory | ( | const std::string & | directory_path | ) |
Add directory_path to this Searchpath.
LIBPBD_TEMPLATE_MEMBER_API Searchpath& PBD::Searchpath::add_subdirectory_to_paths | ( | const std::string & | subdir | ) |
Add a sub-directory to each path in the search path.
subdir | The directory name, it should not contain any path separating tokens. |
LIBPBD_TEMPLATE_MEMBER_API bool PBD::Searchpath::contains | ( | const std::string & | path | ) | const |
LIBPBD_TEMPLATE_MEMBER_API const Searchpath PBD::Searchpath::operator+ | ( | const Searchpath & | other | ) |
Concatenate another Searchpath onto this.
LIBPBD_TEMPLATE_MEMBER_API const Searchpath PBD::Searchpath::operator+ | ( | const std::string & | directory_path | ) |
Add another path to the search path.
LIBPBD_TEMPLATE_MEMBER_API Searchpath& PBD::Searchpath::operator+= | ( | const Searchpath & | spath | ) |
Add all the directories in path to this.
LIBPBD_TEMPLATE_MEMBER_API Searchpath& PBD::Searchpath::operator+= | ( | const std::string & | directory_path | ) |
Add another directory path to the search path.
LIBPBD_TEMPLATE_MEMBER_API Searchpath& PBD::Searchpath::operator-= | ( | const Searchpath & | spath | ) |
Remove all the directories in path from this.
LIBPBD_TEMPLATE_MEMBER_API Searchpath& PBD::Searchpath::operator-= | ( | const std::string & | directory_path | ) |
Remove a directory path from the search path.
LIBPBD_TEMPLATE_MEMBER_API void PBD::Searchpath::remove_directories | ( | const std::vector< std::string > & | paths | ) |
Remove all the directories in paths from this Searchpath.
LIBPBD_TEMPLATE_MEMBER_API void PBD::Searchpath::remove_directory | ( | const std::string & | directory_path | ) |
Remove directory_path from this Searchpath.
LIBPBD_TEMPLATE_MEMBER_API const std::string PBD::Searchpath::to_string | ( | ) | const |
The string that is returned contains the platform specific path separator.