diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2013-08-15 20:04:08 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2013-09-06 14:31:11 +1000 |
commit | 8ddd12a60d08d895cb5400013cdda2e893fb81bb (patch) | |
tree | 84c0082083295835e33c38c12acc5e21cb9b7c7e /libs | |
parent | e6c7ecf0e369ba886a7dc57a195226921f0f11f1 (diff) |
Rename SearchPath class Searchpath
Windows headers define SearchPath which means we have to undefine it
where necessary. This is a pain and can be tricksy, so I feel renaming
the class slightly is the easiest solution.
Diffstat (limited to 'libs')
37 files changed, 118 insertions, 154 deletions
diff --git a/libs/ardour/ardour/control_protocol_search_path.h b/libs/ardour/ardour/control_protocol_search_path.h index 8795f4501a..4fe790ef80 100644 --- a/libs/ardour/ardour/control_protocol_search_path.h +++ b/libs/ardour/ardour/control_protocol_search_path.h @@ -25,15 +25,15 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * control surface plugins. * - * If ARDOUR_SURFACES_PATH is defined then the SearchPath returned + * If ARDOUR_SURFACES_PATH is defined then the Searchpath returned * will contain only those directories specified in it, otherwise it will * contain the user and system directories which may contain control * surface plugins. */ - PBD::SearchPath control_protocol_search_path (); + PBD::Searchpath control_protocol_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/export_formats_search_path.h b/libs/ardour/ardour/export_formats_search_path.h index 7b6fcea09b..771c6f9bd3 100644 --- a/libs/ardour/ardour/export_formats_search_path.h +++ b/libs/ardour/ardour/export_formats_search_path.h @@ -24,10 +24,10 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * export_formats. */ - PBD::SearchPath export_formats_search_path (); + PBD::Searchpath export_formats_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h index 114fb09647..77ace497c2 100644 --- a/libs/ardour/ardour/export_profile_manager.h +++ b/libs/ardour/ardour/export_profile_manager.h @@ -38,10 +38,6 @@ #include "ardour/types.h" #include "ardour/export_handler.h" -#ifdef SearchPath -#undef SearchPath -#endif - namespace ARDOUR { @@ -106,7 +102,7 @@ class ExportProfileManager std::vector<std::string> find_file (std::string const & pattern); std::string export_config_dir; - PBD::SearchPath search_path; + PBD::Searchpath search_path; /* Timespans */ public: diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h index 7c817e86a1..e77de1c00f 100644 --- a/libs/ardour/ardour/filesystem_paths.h +++ b/libs/ardour/ardour/filesystem_paths.h @@ -22,10 +22,6 @@ #include "pbd/search_path.h" -#ifdef SearchPath -#undef SearchPath -#endif - namespace ARDOUR { /** @@ -45,14 +41,14 @@ namespace ARDOUR { * @return the search path to be used when looking for per-system * configuration files. This may include user configuration files. */ - PBD::SearchPath ardour_config_search_path (); + PBD::Searchpath ardour_config_search_path (); /** * @return the search path to be used when looking for data files * that could be shared by systems (h/w and configuration independent * files, such as icons, XML files, etc) */ - PBD::SearchPath ardour_data_search_path (); + PBD::Searchpath ardour_data_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/ladspa_search_path.h b/libs/ardour/ardour/ladspa_search_path.h index 791bba9188..bc184b5248 100644 --- a/libs/ardour/ardour/ladspa_search_path.h +++ b/libs/ardour/ardour/ladspa_search_path.h @@ -25,14 +25,14 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * LADSPA plugins. * - * If LADSPA_PATH is defined then the SearchPath returned + * If LADSPA_PATH is defined then the Searchpath returned * will contain the directories specified in it as well as the * user and system directories. */ - PBD::SearchPath ladspa_search_path (); + PBD::Searchpath ladspa_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/lv2_bundled_search_path.h b/libs/ardour/ardour/lv2_bundled_search_path.h index f5780c5e0e..9314ee27d4 100644 --- a/libs/ardour/ardour/lv2_bundled_search_path.h +++ b/libs/ardour/ardour/lv2_bundled_search_path.h @@ -25,10 +25,10 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * lv2 plugins. */ - PBD::SearchPath lv2_bundled_search_path (); + PBD::Searchpath lv2_bundled_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/midi_patch_search_path.h b/libs/ardour/ardour/midi_patch_search_path.h index 5d27823461..168e75af4a 100644 --- a/libs/ardour/ardour/midi_patch_search_path.h +++ b/libs/ardour/ardour/midi_patch_search_path.h @@ -24,15 +24,15 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * MIDI patch files ("*.midnam") aka MIDNAM files * - * If ARDOUR_MIDI_PATCH_PATH is defined then the SearchPath returned + * If ARDOUR_MIDI_PATCH_PATH is defined then the Searchpath returned * will contain only those directories specified in it, otherwise it will * contain the user and system directories which may contain control * surface plugins. */ - PBD::SearchPath midi_patch_search_path (); + PBD::Searchpath midi_patch_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/panner_search_path.h b/libs/ardour/ardour/panner_search_path.h index 889b9efb23..23004223b4 100644 --- a/libs/ardour/ardour/panner_search_path.h +++ b/libs/ardour/ardour/panner_search_path.h @@ -24,15 +24,15 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * panner plugins. * - * If ARDOUR_PANNER_PATH is defined then the SearchPath returned + * If ARDOUR_PANNER_PATH is defined then the Searchpath returned * will contain only those directories specified in it, otherwise it will * contain the user and system directories which may contain control * surface plugins. */ - PBD::SearchPath panner_search_path (); + PBD::Searchpath panner_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 3ccc1f134b..06c9c72cb4 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -30,10 +30,6 @@ #include "ardour/debug.h" #include "ardour/control_protocol_manager.h" -#ifdef SearchPath -#undef SearchPath -#endif - #include "ardour/control_protocol_search_path.h" diff --git a/libs/ardour/control_protocol_search_path.cc b/libs/ardour/control_protocol_search_path.cc index 254cd03fe9..c5c5d0ba00 100644 --- a/libs/ardour/control_protocol_search_path.cc +++ b/libs/ardour/control_protocol_search_path.cc @@ -33,14 +33,14 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath control_protocol_search_path () { - SearchPath spath(user_config_directory ()); + Searchpath spath(user_config_directory ()); spath += ardour_dll_directory (); spath.add_subdirectory_to_paths (surfaces_dir_name); - spath += SearchPath(Glib::getenv(surfaces_env_variable_name)); + spath += Searchpath(Glib::getenv(surfaces_env_variable_name)); return spath; } diff --git a/libs/ardour/export_formats_search_path.cc b/libs/ardour/export_formats_search_path.cc index cf18b14a18..ffa096d33a 100644 --- a/libs/ardour/export_formats_search_path.cc +++ b/libs/ardour/export_formats_search_path.cc @@ -32,14 +32,14 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath export_formats_search_path () { - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths (export_formats_dir_name); bool export_formats_path_defined = false; - SearchPath spath_env (Glib::getenv(export_env_variable_name, export_formats_path_defined)); + Searchpath spath_env (Glib::getenv(export_env_variable_name, export_formats_path_defined)); if (export_formats_path_defined) { spath += spath_env; diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index 8d48ea3068..54f7508b65 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -101,7 +101,7 @@ ardour_dll_directory () } #ifdef PLATFORM_WINDOWS -SearchPath +Searchpath windows_search_path () { std::string dll_dir_path(g_win32_get_package_installation_directory_of_module(NULL)); @@ -110,10 +110,10 @@ windows_search_path () } #endif -SearchPath +Searchpath ardour_config_search_path () { - static SearchPath search_path; + static Searchpath search_path; if (search_path.empty()) { search_path += user_config_directory(); @@ -126,17 +126,17 @@ ardour_config_search_path () ::exit (1); } - search_path += SearchPath (s); + search_path += Searchpath (s); #endif } return search_path; } -SearchPath +Searchpath ardour_data_search_path () { - static SearchPath search_path; + static Searchpath search_path; if (search_path.empty()) { search_path += user_config_directory(); @@ -149,7 +149,7 @@ ardour_data_search_path () ::exit (1); } - search_path += SearchPath (s); + search_path += Searchpath (s); #endif } diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index f4cc81a260..1406bbd43a 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -388,7 +388,7 @@ void ARDOUR::find_bindings_files (map<string,string>& files) { vector<std::string> found; - SearchPath spath = ardour_config_search_path(); + Searchpath spath = ardour_config_search_path(); if (getenv ("ARDOUR_SAE")) { Glib::PatternSpec pattern("*SAE-*.bindings"); diff --git a/libs/ardour/jack_utils.cc b/libs/ardour/jack_utils.cc index f37473c4e7..64e58bf608 100644 --- a/libs/ardour/jack_utils.cc +++ b/libs/ardour/jack_utils.cc @@ -584,7 +584,7 @@ ARDOUR::set_path_env_for_jack_autostart (const vector<std::string>& dirs) #ifdef __APPLE__ // push it back into the environment so that auto-started JACK can find it. // XXX why can't we just expect OS X users to have PATH set correctly? we can't ... - setenv ("PATH", SearchPath(dirs).to_string().c_str(), 1); + setenv ("PATH", Searchpath(dirs).to_string().c_str(), 1); #else (void) dirs; #endif @@ -606,7 +606,7 @@ ARDOUR::get_jack_server_dir_paths (vector<std::string>& server_dir_paths) server_dir_paths.push_back (Glib::path_get_dirname (execpath)); #endif - SearchPath sp(string(g_getenv("PATH"))); + Searchpath sp(string(g_getenv("PATH"))); #ifdef PLATFORM_WINDOWS gchar *install_dir = g_win32_get_package_installation_directory_of_module (NULL); diff --git a/libs/ardour/ladspa_search_path.cc b/libs/ardour/ladspa_search_path.cc index 5ba7a17167..49a2645f5d 100644 --- a/libs/ardour/ladspa_search_path.cc +++ b/libs/ardour/ladspa_search_path.cc @@ -33,12 +33,12 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath ladspa_search_path () { - SearchPath spath_env (Glib::getenv(ladspa_env_variable_name)); + Searchpath spath_env (Glib::getenv(ladspa_env_variable_name)); - SearchPath spath (user_config_directory ()); + Searchpath spath (user_config_directory ()); spath += ardour_dll_directory (); spath.add_subdirectory_to_paths (ladspa_dir_name); diff --git a/libs/ardour/lv2_bundled_search_path.cc b/libs/ardour/lv2_bundled_search_path.cc index d8cd1c1075..2454ea2ae1 100644 --- a/libs/ardour/lv2_bundled_search_path.cc +++ b/libs/ardour/lv2_bundled_search_path.cc @@ -29,10 +29,10 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath lv2_bundled_search_path () { - SearchPath spath( ardour_dll_directory () ); + Searchpath spath( ardour_dll_directory () ); spath.add_subdirectory_to_paths ("LV2"); return spath; diff --git a/libs/ardour/midi_patch_manager.cc b/libs/ardour/midi_patch_manager.cc index f3541a2e62..f2d964bb77 100644 --- a/libs/ardour/midi_patch_manager.cc +++ b/libs/ardour/midi_patch_manager.cc @@ -29,10 +29,6 @@ #include "ardour/session_directory.h" #include "ardour/midi_patch_manager.h" -#ifdef SearchPath -#undef SearchPath -#endif - #include "ardour/midi_patch_search_path.h" #include "i18n.h" @@ -107,7 +103,7 @@ MidiPatchManager::refresh() _master_devices_by_model.clear(); _all_models.clear(); - SearchPath search_path = midi_patch_search_path (); + Searchpath search_path = midi_patch_search_path (); Glib::PatternSpec pattern (string("*.midnam")); vector<std::string> result; diff --git a/libs/ardour/midi_patch_search_path.cc b/libs/ardour/midi_patch_search_path.cc index ccad1de466..c099c379e9 100644 --- a/libs/ardour/midi_patch_search_path.cc +++ b/libs/ardour/midi_patch_search_path.cc @@ -31,14 +31,14 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath midi_patch_search_path () { - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(midi_patch_dir_name); bool midi_patch_path_defined = false; - SearchPath spath_env (Glib::getenv(midi_patch_env_variable_name, midi_patch_path_defined)); + Searchpath spath_env (Glib::getenv(midi_patch_env_variable_name, midi_patch_path_defined)); if (midi_patch_path_defined) { spath += spath_env; diff --git a/libs/ardour/panner_manager.cc b/libs/ardour/panner_manager.cc index 4e4ad7fe4d..f757279d29 100644 --- a/libs/ardour/panner_manager.cc +++ b/libs/ardour/panner_manager.cc @@ -29,10 +29,6 @@ #include "ardour/debug.h" #include "ardour/panner_manager.h" -#ifdef SearchPath -#undef SearchPath -#endif - #include "ardour/panner_search_path.h" #include "i18n.h" diff --git a/libs/ardour/panner_search_path.cc b/libs/ardour/panner_search_path.cc index 63802ffc4e..100c406edd 100644 --- a/libs/ardour/panner_search_path.cc +++ b/libs/ardour/panner_search_path.cc @@ -31,14 +31,14 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath panner_search_path () { - SearchPath spath(user_config_directory ()); + Searchpath spath(user_config_directory ()); spath += ardour_dll_directory (); spath.add_subdirectory_to_paths(panner_dir_name); - spath += SearchPath(Glib::getenv(panner_env_variable_name)); + spath += Searchpath(Glib::getenv(panner_env_variable_name)); return spath; } diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 8d4e625876..8d209cc78e 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -59,10 +59,6 @@ #include "ardour/plugin_manager.h" #include "ardour/rc_configuration.h" -#ifdef SearchPath -#undef SearchPath -#endif - #include "ardour/ladspa_search_path.h" #ifdef LV2_SUPPORT diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 9817f17069..428a5e5274 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -94,10 +94,6 @@ #include "i18n.h" -#ifdef SearchPath -#undef SearchPath -#endif - namespace ARDOUR { class MidiSource; class Processor; @@ -4434,7 +4430,7 @@ Session::end_time_changed (framepos_t old) std::vector<std::string> Session::source_search_path (DataType type) const { - SearchPath sp; + Searchpath sp; if (session_dirs.size() == 1) { switch (type) { @@ -4472,10 +4468,10 @@ Session::source_search_path (DataType type) const switch (type) { case DataType::AUDIO: - sp += SearchPath(config.get_audio_search_path ()); + sp += Searchpath(config.get_audio_search_path ()); break; case DataType::MIDI: - sp += SearchPath(config.get_midi_search_path ()); + sp += Searchpath(config.get_midi_search_path ()); break; } @@ -4485,7 +4481,7 @@ Session::source_search_path (DataType type) const void Session::ensure_search_path_includes (const string& path, DataType type) { - SearchPath sp; + Searchpath sp; if (path == ".") { return; @@ -4493,10 +4489,10 @@ Session::ensure_search_path_includes (const string& path, DataType type) switch (type) { case DataType::AUDIO: - sp += SearchPath(config.get_audio_search_path ()); + sp += Searchpath(config.get_audio_search_path ()); break; case DataType::MIDI: - sp += SearchPath (config.get_midi_search_path ()); + sp += Searchpath (config.get_midi_search_path ()); break; } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 4837d8450e..9699a7c37f 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -384,7 +384,7 @@ Session::second_stage_init () string Session::raid_path () const { - SearchPath raid_search_path; + Searchpath raid_search_path; for (vector<space_and_path>::const_iterator i = session_dirs.begin(); i != session_dirs.end(); ++i) { raid_search_path += (*i).path; @@ -405,11 +405,11 @@ Session::setup_raid_path (string path) session_dirs.clear (); - SearchPath search_path(path); - SearchPath sound_search_path; - SearchPath midi_search_path; + Searchpath search_path(path); + Searchpath sound_search_path; + Searchpath midi_search_path; - for (SearchPath::const_iterator i = search_path.begin(); i != search_path.end(); ++i) { + for (Searchpath::const_iterator i = search_path.begin(); i != search_path.end(); ++i) { sp.path = *i; sp.blocks = 0; // not needed session_dirs.push_back (sp); diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index faecdc6e63..b912fdc446 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -32,27 +32,23 @@ #include "ardour/filename_extensions.h" #include "ardour/io.h" -#ifdef SearchPath -#undef SearchPath -#endif - using namespace std; using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath template_search_path () { - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(templates_dir_name); return spath; } -SearchPath +Searchpath route_template_search_path () { - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(route_templates_dir_name); return spath; } @@ -101,7 +97,7 @@ find_session_templates (vector<TemplateInfo>& template_names) { vector<string *> *templates; PathScanner scanner; - SearchPath spath (template_search_path()); + Searchpath spath (template_search_path()); templates = scanner (spath.to_string(), template_filter, 0, true, true); @@ -137,7 +133,7 @@ find_route_templates (vector<TemplateInfo>& template_names) { vector<string *> *templates; PathScanner scanner; - SearchPath spath (route_template_search_path()); + Searchpath spath (route_template_search_path()); templates = scanner (spath.to_string(), route_template_filter, 0, false, true); diff --git a/libs/ardour/test/plugins_test.cc b/libs/ardour/test/plugins_test.cc index 362a56df7f..0e4bddcda6 100644 --- a/libs/ardour/test/plugins_test.cc +++ b/libs/ardour/test/plugins_test.cc @@ -32,7 +32,7 @@ PluginsTest::test () pm.refresh (); - SearchPath ladspa_paths(ladspa_search_path ()); + Searchpath ladspa_paths(ladspa_search_path ()); cout << "Number of Ladspa paths found: " << ladspa_paths.size () << endl; diff --git a/libs/ardour/test/resampled_source_test.cc b/libs/ardour/test/resampled_source_test.cc index 5aaf71b7aa..c8ef0f4a95 100644 --- a/libs/ardour/test/resampled_source_test.cc +++ b/libs/ardour/test/resampled_source_test.cc @@ -1,4 +1,4 @@ -// this is included first to avoid SearchPath definition on windows +// this is included first to avoid Searchpath definition on windows #include "test_common.h" #include "pbd/file_utils.h" diff --git a/libs/ardour/test/test_common.cc b/libs/ardour/test/test_common.cc index 68039b289b..5f802fbf5a 100644 --- a/libs/ardour/test/test_common.cc +++ b/libs/ardour/test/test_common.cc @@ -25,7 +25,7 @@ using namespace std; -PBD::SearchPath +PBD::Searchpath test_search_path () { #ifdef PLATFORM_WINDOWS diff --git a/libs/ardour/test/test_common.h b/libs/ardour/test/test_common.h index 9e15458781..10bfdbc694 100644 --- a/libs/ardour/test/test_common.h +++ b/libs/ardour/test/test_common.h @@ -21,7 +21,7 @@ #include "pbd/search_path.h" -PBD::SearchPath test_search_path (); +PBD::Searchpath test_search_path (); std::string new_test_output_dir (); diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc index 50287149e1..44254989c1 100644 --- a/libs/pbd/file_utils.cc +++ b/libs/pbd/file_utils.cc @@ -104,7 +104,7 @@ find_matching_files_in_directories (const vector<std::string>& paths, } void -find_matching_files_in_search_path (const SearchPath& search_path, +find_matching_files_in_search_path (const Searchpath& search_path, const Glib::PatternSpec& pattern, vector<std::string>& result) { @@ -112,7 +112,7 @@ find_matching_files_in_search_path (const SearchPath& search_path, } bool -find_file_in_search_path(const SearchPath& search_path, +find_file_in_search_path(const Searchpath& search_path, const string& filename, std::string& result) { diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index 72696f6abd..4b4bdf0735 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -68,15 +68,15 @@ find_matching_files_in_directories (const std::vector<std::string>& directory_pa std::vector<std::string>& result); /** - * Takes a SearchPath and puts a list of all the files in the search path + * Takes a Searchpath and puts a list of all the files in the search path * that match pattern into the result vector. * - * @param search_path A SearchPath + * @param search_path A Searchpath * @param pattern A Glib::PatternSpec used to match the files * @param result A vector in which to place the resulting matches. */ void -find_matching_files_in_search_path (const SearchPath& search_path, +find_matching_files_in_search_path (const Searchpath& search_path, const Glib::PatternSpec& pattern, std::vector<std::string>& result); @@ -87,7 +87,7 @@ find_matching_files_in_search_path (const SearchPath& search_path, * @return true If file is found within the search path. */ bool -find_file_in_search_path (const SearchPath& search_path, +find_file_in_search_path (const Searchpath& search_path, const std::string& filename, std::string& result); diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h index cc53dbebac..5e1bce9aa3 100644 --- a/libs/pbd/pbd/search_path.h +++ b/libs/pbd/pbd/search_path.h @@ -20,36 +20,32 @@ #ifndef PBD_SEARCH_PATH_INCLUDED #define PBD_SEARCH_PATH_INCLUDED -#ifdef SearchPath -#undef SearchPath -#endif - #include <string> #include <vector> namespace PBD { /** - * @class SearchPath + * @class Searchpath * - * The SearchPath class is a helper class for getting a + * 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 + * The Searchpath class does not test whether the paths exist * or are directories. It is basically just a container. */ -class SearchPath : public std::vector<std::string> +class Searchpath : public std::vector<std::string> { public: /** - * Create an empty SearchPath. + * Create an empty Searchpath. */ - SearchPath (); + Searchpath (); /** - * Initialize SearchPath from a string where the string contains + * 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. @@ -59,15 +55,15 @@ public: * * @param search_path A path string. */ - SearchPath (const std::string& search_path); + Searchpath (const std::string& search_path); /** - * Initialize SearchPath from a vector of paths that may or may + * Initialize Searchpath from a vector of paths that may or may * not exist. * * @param paths A vector of paths. */ - SearchPath (const std::vector<std::string>& paths); + Searchpath (const std::vector<std::string>& paths); /** * @return a search path string. @@ -80,29 +76,29 @@ public: /** * Add all the directories in path to this. */ - SearchPath& operator+= (const SearchPath& spath); + Searchpath& operator+= (const Searchpath& spath); /** * Add another directory path to the search path. */ - SearchPath& operator+= (const std::string& directory_path); + Searchpath& operator+= (const std::string& directory_path); /** - * Concatenate another SearchPath onto this. + * Concatenate another Searchpath onto this. */ - SearchPath& operator+ (const SearchPath& other); + Searchpath& operator+ (const Searchpath& other); /** * Add another path to the search path. */ - SearchPath& operator+ (const std::string& directory_path); + Searchpath& operator+ (const std::string& directory_path); /** * Add a sub-directory to each path in the search path. * @param subdir The directory name, it should not contain * any path separating tokens. */ - SearchPath& add_subdirectory_to_paths (const std::string& subdir); + Searchpath& add_subdirectory_to_paths (const std::string& subdir); protected: diff --git a/libs/pbd/search_path.cc b/libs/pbd/search_path.cc index e56e22fee3..ea08785f68 100644 --- a/libs/pbd/search_path.cc +++ b/libs/pbd/search_path.cc @@ -37,12 +37,12 @@ const char * const path_delimiter = ":"; namespace PBD { -SearchPath::SearchPath () +Searchpath::Searchpath () { } -SearchPath::SearchPath (const string& path) +Searchpath::Searchpath (const string& path) { vector<std::string> tmp; @@ -51,13 +51,13 @@ SearchPath::SearchPath (const string& path) } } -SearchPath::SearchPath (const vector<std::string>& paths) +Searchpath::Searchpath (const vector<std::string>& paths) { add_directories (paths); } void -SearchPath::add_directory (const std::string& directory_path) +Searchpath::add_directory (const std::string& directory_path) { if (!directory_path.empty()) { push_back(directory_path); @@ -65,7 +65,7 @@ SearchPath::add_directory (const std::string& directory_path) } void -SearchPath::add_directories (const vector<std::string>& paths) +Searchpath::add_directories (const vector<std::string>& paths) { for(vector<std::string>::const_iterator i = paths.begin(); i != paths.end(); ++i) { add_directory (*i); @@ -73,7 +73,7 @@ SearchPath::add_directories (const vector<std::string>& paths) } const string -SearchPath::to_string () const +Searchpath::to_string () const { string path; @@ -87,37 +87,37 @@ SearchPath::to_string () const return path; } -SearchPath& -SearchPath::operator+= (const SearchPath& spath) +Searchpath& +Searchpath::operator+= (const Searchpath& spath) { insert(end(), spath.begin(), spath.end()); return *this; } -SearchPath& -SearchPath::operator+= (const std::string& directory_path) +Searchpath& +Searchpath::operator+= (const std::string& directory_path) { add_directory (directory_path); return *this; } -SearchPath& -SearchPath::operator+ (const std::string& directory_path) +Searchpath& +Searchpath::operator+ (const std::string& directory_path) { add_directory (directory_path); return *this; } -SearchPath& -SearchPath::operator+ (const SearchPath& spath) +Searchpath& +Searchpath::operator+ (const Searchpath& spath) { - // concatenate paths into new SearchPath + // concatenate paths into new Searchpath insert(end(), spath.begin(), spath.end()); return *this; } -SearchPath& -SearchPath::add_subdirectory_to_paths (const string& subdir) +Searchpath& +Searchpath::add_subdirectory_to_paths (const string& subdir) { for (vector<std::string>::iterator i = begin(); i != end(); ++i) { // should these new paths just be added to the end of diff --git a/libs/pbd/test/test_common.cc b/libs/pbd/test/test_common.cc index 397a69ad8c..6e099d2f3e 100644 --- a/libs/pbd/test/test_common.cc +++ b/libs/pbd/test/test_common.cc @@ -25,7 +25,7 @@ * in an installed location on windows or by setting an environment variable * on unix. */ -PBD::SearchPath +PBD::Searchpath test_search_path () { #ifdef PLATFORM_WINDOWS diff --git a/libs/pbd/test/test_common.h b/libs/pbd/test/test_common.h index 0dc62f61dc..825c01fecb 100644 --- a/libs/pbd/test/test_common.h +++ b/libs/pbd/test/test_common.h @@ -21,6 +21,6 @@ #include "pbd/search_path.h" -PBD::SearchPath test_search_path (); +PBD::Searchpath test_search_path (); #endif diff --git a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc index cbba12e448..a8799944b3 100644 --- a/libs/surfaces/generic_midi/generic_midi_control_protocol.cc +++ b/libs/surfaces/generic_midi/generic_midi_control_protocol.cc @@ -106,7 +106,7 @@ static const char * const midimap_env_variable_name = "ARDOUR_MIDIMAPS_PATH"; static const char* const midi_map_dir_name = "midi_maps"; static const char* const midi_map_suffix = ".map"; -SearchPath +Searchpath system_midi_map_search_path () { bool midimap_path_defined = false; @@ -116,7 +116,7 @@ system_midi_map_search_path () return spath_env; } - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(midi_map_dir_name); return spath; } @@ -139,7 +139,7 @@ GenericMidiControlProtocol::reload_maps () { vector<string *> *midi_maps; PathScanner scanner; - SearchPath spath (system_midi_map_search_path()); + Searchpath spath (system_midi_map_search_path()); spath += user_midi_map_directory (); midi_maps = scanner (spath.to_string(), midi_map_filter, 0, false, true); diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc index e983fe0eb0..04cbfecc56 100644 --- a/libs/surfaces/mackie/device_info.cc +++ b/libs/surfaces/mackie/device_info.cc @@ -442,7 +442,7 @@ static const char * const devinfo_env_variable_name = "ARDOUR_MCP_PATH"; static const char* const devinfo_dir_name = "mcp"; static const char* const devinfo_suffix = ".device"; -static SearchPath +static Searchpath devinfo_search_path () { bool devinfo_path_defined = false; @@ -452,7 +452,7 @@ devinfo_search_path () return spath_env; } - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(devinfo_dir_name); return spath; @@ -472,7 +472,7 @@ DeviceInfo::reload_device_info () vector<string> s; vector<string *> *devinfos; PathScanner scanner; - SearchPath spath (devinfo_search_path()); + Searchpath spath (devinfo_search_path()); devinfos = scanner (spath.to_string(), devinfo_filter, 0, false, true); device_info.clear (); diff --git a/libs/surfaces/mackie/device_profile.cc b/libs/surfaces/mackie/device_profile.cc index 802354f1a4..ddbb4782db 100644 --- a/libs/surfaces/mackie/device_profile.cc +++ b/libs/surfaces/mackie/device_profile.cc @@ -55,7 +55,7 @@ static const char * const devprofile_env_variable_name = "ARDOUR_MCP_PATH"; static const char* const devprofile_dir_name = "mcp"; static const char* const devprofile_suffix = ".profile"; -static SearchPath +static Searchpath devprofile_search_path () { bool devprofile_path_defined = false; @@ -65,7 +65,7 @@ devprofile_search_path () return spath_env; } - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(devprofile_dir_name); return spath; @@ -91,7 +91,7 @@ DeviceProfile::reload_device_profiles () vector<string> s; vector<string *> *devprofiles; PathScanner scanner; - SearchPath spath (devprofile_search_path()); + Searchpath spath (devprofile_search_path()); devprofiles = scanner (spath.to_string(), devprofile_filter, 0, false, true); device_profiles.clear (); |