Rename SearchPath class Searchpath
authorTim Mayberry <mojofunk@gmail.com>
Thu, 15 Aug 2013 10:04:08 +0000 (20:04 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Fri, 6 Sep 2013 04:31:11 +0000 (14:31 +1000)
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.

46 files changed:
gtk2_ardour/about.cc
gtk2_ardour/keyboard.cc
gtk2_ardour/missing_file_dialog.cc
gtk2_ardour/mixer_actor.cc
gtk2_ardour/step_entry.cc
gtk2_ardour/transcode_ffmpeg.cc
gtk2_ardour/utils.cc
gtk2_ardour/video_server_dialog.cc
gtk2_ardour/video_timeline.cc
libs/ardour/ardour/control_protocol_search_path.h
libs/ardour/ardour/export_formats_search_path.h
libs/ardour/ardour/export_profile_manager.h
libs/ardour/ardour/filesystem_paths.h
libs/ardour/ardour/ladspa_search_path.h
libs/ardour/ardour/lv2_bundled_search_path.h
libs/ardour/ardour/midi_patch_search_path.h
libs/ardour/ardour/panner_search_path.h
libs/ardour/control_protocol_manager.cc
libs/ardour/control_protocol_search_path.cc
libs/ardour/export_formats_search_path.cc
libs/ardour/filesystem_paths.cc
libs/ardour/globals.cc
libs/ardour/jack_utils.cc
libs/ardour/ladspa_search_path.cc
libs/ardour/lv2_bundled_search_path.cc
libs/ardour/midi_patch_manager.cc
libs/ardour/midi_patch_search_path.cc
libs/ardour/panner_manager.cc
libs/ardour/panner_search_path.cc
libs/ardour/plugin_manager.cc
libs/ardour/session.cc
libs/ardour/session_state.cc
libs/ardour/template_utils.cc
libs/ardour/test/plugins_test.cc
libs/ardour/test/resampled_source_test.cc
libs/ardour/test/test_common.cc
libs/ardour/test/test_common.h
libs/pbd/file_utils.cc
libs/pbd/pbd/file_utils.h
libs/pbd/pbd/search_path.h
libs/pbd/search_path.cc
libs/pbd/test/test_common.cc
libs/pbd/test/test_common.h
libs/surfaces/generic_midi/generic_midi_control_protocol.cc
libs/surfaces/mackie/device_info.cc
libs/surfaces/mackie/device_profile.cc

index b2dac673799fefa96c9499589106bc3a1f78f07c..b656c29ad8175fde37d430a630095338fe0c6e93 100644 (file)
 
 #include "i18n.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 using namespace Gtk;
 using namespace Gdk;
 using namespace std;
@@ -564,7 +560,7 @@ About::About ()
 
        std::string splash_file;
 
-       SearchPath spath(ardour_data_search_path());
+       Searchpath spath(ardour_data_search_path());
 
        if (find_file_in_search_path (spath, "splash.png", splash_file)) {
                set_logo (Gdk::Pixbuf::create_from_file (splash_file));
index 75a96ec98b3a0d4112cdd352cf798c8d58b7cd28..98ffab1160bb563fa2a2f5abf868062f6d10e281 100644 (file)
 
 #include "i18n.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 using namespace std;
 using namespace Gtk;
 using namespace PBD;
index b1e2081a1dace00aa27ab43a1efed747ca381da9..37868d55728569b4bdf159633e9fb7527f031e9f 100644 (file)
 #include "missing_file_dialog.h"
 #include "i18n.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 using namespace Gtk;
 using namespace std;
 using namespace ARDOUR;
index 8a90a3a1dd2e698882be2937d62584f872a838c8..d7a1149a4b29d6a5174522f97f3fee3119c8d344 100644 (file)
 
 #include "i18n.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 using namespace ARDOUR;
 using namespace Gtk;
 using namespace PBD;
index 27ec3b4059fafb06f30dfc4977ae2248dd19ee90..fd53fd55ff3704fb912c8514ab9a8f644389387a 100644 (file)
 
 #include "i18n.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 using namespace std;
 using namespace Gtk;
 using namespace Glib;
index 0a7bf64ecdaee452026d4decf425f47a0bbfdb40..08060b6a5174e0b7e1e7aab3bc763b84d38ab770 100644 (file)
 
 #include "i18n.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 using namespace PBD;
 using namespace VideoUtils;
 
@@ -55,7 +51,7 @@ TranscodeFfmpeg::TranscodeFfmpeg (std::string f)
 #endif
 
        std::string ff_file_path;
-       if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("ffmpeg_harvid"), ff_file_path)) { ffmpeg_exe = ff_file_path; }
+       if (find_file_in_search_path (Searchpath(Glib::getenv("PATH")), X_("ffmpeg_harvid"), ff_file_path)) { ffmpeg_exe = ff_file_path; }
        else if (Glib::file_test(X_("C:\\Program Files\\harvid\\ffmpeg.exe"), Glib::FILE_TEST_EXISTS)) {
                ffmpeg_exe = X_("C:\\Program Files\\ffmpeg\\ffmpeg.exe");
        }
@@ -63,7 +59,7 @@ TranscodeFfmpeg::TranscodeFfmpeg (std::string f)
                ffmpeg_exe = X_("C:\\Program Files\\ffmpeg\\ffmpeg.exe");
        }
 
-       if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("ffprobe_harvid"), ff_file_path)) { ffprobe_exe = ff_file_path; }
+       if (find_file_in_search_path (Searchpath(Glib::getenv("PATH")), X_("ffprobe_harvid"), ff_file_path)) { ffprobe_exe = ff_file_path; }
        else if (Glib::file_test(X_("C:\\Program Files\\harvid\\ffprobe.exe"), Glib::FILE_TEST_EXISTS)) {
                ffprobe_exe = X_("C:\\Program Files\\ffmpeg\\ffprobe.exe");
        }
index 557c86c3f616bd283ba47def095ce358feb5bbc5..93e4ee98c729106e75e4e111579b47685013f72f 100644 (file)
@@ -581,7 +581,7 @@ get_xpm (std::string name)
 {
        if (!xpm_map[name]) {
 
-               SearchPath spath(ARDOUR::ardour_data_search_path());
+               Searchpath spath(ARDOUR::ardour_data_search_path());
 
                spath.add_subdirectory_to_paths("pixmaps");
 
@@ -607,7 +607,7 @@ get_icon_path (const char* cname)
        string name = cname;
        name += X_(".png");
 
-       SearchPath spath(ARDOUR::ardour_data_search_path());
+       Searchpath spath(ARDOUR::ardour_data_search_path());
 
        spath.add_subdirectory_to_paths("icons");
 
index 7948908b87eff5413845edf79f70401bf675752f..eefd87a0679bfd730fc502e7060f41efcad22051 100644 (file)
 #include "utils_videotl.h"
 #include "i18n.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 using namespace Gtk;
 using namespace std;
 using namespace PBD;
@@ -88,7 +84,7 @@ VideoServerDialog::VideoServerDialog (Session* s)
        listenaddr_combo.set_active(0);
 
        std::string icsd_file_path;
-       if (find_file_in_search_path (PBD::SearchPath(Glib::getenv("PATH")), X_("harvid"), icsd_file_path)) {
+       if (find_file_in_search_path (PBD::Searchpath(Glib::getenv("PATH")), X_("harvid"), icsd_file_path)) {
                path_entry.set_text(icsd_file_path);
        }
        else if (Glib::file_test(X_("C:\\Program Files\\harvid\\harvid.exe"), Glib::FILE_TEST_EXISTS)) {
index 75f6150691cd9dc36c2c1b7938a2be6a6a90144b..bb7fc16723128a21b9576c395bb518a7f7d242f1 100644 (file)
@@ -719,7 +719,7 @@ VideoTimeLine::find_xjadeo () {
        std::string xjadeo_file_path;
        if (getenv("XJREMOTE")) {
                _xjadeo_bin = strdup(getenv("XJREMOTE")); // XXX TODO: free it?!
-       } else if (find_file_in_search_path (SearchPath(Glib::getenv("PATH")), X_("xjremote"), xjadeo_file_path)) {
+       } else if (find_file_in_search_path (Searchpath(Glib::getenv("PATH")), X_("xjremote"), xjadeo_file_path)) {
                _xjadeo_bin = xjadeo_file_path;
        }
        else if (Glib::file_test(X_("/Applications/Jadeo.app/Contents/MacOS/xjremote"), Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_EXECUTABLE)) {
index 8795f4501a64a9dd376db48924f751411389395d..4fe790ef80b6d2ade09605193c234ab50e1d3963 100644 (file)
 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
 
index 7b6fcea09b760107ee50a3c00e3f3c4ecaf0e325..771c6f9bd3246f6a1b33a9b8e9bb64e8ede541d5 100644 (file)
 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
 
index 114fb09647050b9b6f3353b6a4b805034133009b..77ace497c2d1f1375f2dae69160c888b5af0e33b 100644 (file)
 #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:
index 7c817e86a1255adab48e8aecbec32d135c53acdd..e77de1c00fd683d96829337e8e443dd5ac1a0c5a 100644 (file)
 
 #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
 
index 791bba9188c6ff5f278d1f8fa865b95573f9bf1d..bc184b52483692a84b02ed93772c47b0a6424a94 100644 (file)
 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
 
index f5780c5e0e6addee266f72f67e5659b36da60f7d..9314ee27d479f79b5c9b1dfb3ab827f56883a2d7 100644 (file)
 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
 
index 5d278234616d89b95fdf79654bd14f0592aa1247..168e75af4a8264c0337205857f6db0f5a7394be8 100644 (file)
 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
 
index 889b9efb236e50557574cb78aaa1f1c57f22e69e..23004223b4b193cebebfd96df754ca699930bc73 100644 (file)
 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
 
index 3ccc1f134b5ab808e5e37a35168d6dc57098e95a..06c9c72cb450afb7e74a13c73b4d968743299147 100644 (file)
 #include "ardour/debug.h"
 #include "ardour/control_protocol_manager.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 #include "ardour/control_protocol_search_path.h"
 
 
index 254cd03fe94c23fb9a91c4460d6b76d97ea4c706..c5c5d0ba00a3000f34f87a00d342192a411b7d14 100644 (file)
@@ -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;
 }
 
index cf18b14a1865bff1fa2f22d71828a51e726344e4..ffa096d33ac55d9fc4b1d364550fd538d8fbb817 100644 (file)
@@ -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;
index 8d48ea3068ec3458528f36bb1cd45002c53b609f..54f7508b659d92ce55b34410dcbbd1fb35b26f1b 100644 (file)
@@ -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
        }
 
index f4cc81a2607de06570e057e09ef7195a377e92c2..1406bbd43ac3eb225c68c51f934424acfbd14ce3 100644 (file)
@@ -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");
index f37473c4e74681d49a0f483fa190892010155a28..64e58bf60821ee6bb628300633f39877177b0c97 100644 (file)
@@ -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);
index 5ba7a1716734750a8fc290388a30a59468afa50a..49a2645f5d105ddc54acd714814075cc0155c3ab 100644 (file)
@@ -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);
index d8cd1c1075221ee7d95fdd178375aa250c318df6..2454ea2ae15d2965bb1a2ca4a62eb8f51bada8b0 100644 (file)
@@ -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;
index f3541a2e628d28e75a9c65346d581ce484645f72..f2d964bb77ba0acb2554a40401c5ea11ee76843e 100644 (file)
 #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;
 
index ccad1de4664c482cce83f8201dc39e7a3fa703a1..c099c379e94926d3ee65ec76c02e9f0baf3a01b1 100644 (file)
@@ -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;
index 4e4ad7fe4d43106597c8df94e67b3a210ff9817e..f757279d299b0c5b4183120647c91674577a71dc 100644 (file)
 #include "ardour/debug.h"
 #include "ardour/panner_manager.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 #include "ardour/panner_search_path.h"
 
 #include "i18n.h"
index 63802ffc4e7e113a3e717236ca9a94b7d87eb375..100c406edd6d37314c92054596f916ef5c2fe922 100644 (file)
@@ -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;
 }
 
index 8d4e6258767617cc3b427bf74fb042c3f2bad457..8d209cc78e29c936519a1b874036e13249ec7600 100644 (file)
 #include "ardour/plugin_manager.h"
 #include "ardour/rc_configuration.h"
 
-#ifdef SearchPath
-#undef SearchPath
-#endif
-
 #include "ardour/ladspa_search_path.h"
 
 #ifdef LV2_SUPPORT
index 9817f17069b6765a446ec1626b4298224963ddd6..428a5e52744b36e8df4e88472bceb8ff138faa92 100644 (file)
 
 #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;
        }
 
index 4837d8450ecfe2598df2ff3a061996f1a676e99d..9699a7c37fb2c714139e70efa721764017f33249 100644 (file)
@@ -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);
index faecdc6e6339bea1c9b17eeef93eb0dfb13c10e9..b912fdc446620a6630f352f5ef6337226ef9865b 100644 (file)
 #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);
 
index 362a56df7f7fe6d8fe520fb1c16ef1b23f2b12bd..0e4bddcda6aad82549e6dd78f8c1098710310fba 100644 (file)
@@ -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;
 
index 5aaf71b7aaf5b89da03a811d0388108274fcae4a..c8ef0f4a95b84cef5926b8278934c55a9af73f66 100644 (file)
@@ -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"
index 68039b289bc9e23ecf9d4679df11a384076423b8..5f802fbf5af8a4099c85c8b0117dcf802025bafe 100644 (file)
@@ -25,7 +25,7 @@
 
 using namespace std;
 
-PBD::SearchPath
+PBD::Searchpath
 test_search_path ()
 {
 #ifdef PLATFORM_WINDOWS
index 9e154587818b5428da33a70d64f986c21cd7b7bf..10bfdbc694d6e50f1ec80ded2d422db616098927 100644 (file)
@@ -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 ();
 
index 50287149e19fc6b30cd00ac54e7e0b981ee015c6..44254989c1bfbd227930aa9da8e206f1143ab6aa 100644 (file)
@@ -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)
 {
index 72696f6abdf40484d044e4235f15c4f43d960f58..4b4bdf073525e8e8dc02793093a1d1823fe8e122 100644 (file)
@@ -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);
 
index cc53dbebac606a4e06c3e5b2eedc5ffd498b3a9c..5e1bce9aa3545b5ee0fb6733ec7138687b4af7d3 100644 (file)
 #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:
 
index e56e22fee391a3f4c0d1c35be0178371b8c7ab05..ea08785f68ea24a5d36f4784fc6a65cbab568e64 100644 (file)
@@ -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 
index 397a69ad8c4c515dbf4038a33d4e557b4db4724e..6e099d2f3e7b95f727a2e8b5e104e8939e4ff647 100644 (file)
@@ -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
index 0dc62f61dc8c1838350907d144defe5f1552f699..825c01fecbbcb30affe1221ec813b708b5e22afe 100644 (file)
@@ -21,6 +21,6 @@
 
 #include "pbd/search_path.h"
 
-PBD::SearchPath test_search_path ();
+PBD::Searchpath test_search_path ();
 
 #endif
index cbba12e448e05745d49a4bc32f68a46d2597eab2..a8799944b3356f570bc70aad65f342beafcd1de7 100644 (file)
@@ -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);
index e983fe0eb0c76e727e083ebf34ec59d98ff3988a..04cbfecc56d64f0c0908dc058c5108bffa70419a 100644 (file)
@@ -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 ();
index 802354f1a4c0b19a1a727fc184166839753e1dae..ddbb4782db779d5168a2744ad22a56683c768b93 100644 (file)
@@ -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 ();