From: Carl Hetherington Date: Tue, 12 May 2009 17:03:42 +0000 (+0000) Subject: Remove most using declarations from header files. X-Git-Tag: 3.0-alpha5~3448 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=3b89d9eaa03406a5e03648f47734211f09b89d62 Remove most using declarations from header files. git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf --- diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc index c3d238a9c0..7c78677d3e 100644 --- a/gtk2_ardour/ardour_dialog.cc +++ b/gtk2_ardour/ardour_dialog.cc @@ -29,6 +29,7 @@ #include "public_editor.h" #include "utils.h" +using namespace std; using namespace sigc; using namespace Gtk; diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 370f1ff701..b8478d222a 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2325,7 +2325,7 @@ ARDOUR_UI::get_session_parameters (bool should_be_new) if (likely_new) { - ustring existing = Glib::build_filename (session_path, session_name); + Glib::ustring existing = Glib::build_filename (session_path, session_name); if (!ask_about_loading_existing_session (existing)) { ARDOUR_COMMAND_LINE::session_name = ""; // cancel that diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index f87e007ddd..81e0e0da5c 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -156,8 +156,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI int unload_session (bool hide_stuff = false); void close_session(); - int save_state_canfail (string state_name = ""); - void save_state (const string & state_name = ""); + int save_state_canfail (std::string state_name = ""); + void save_state (const std::string & state_name = ""); static double gain_to_slider_position (ARDOUR::gain_t g); static ARDOUR::gain_t slider_position_to_gain (double pos); @@ -185,7 +185,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI static sigc::signal SuperRapidScreenUpdate; static sigc::signal Clock; - void name_io_setup (ARDOUR::AudioEngine&, string&, ARDOUR::IO& io, bool in); + void name_io_setup (ARDOUR::AudioEngine&, std::string&, ARDOUR::IO& io, bool in); XMLNode* editor_settings() const; XMLNode* mixer_settings () const; @@ -283,7 +283,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI void startup (); void shutdown (); - int ask_about_saving_session (const string & why); + int ask_about_saving_session (const std::string & why); /* periodic safety backup, to be precise */ gint autosave_session(); @@ -483,7 +483,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col); struct RecentSessionsSorter { - bool operator() (std::pair a, std::pair b) const { + bool operator() (std::pair a, std::pair b) const { return cmp_nocase(a.first, b.first) == -1; } }; @@ -627,7 +627,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI Gtk::MenuItem *cleanup_item; - void display_cleanup_results (ARDOUR::Session::cleanup_report& rep, const gchar* list_title, const string & msg); + void display_cleanup_results (ARDOUR::Session::cleanup_report& rep, const gchar* list_title, const std::string & msg); void cleanup (); void flush_trash (); diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index df44b3a4aa..86ddbeff83 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -56,6 +56,7 @@ #define MUTED_ALPHA 10 +using namespace std; using namespace sigc; using namespace ARDOUR; using namespace PBD; diff --git a/gtk2_ardour/audio_region_view.h b/gtk2_ardour/audio_region_view.h index 7c40a5a4e5..33d7c2ac1e 100644 --- a/gtk2_ardour/audio_region_view.h +++ b/gtk2_ardour/audio_region_view.h @@ -125,8 +125,8 @@ class AudioRegionView : public RegionView WaveformLogScaled = 0x10, }; - vector waves; - vector tmp_waves; ///< see ::create_waves() + std::vector waves; + std::vector tmp_waves; ///< see ::create_waves() ArdourCanvas::Polygon* sync_mark; ///< polgyon for sync position ArdourCanvas::SimpleLine* zero_line; ArdourCanvas::Polygon* fade_in_shape; @@ -168,7 +168,7 @@ class AudioRegionView : public RegionView void color_handler (); - vector wave_caches; + std::vector wave_caches; private: diff --git a/gtk2_ardour/audio_streamview.h b/gtk2_ardour/audio_streamview.h index e8a2c64a03..9c1335042b 100644 --- a/gtk2_ardour/audio_streamview.h +++ b/gtk2_ardour/audio_streamview.h @@ -106,14 +106,14 @@ class AudioStreamView : public StreamView double _amplitude_above_axis; - typedef list CrossfadeViewList; + typedef std::list CrossfadeViewList; CrossfadeViewList crossfade_views; bool crossfades_visible; std::list rec_data_ready_connections; nframes_t last_rec_data_frame; - map, bool> rec_data_ready_map; + std::map, bool> rec_data_ready_map; bool outline_region; diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 6f8acc9651..6ce54f7882 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -69,6 +69,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace Gtk; diff --git a/gtk2_ardour/audio_time_axis.h b/gtk2_ardour/audio_time_axis.h index bd2fa6b5d6..d3fe93fdc6 100644 --- a/gtk2_ardour/audio_time_axis.h +++ b/gtk2_ardour/audio_time_axis.h @@ -86,7 +86,7 @@ class AudioTimeAxisView : public RouteTimeAxisView void first_idle (); - XMLNode* get_child_xml_node (const string & childname); + XMLNode* get_child_xml_node (const std::string & childname); void set_waveform_shape (Editing::WaveformShape); void set_waveform_scale (Editing::WaveformScale); diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h index b312cbd685..136196cd72 100644 --- a/gtk2_ardour/automation_line.h +++ b/gtk2_ardour/automation_line.h @@ -55,7 +55,7 @@ namespace Gnome { class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoingAway { public: - AutomationLine (const string& name, TimeAxisView&, ArdourCanvas::Group&, + AutomationLine (const std::string& name, TimeAxisView&, ArdourCanvas::Group&, boost::shared_ptr, const Evoral::TimeConverter* converter = 0); virtual ~AutomationLine (); @@ -82,7 +82,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin ControlPoint* nth (uint32_t); uint32_t npoints() const { return control_points.size(); } - string name() const { return _name; } + std::string name() const { return _name; } bool visible() const { return _visible; } guint32 height() const { return _height; } @@ -106,9 +106,9 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin void show_selection(); void hide_selection (); - string get_verbose_cursor_string (double) const; - string fraction_to_string (double) const; - double string_to_fraction (string const &) const; + std::string get_verbose_cursor_string (double) const; + std::string fraction_to_string (double) const; + double string_to_fraction (std::string const &) const; void view_to_model_coord (double& x, double& y) const; void model_to_view_coord (double& x, double& y) const; @@ -132,7 +132,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin protected: - string _name; + std::string _name; guint32 _height; uint32_t _line_color; diff --git a/gtk2_ardour/automation_selection.h b/gtk2_ardour/automation_selection.h index fb19c0b5e0..f132ea95d8 100644 --- a/gtk2_ardour/automation_selection.h +++ b/gtk2_ardour/automation_selection.h @@ -26,6 +26,6 @@ namespace ARDOUR { class AutomationList; } -struct AutomationSelection : list< boost::shared_ptr > {}; +struct AutomationSelection : std::list > {}; #endif /* __ardour_gtk_automation_selection_h__ */ diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index bd0da7caf8..78faf66944 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -40,6 +40,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace Gtk; diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h index 6df4536ca6..b323d1d3bf 100644 --- a/gtk2_ardour/automation_time_axis.h +++ b/gtk2_ardour/automation_time_axis.h @@ -20,7 +20,6 @@ #ifndef __ardour_gtk_automation_time_axis_h__ #define __ardour_gtk_automation_time_axis_h__ -#include #include #include #include @@ -36,10 +35,6 @@ #include "simplerect.h" #include "automation_controller.h" -using std::vector; -using std::list; -using std::string; - namespace ARDOUR { class Session; class Route; @@ -67,8 +62,8 @@ class AutomationTimeAxisView : public TimeAxisView { TimeAxisView& parent, bool show_regions, ArdourCanvas::Canvas& canvas, - const string & name, /* translatable */ - const string & plug_name = ""); + const std::string & name, /* translatable */ + const std::string & plug_name = ""); ~AutomationTimeAxisView(); @@ -82,8 +77,8 @@ class AutomationTimeAxisView : public TimeAxisView { boost::shared_ptr line() { return _line; } void set_selected_points (PointSelection&); - void get_selectables (nframes_t start, nframes_t end, double top, double bot, list&); - void get_inverted_selectables (Selection&, list& results); + void get_selectables (nframes_t start, nframes_t end, double top, double bot, std::list&); + void get_inverted_selectables (Selection&, std::list& results); void show_timestretch (nframes_t start, nframes_t end) {} void hide_timestretch () {} @@ -100,7 +95,7 @@ class AutomationTimeAxisView : public TimeAxisView { guint32 show_at (double y, int& nth, Gtk::VBox *parent); void hide (); - static const string state_node_name; + static const std::string state_node_name; XMLNode* get_state_node(); boost::shared_ptr control() { return _control; } @@ -117,7 +112,7 @@ class AutomationTimeAxisView : public TimeAxisView { boost::shared_ptr _line; AutomationStreamView* _view; - string _name; + std::string _name; bool ignore_toggle; bool first_call_to_set_height; diff --git a/gtk2_ardour/axis_view.cc b/gtk2_ardour/axis_view.cc index e4632dc9ca..8e817c435c 100644 --- a/gtk2_ardour/axis_view.cc +++ b/gtk2_ardour/axis_view.cc @@ -38,10 +38,10 @@ #include "axis_view.h" #include "i18n.h" +using namespace std; using namespace Gtk; using namespace Gtkmm2ext; - list AxisView::used_colors; AxisView::AxisView (ARDOUR::Session& sess) : _session(sess) diff --git a/gtk2_ardour/axis_view.h b/gtk2_ardour/axis_view.h index 187443dab6..9bd39eec3e 100644 --- a/gtk2_ardour/axis_view.h +++ b/gtk2_ardour/axis_view.h @@ -49,7 +49,7 @@ class AxisView : public virtual Selectable ARDOUR::Session& session() const { return _session; } - virtual string name() const = 0; + virtual std::string name() const = 0; virtual bool marked_for_display() const { return _marked_for_display; } virtual void set_marked_for_display (bool yn) { @@ -79,7 +79,7 @@ class AxisView : public virtual Selectable ARDOUR::Session& _session; Gdk::Color _color; - static list used_colors; + static std::list used_colors; Gtk::Label name_label; diff --git a/gtk2_ardour/crossfade_edit.h b/gtk2_ardour/crossfade_edit.h index 4b905a85c2..694625a9b5 100644 --- a/gtk2_ardour/crossfade_edit.h +++ b/gtk2_ardour/crossfade_edit.h @@ -61,14 +61,14 @@ class CrossfadeEditor : public ArdourDialog : x (a), y (b) {} }; - struct Preset : public list { + struct Preset : public std::list { const char* name; const char* image_name; Preset (const char* n, const char* x) : name (n), image_name (x) {} }; - typedef list Presets; + typedef std::list Presets; static Presets* fade_in_presets; static Presets* fade_out_presets; @@ -108,10 +108,10 @@ class CrossfadeEditor : public ArdourDialog struct Half { ArdourCanvas::Line* line; ArdourCanvas::Polygon* shading; - list points; + std::list points; ARDOUR::AutomationList normative_curve; /* 0 - 1.0, linear */ ARDOUR::AutomationList gain_curve; /* 0 - 2.0, gain mapping */ - vector waves; + std::vector waves; Half(); }; @@ -125,8 +125,8 @@ class CrossfadeEditor : public ArdourDialog WhichFade current; bool point_grabbed; - vector fade_out_buttons; - vector fade_in_buttons; + std::vector fade_out_buttons; + std::vector fade_in_buttons; Gtk::VBox vpacker2; diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 167ad65b1f..87e738fc76 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -507,7 +507,7 @@ class Editor : public PublicEditor void hide(); void show (); - void set_name (const string&); + void set_name (const std::string&); void set_position (nframes64_t start, nframes64_t end = 0); void set_color_rgba (uint32_t); }; @@ -522,7 +522,7 @@ class Editor : public PublicEditor void hide_marker (ArdourCanvas::Item*, GdkEvent*); void clear_marker_display (); void mouse_add_new_marker (nframes64_t where, bool is_cd=false, bool is_xrun=false); - bool choose_new_marker_name(string &name); + bool choose_new_marker_name(std::string &name); void update_cd_marker_display (); void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location); @@ -546,9 +546,9 @@ class Editor : public PublicEditor /* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */ - void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView*, vector*) const; - void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, vector > const &); - void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, vector > const &); + void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView*, std::vector*) const; + void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector > const &); + void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector > const &); void mapped_clear_playlist (RouteTimeAxisView&, uint32_t); /* end */ @@ -624,8 +624,8 @@ class Editor : public PublicEditor bool track_canvas_motion (GdkEvent*); - void set_verbose_canvas_cursor (const string &, double x, double y); - void set_verbose_canvas_cursor_text (const string &); + void set_verbose_canvas_cursor (const std::string &, double x, double y); + void set_verbose_canvas_cursor_text (const std::string &); void show_verbose_canvas_cursor(); void hide_verbose_canvas_cursor(); @@ -866,7 +866,7 @@ class Editor : public PublicEditor boost::shared_ptr find_next_region (nframes64_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0); nframes64_t find_next_region_boundary (nframes64_t, int32_t dir, const TrackViewList&); - vector region_boundary_cache; + std::vector region_boundary_cache; void build_region_boundary_cache (); Gtk::HBox top_hbox; @@ -1127,7 +1127,7 @@ class Editor : public PublicEditor int ensure_cursor (nframes64_t* pos); void handle_new_region (boost::weak_ptr); - void handle_new_regions (vector >& ); + void handle_new_regions (std::vector >& ); void handle_region_removed (boost::weak_ptr); void add_region_to_region_display (boost::shared_ptr); void add_regions_to_region_display (std::vector > & ); @@ -1141,7 +1141,7 @@ class Editor : public PublicEditor bool no_region_list_redisplay; void insert_into_tmp_regionlist(boost::shared_ptr); - list > tmp_region_list; + std::list > tmp_region_list; void cut_copy (Editing::CutCopyOp); bool can_cut_copy () const; @@ -1246,7 +1246,7 @@ class Editor : public PublicEditor bool zoomed_to_region; void temporal_zoom_session (); void temporal_zoom (gdouble scale); - void temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const string & op); + void temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const std::string & op); void temporal_zoom_to_frame (bool coarser, nframes64_t frame); void amplitude_zoom (gdouble scale); @@ -1263,7 +1263,7 @@ class Editor : public PublicEditor void external_audio_dialog (); void session_import_dialog (); - int check_whether_and_how_to_import(string, bool all_or_nothing = true); + int check_whether_and_how_to_import(std::string, bool all_or_nothing = true); bool check_multichannel_status (const std::vector& paths); SoundFileOmega* sfbrowser; @@ -1273,15 +1273,15 @@ class Editor : public PublicEditor bool idle_drop_paths (std::vector paths, nframes64_t frame, double ypos); void drop_paths_part_two (const std::vector& paths, nframes64_t frame, double ypos); - void do_import (vector paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t&); - void do_embed (vector paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&); + void do_import (std::vector paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t&); + void do_embed (std::vector paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&); - int import_sndfiles (vector paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos, + int import_sndfiles (std::vector paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr, bool, uint32_t total); - int embed_sndfiles (vector paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode, + int embed_sndfiles (std::vector paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode, nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr&); - int add_sources (vector paths, ARDOUR::SourceList& sources, nframes64_t& pos, Editing::ImportMode, + int add_sources (std::vector paths, ARDOUR::SourceList& sources, nframes64_t& pos, Editing::ImportMode, int target_regions, int target_tracks, boost::shared_ptr&, bool add_channel_suffix); int finish_bringing_in_material (boost::shared_ptr region, uint32_t, uint32_t, nframes64_t& pos, Editing::ImportMode mode, boost::shared_ptr& existing_track); @@ -1324,7 +1324,7 @@ class Editor : public PublicEditor /* to support this ... */ void import_audio (bool as_tracks); - void do_import (vector paths, bool split, bool as_tracks); + void do_import (std::vector paths, bool split, bool as_tracks); void move_to_start (); void move_to_end (); @@ -1412,7 +1412,7 @@ class Editor : public PublicEditor /// Snap threshold in pixels double snap_threshold; - void handle_gui_changes (const string &, void *); + void handle_gui_changes (const std::string &, void *); bool ignore_gui_changes; void hide_all_tracks (bool with_select); @@ -1653,7 +1653,7 @@ public: Gtk::Menu* cd_marker_menu; ArdourCanvas::Item* marker_menu_item; - typedef list Marks; + typedef std::list Marks; Marks metric_marks; void remove_metric_marks (); @@ -2074,23 +2074,23 @@ public: /* audio export */ int write_region_selection(RegionSelection&); - bool write_region (string path, boost::shared_ptr); + bool write_region (std::string path, boost::shared_ptr); void bounce_region_selection (); void bounce_range_selection (bool replace, bool enable_processing); void external_edit_region (); int write_audio_selection (TimeSelection&); - bool write_audio_range (ARDOUR::AudioPlaylist&, const ARDOUR::ChanCount& channels, list&); + bool write_audio_range (ARDOUR::AudioPlaylist&, const ARDOUR::ChanCount& channels, std::list&); void write_selection (); XMLNode *before; /* used in *_reversible_command */ - void begin_reversible_command (string cmd_name); + void begin_reversible_command (std::string cmd_name); void commit_reversible_command (); void update_title (); - void update_title_s (const string & snapshot_name); + void update_title_s (const std::string & snapshot_name); struct State { Selection* selection; @@ -2172,8 +2172,8 @@ public: bool _xfade_visibility; #ifdef WITH_CMT - void handle_new_imageframe_time_axis_view(const string & track_name, void* src) ; - void handle_new_imageframe_marker_time_axis_view(const string & track_name, TimeAxisView* marked_track) ; + void handle_new_imageframe_time_axis_view(const std::string & track_name, void* src) ; + void handle_new_imageframe_marker_time_axis_view(const std::string & track_name, TimeAxisView* marked_track) ; void start_imageframe_grab(ArdourCanvas::Item*, GdkEvent*) ; void start_markerview_grab(ArdourCanvas::Item*, GdkEvent*) ; @@ -2236,13 +2236,13 @@ public: /* audio filters */ - void apply_filter (ARDOUR::Filter&, string cmd); + void apply_filter (ARDOUR::Filter&, std::string cmd); /* handling cleanup */ int playlist_deletion_dialog (boost::shared_ptr); - vector session_connections; + std::vector session_connections; /* tracking step changes of track height */ @@ -2274,7 +2274,7 @@ public: bool on_key_press_event (GdkEventKey*); bool on_key_release_event (GdkEventKey*); - void session_state_saved (string); + void session_state_saved (std::string); Glib::RefPtr undo_action; Glib::RefPtr redo_action; diff --git a/gtk2_ardour/editor_edit_groups.cc b/gtk2_ardour/editor_edit_groups.cc index 55b264f87f..a0e7372ded 100644 --- a/gtk2_ardour/editor_edit_groups.cc +++ b/gtk2_ardour/editor_edit_groups.cc @@ -35,6 +35,7 @@ #include "i18n.h" +using namespace std; using namespace sigc; using namespace ARDOUR; using namespace PBD; diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 1b9b2a85df..25c195dcb1 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -34,6 +34,7 @@ #include "i18n.h" +using namespace std; using namespace Gtkmm2ext; using namespace PBD; diff --git a/gtk2_ardour/editor_region_list.cc b/gtk2_ardour/editor_region_list.cc index 9d7aa86e5d..46ad668f4d 100644 --- a/gtk2_ardour/editor_region_list.cc +++ b/gtk2_ardour/editor_region_list.cc @@ -45,6 +45,7 @@ #include "i18n.h" +using namespace std; using namespace sigc; using namespace ARDOUR; using namespace PBD; diff --git a/gtk2_ardour/editor_route_list.cc b/gtk2_ardour/editor_route_list.cc index 4765050ba5..00b4a3656d 100644 --- a/gtk2_ardour/editor_route_list.cc +++ b/gtk2_ardour/editor_route_list.cc @@ -39,6 +39,7 @@ #include "i18n.h" +using namespace std; using namespace sigc; using namespace ARDOUR; using namespace PBD; diff --git a/gtk2_ardour/editor_selection_list.cc b/gtk2_ardour/editor_selection_list.cc index 7f818ebe2b..fab22e8f89 100644 --- a/gtk2_ardour/editor_selection_list.cc +++ b/gtk2_ardour/editor_selection_list.cc @@ -38,6 +38,7 @@ #include "i18n.h" +using namespace std; using namespace sigc; using namespace ARDOUR; using namespace PBD; diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h index d9741e3765..a6ebf1e8e6 100644 --- a/gtk2_ardour/engine_dialog.h +++ b/gtk2_ardour/engine_dialog.h @@ -83,7 +83,7 @@ class EngineControl : public Gtk::VBox { std::map > devices; std::vector backend_devs; - void enumerate_devices (const string& driver); + void enumerate_devices (const std::string& driver); #ifdef __APPLE__ std::vector enumerate_coreaudio_devices (); diff --git a/gtk2_ardour/export_channel_selector.cc b/gtk2_ardour/export_channel_selector.cc index 5700aaa929..2f66e58fe5 100644 --- a/gtk2_ardour/export_channel_selector.cc +++ b/gtk2_ardour/export_channel_selector.cc @@ -37,6 +37,8 @@ #include "i18n.h" +using namespace std; +using namespace Glib; using namespace ARDOUR; using namespace PBD; diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index a6a6b8dfcc..fd39aca335 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -234,7 +234,7 @@ ExportDialog::update_warnings () if (!warnings->conflicting_filenames.empty()) { list_files_hbox.show (); for (std::list::iterator it = warnings->conflicting_filenames.begin(); it != warnings->conflicting_filenames.end(); ++it) { - ustring::size_type pos = it->find_last_of ("/"); + Glib::ustring::size_type pos = it->find_last_of ("/"); list_files_string += "\n" + it->substr (0, pos + 1) + "" + it->substr (pos + 1) + ""; } } diff --git a/gtk2_ardour/export_multiplicator.h b/gtk2_ardour/export_multiplicator.h index 60c6914bf5..679c6bc1d3 100644 --- a/gtk2_ardour/export_multiplicator.h +++ b/gtk2_ardour/export_multiplicator.h @@ -35,7 +35,6 @@ #include #include -using std::list; using ARDOUR::ExportProfileManager; class ExportMultiplicator : public Gtk::EventBox { diff --git a/gtk2_ardour/export_timespan_selector.cc b/gtk2_ardour/export_timespan_selector.cc index 2ed01715fd..e716e47be1 100644 --- a/gtk2_ardour/export_timespan_selector.cc +++ b/gtk2_ardour/export_timespan_selector.cc @@ -36,6 +36,7 @@ #include "i18n.h" +using namespace Glib; using namespace ARDOUR; using namespace PBD; diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc index 27de656089..cfd9d3ea43 100644 --- a/gtk2_ardour/ghostregion.cc +++ b/gtk2_ardour/ghostregion.cc @@ -29,6 +29,7 @@ #include "simplerect.h" #include "waveview.h" +using namespace std; using namespace Editing; using namespace ArdourCanvas; using namespace ARDOUR; diff --git a/gtk2_ardour/keyboard.h b/gtk2_ardour/keyboard.h index a10fdbd6ba..2905299334 100644 --- a/gtk2_ardour/keyboard.h +++ b/gtk2_ardour/keyboard.h @@ -33,8 +33,6 @@ #include "selection.h" -using std::string; - class Keyboard : public sigc::trackable, PBD::Stateful { public: diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 64c551f0d1..31c9da1552 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -38,6 +38,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace Gtk; diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 0a95b9a94b..7c57b7535b 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -50,6 +50,7 @@ #include "i18n.h" +using namespace std; using namespace Gtk; using namespace ARDOUR_COMMAND_LINE; using namespace ARDOUR; diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index 7e0a846ec9..9bc475214a 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -29,6 +29,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation, diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h index 8a82a90271..d1bc12561f 100644 --- a/gtk2_ardour/marker.h +++ b/gtk2_ardour/marker.h @@ -50,7 +50,7 @@ class Marker : public PBD::Destructible }; - Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, Type, + Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const std::string& text, Type, nframes_t frame = 0, bool handle_events = true); virtual ~Marker (); @@ -63,7 +63,7 @@ class Marker : public PBD::Destructible void set_line_vpos (double y_origin, double height); void set_position (nframes_t); - void set_name (const string&); + void set_name (const std::string&); void set_color_rgba (uint32_t rgba); nframes64_t position() const { return frame_position; } @@ -98,7 +98,7 @@ class Marker : public PBD::Destructible class TempoMarker : public Marker { public: - TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::TempoSection&); + TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const std::string& text, ARDOUR::TempoSection&); ~TempoMarker (); ARDOUR::TempoSection& tempo() const { return _tempo; } @@ -110,7 +110,7 @@ class TempoMarker : public Marker class MeterMarker : public Marker { public: - MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::MeterSection&); + MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const std::string& text, ARDOUR::MeterSection&); ~MeterMarker (); ARDOUR::MeterSection& meter() const { return _meter; } diff --git a/gtk2_ardour/midi_streamview.h b/gtk2_ardour/midi_streamview.h index 2780cfa3da..a844d8d505 100644 --- a/gtk2_ardour/midi_streamview.h +++ b/gtk2_ardour/midi_streamview.h @@ -58,8 +58,8 @@ class MidiStreamView : public StreamView ~MidiStreamView (); void set_selected_regionviews (RegionSelection&); - void get_selectables (jack_nframes_t start, jack_nframes_t end, list&); - void get_inverted_selectables (Selection&, list& results); + void get_selectables (jack_nframes_t start, jack_nframes_t end, std::list&); + void get_inverted_selectables (Selection&, std::list& results); enum VisibleNoteRange { FullRange, diff --git a/gtk2_ardour/midi_time_axis.h b/gtk2_ardour/midi_time_axis.h index 228e05176b..acf9c32ea5 100644 --- a/gtk2_ardour/midi_time_axis.h +++ b/gtk2_ardour/midi_time_axis.h @@ -82,12 +82,12 @@ class MidiTimeAxisView : public RouteTimeAxisView return _channel_selector.mode_changed; } - sigc::signal& signal_midi_patch_settings_changed() { + sigc::signal& signal_midi_patch_settings_changed() { return _midi_patch_settings_changed; } private: - sigc::signal _midi_patch_settings_changed; + sigc::signal _midi_patch_settings_changed; void model_changed(); void custom_device_mode_changed(); diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index fdd5692111..e2fa2e52d5 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -231,7 +231,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox Gtk::Style *passthru_style; - void route_gui_changed (string, void*); + void route_gui_changed (std::string, void*); void show_route_color (); void show_passthru_color (); diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index b445cc99db..932f828404 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -115,7 +115,7 @@ class Mixer_UI : public Gtk::Window void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*); - list strips; + std::list strips; bool strip_scroller_button_release (GdkEventButton*); diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h index 5fc0dd02b0..802a088e20 100644 --- a/gtk2_ardour/option_editor.h +++ b/gtk2_ardour/option_editor.h @@ -189,8 +189,8 @@ class OptionEditor : public ArdourDialog void setup_click_editor (); void clear_click_editor (); - void click_chosen (const string & paths); - void click_emphasis_chosen (const string & paths); + void click_chosen (const std::string & paths); + void click_emphasis_chosen (const std::string & paths); void click_browse_clicked (); void click_emphasis_browse_clicked (); diff --git a/gtk2_ardour/opts.h b/gtk2_ardour/opts.h index 08e38be88d..71cd687b8b 100644 --- a/gtk2_ardour/opts.h +++ b/gtk2_ardour/opts.h @@ -23,21 +23,19 @@ #include #include -using std::string; - namespace ARDOUR_COMMAND_LINE { -extern string session_name; +extern std::string session_name; extern bool show_key_actions; extern bool no_splash; extern bool just_version; -extern string jack_client_name; +extern std::string jack_client_name; extern bool use_vst; extern bool new_session; extern char* curvetest_file; extern bool try_hw_optimization; extern bool use_gtk_theme; -extern string keybindings_path; +extern std::string keybindings_path; extern Glib::ustring menus_file; extern bool finder_invoked_ardour; diff --git a/gtk2_ardour/panner2d.h b/gtk2_ardour/panner2d.h index 1abac7fe5a..e70f9faea5 100644 --- a/gtk2_ardour/panner2d.h +++ b/gtk2_ardour/panner2d.h @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -33,9 +32,6 @@ #include #include -using std::map; -using std::string; - namespace ARDOUR { class Panner; } diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc index 4777c82479..c8c933348b 100644 --- a/gtk2_ardour/panner_ui.cc +++ b/gtk2_ardour/panner_ui.cc @@ -39,6 +39,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace Gtkmm2ext; diff --git a/gtk2_ardour/panner_ui.h b/gtk2_ardour/panner_ui.h index 3fb4632d13..fa0b7ce2e8 100644 --- a/gtk2_ardour/panner_ui.h +++ b/gtk2_ardour/panner_ui.h @@ -70,7 +70,7 @@ class PannerUI : public Gtk::HBox void effective_pan_display (); - void set_meter_strip_name (string name); + void set_meter_strip_name (std::string name); boost::shared_ptr get_controllable(); private: diff --git a/gtk2_ardour/playlist_selection.h b/gtk2_ardour/playlist_selection.h index 14366418e6..a29be49793 100644 --- a/gtk2_ardour/playlist_selection.h +++ b/gtk2_ardour/playlist_selection.h @@ -27,6 +27,6 @@ namespace ARDOUR { class Playlist; } -struct PlaylistSelection : list > {}; +struct PlaylistSelection : std::list > {}; #endif /* __ardour_gtk_playlist_selection_h__ */ diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h index 1e0498212c..4ad7c213ac 100644 --- a/gtk2_ardour/plugin_ui.h +++ b/gtk2_ardour/plugin_ui.h @@ -178,9 +178,9 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox /* input */ Gtk::ComboBoxText* combo; - std::map* combo_map; + std::map* combo_map; Gtk::ToggleButton* button; - boost::shared_ptr controller; + boost::shared_ptr controller; Gtkmm2ext::ClickBox* clickbox; Gtk::Label label; bool logarithmic; @@ -207,7 +207,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox void build (); ControlUI* build_control_ui (guint32 port_index, boost::shared_ptr); - std::vector setup_scale_values(guint32 port_index, ControlUI* cui); + std::vector setup_scale_values(guint32 port_index, ControlUI* cui); void parameter_changed (ControlUI* cui); void toggle_parameter_changed (ControlUI* cui); void update_control_display (ControlUI* cui); diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 3c2de7edd7..f9b4cc0e6e 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -74,6 +74,7 @@ class AUPluginUI; #endif +using namespace std; using namespace sigc; using namespace ARDOUR; using namespace PBD; diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 37c442d283..3286c14e6c 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -141,7 +141,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject Gtk::Menu *processor_menu; gint processor_menu_map_handler (GdkEventAny *ev); Gtk::Menu * build_processor_menu (); - void build_processor_tooltip (Gtk::EventBox&, string); + void build_processor_tooltip (Gtk::EventBox&, std::string); void show_processor_menu (gint arg); void choose_send (); @@ -162,7 +162,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject void row_deleted (const Gtk::TreeModel::Path& path); void show_processor_active (boost::weak_ptr); void show_processor_name (boost::weak_ptr); - string processor_name (boost::weak_ptr); + std::string processor_name (boost::weak_ptr); void remove_processor_gui (boost::shared_ptr); @@ -185,7 +185,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject void clear_processors (); void rename_processors (); - typedef vector > ProcSelection; + typedef std::vector > ProcSelection; void for_selected_processors (void (ProcessorBox::*pmf)(boost::shared_ptr)); void get_selected_processors (ProcSelection&); diff --git a/gtk2_ardour/region_gain_line.h b/gtk2_ardour/region_gain_line.h index dc24e6a5a6..7950c9b0e7 100644 --- a/gtk2_ardour/region_gain_line.h +++ b/gtk2_ardour/region_gain_line.h @@ -35,7 +35,7 @@ class AudioRegionView; class AudioRegionGainLine : public AutomationLine { public: - AudioRegionGainLine (const string & name, ARDOUR::Session&, AudioRegionView&, ArdourCanvas::Group& parent, boost::shared_ptr); + AudioRegionGainLine (const std::string & name, ARDOUR::Session&, AudioRegionView&, ArdourCanvas::Group& parent, boost::shared_ptr); void start_drag (ControlPoint*, nframes_t x, float fraction); void end_drag (ControlPoint*); diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc index ac8a783a41..13e2bdb7f4 100644 --- a/gtk2_ardour/region_selection.cc +++ b/gtk2_ardour/region_selection.cc @@ -24,6 +24,7 @@ #include "region_selection.h" #include "time_axis_view.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace sigc; diff --git a/gtk2_ardour/region_selection.h b/gtk2_ardour/region_selection.h index ee0cdab008..305fc69afd 100644 --- a/gtk2_ardour/region_selection.h +++ b/gtk2_ardour/region_selection.h @@ -24,9 +24,6 @@ #include #include "ardour/types.h" -using std::list; -using std::set; - class RegionView; class TimeAxisView; @@ -71,7 +68,7 @@ class RegionSelection : public std::list, public sigc::trackable nframes_t _current_start; ///< start position for the selection nframes_t _current_end; ///< end position for the selection - list _bylayer; ///< list of regions sorted by layer + std::list _bylayer; ///< list of regions sorted by layer }; #endif /* __ardour_gtk_region_selection_h__ */ diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index 7efde0ddf2..0ae2db4463 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -49,6 +49,7 @@ #include "i18n.h" +using namespace std; using namespace sigc; using namespace ARDOUR; using namespace PBD; diff --git a/gtk2_ardour/return_ui.cc b/gtk2_ardour/return_ui.cc index 5423415bd2..ac06529d38 100644 --- a/gtk2_ardour/return_ui.cc +++ b/gtk2_ardour/return_ui.cc @@ -28,6 +28,7 @@ #include "ardour_ui.h" #include "gui_thread.h" +using namespace std; using namespace ARDOUR; using namespace PBD; @@ -114,8 +115,8 @@ ReturnUIWindow::ReturnUIWindow (boost::shared_ptr s, Session& ss) mem_fun (*this, &ReturnUIWindow::return_going_away)); signal_delete_event().connect (bind ( - ptr_fun (just_hide_it), - reinterpret_cast (this))); + sigc::ptr_fun (just_hide_it), + reinterpret_cast (this))); } ReturnUIWindow::~ReturnUIWindow () diff --git a/gtk2_ardour/route_processor_selection.cc b/gtk2_ardour/route_processor_selection.cc index 0b02a2837a..243a32b0c5 100644 --- a/gtk2_ardour/route_processor_selection.cc +++ b/gtk2_ardour/route_processor_selection.cc @@ -29,6 +29,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace sigc; diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h index 9c386bafa3..cc0e46548e 100644 --- a/gtk2_ardour/route_time_axis.h +++ b/gtk2_ardour/route_time_axis.h @@ -83,8 +83,8 @@ public: void selection_click (GdkEventButton*); void set_selected_points (PointSelection&); void set_selected_regionviews (RegionSelection&); - void get_selectables (nframes_t start, nframes_t end, double top, double bot, list&); - void get_inverted_selectables (Selection&, list&); + void get_selectables (nframes_t start, nframes_t end, double top, double bot, std::list&); + void get_inverted_selectables (Selection&, std::list&); bool show_automation(Evoral::Parameter param); void set_layer_display (LayerDisplay d); LayerDisplay layer_display () const; @@ -99,12 +99,12 @@ public: TimeAxisView::Children get_child_list(); /* The editor calls these when mapping an operation across multiple tracks */ - void use_new_playlist (bool prompt, vector > const &); - void use_copy_playlist (bool prompt, vector > const &); + void use_new_playlist (bool prompt, std::vector > const &); + void use_copy_playlist (bool prompt, std::vector > const &); void clear_playlist (); /* group playlist name resolving */ - std::string resolve_new_group_playlist_name(std::string &, vector > const &); + std::string resolve_new_group_playlist_name(std::string &, std::vector > const &); void build_playlist_menu (Gtk::Menu *); @@ -118,7 +118,7 @@ public: /* This is a bit nasty to expose :/ */ struct RouteAutomationNode { Evoral::Parameter param; - Gtk::CheckMenuItem* menu_item; + Gtk::CheckMenuItem* menu_item; boost::shared_ptr track; RouteAutomationNode (Evoral::Parameter par, Gtk::CheckMenuItem* mi, boost::shared_ptr tr) @@ -131,12 +131,12 @@ public: XMLNode* get_automation_child_xml_node (Evoral::Parameter param) { return RouteUI::get_automation_child_xml_node (param); } - typedef map AutomationTracks; + typedef std::map AutomationTracks; AutomationTracks automation_tracks() { return _automation_tracks; } boost::shared_ptr automation_child(Evoral::Parameter param); - string name() const; + std::string name() const; StreamView* view() const { return _view; } ARDOUR::RouteGroup* edit_group() const; boost::shared_ptr playlist() const; @@ -157,9 +157,9 @@ protected: struct ProcessorAutomationNode { Evoral::Parameter what; - Gtk::CheckMenuItem* menu_item; + Gtk::CheckMenuItem* menu_item; boost::shared_ptr view; - RouteTimeAxisView& parent; + RouteTimeAxisView& parent; ProcessorAutomationNode (Evoral::Parameter w, Gtk::CheckMenuItem* mitem, RouteTimeAxisView& p) : what (w), menu_item (mitem), parent (p) {} @@ -171,7 +171,7 @@ protected: boost::shared_ptr processor; bool valid; Gtk::Menu* menu; - vector lines; + std::vector lines; ProcessorAutomationInfo (boost::shared_ptr i) : processor (i), valid (true), menu (0) {} @@ -302,9 +302,9 @@ protected: void _set_track_mode (ARDOUR::Track* track, ARDOUR::TrackMode mode, Gtk::RadioMenuItem* reset_item, Gtk::RadioMenuItem* reset_item_2); void track_mode_changed (); - list processor_automation; + std::list processor_automation; - typedef vector > ProcessorAutomationCurves; + typedef std::vector > ProcessorAutomationCurves; ProcessorAutomationCurves processor_automation_curves; // Set from XML so context menu automation buttons can be correctly initialized @@ -323,9 +323,9 @@ protected: XMLNode* underlay_xml_node; bool set_underlay_state(); - typedef list UnderlayList; + typedef std::list UnderlayList; UnderlayList _underlay_streams; - typedef list UnderlayMirrorList; + typedef std::list UnderlayMirrorList; UnderlayMirrorList _underlay_mirrors; }; diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h index 320dab9dae..4ec6fd3ce8 100644 --- a/gtk2_ardour/route_ui.h +++ b/gtk2_ardour/route_ui.h @@ -65,7 +65,7 @@ class RouteUI : public virtual AxisView boost::shared_ptr get_diskstream() const; - string name() const; + std::string name() const; // protected: XXX sigh this should be here @@ -83,8 +83,8 @@ class RouteUI : public virtual AxisView BindableToggleButton* solo_button; BindableToggleButton* rec_enable_button; - virtual string solo_button_name () const { return "SoloButton"; } - virtual string safe_solo_button_name () const { return "SafeSoloButton"; } + virtual std::string solo_button_name () const { return "SoloButton"; } + virtual std::string safe_solo_button_name () const { return "SafeSoloButton"; } Gtk::Menu* mute_menu; Gtk::Menu* solo_menu; @@ -164,8 +164,8 @@ class RouteUI : public virtual AxisView void set_remote_control_id (uint32_t id, Gtk::CheckMenuItem* item); - void reversibly_apply_route_boolean (string name, void (ARDOUR::Route::*func)(bool, void*), bool, void *); - void reversibly_apply_track_boolean (string name, void (ARDOUR::Track::*func)(bool, void*), bool, void *); + void reversibly_apply_route_boolean (std::string name, void (ARDOUR::Route::*func)(bool, void*), bool, void *); + void reversibly_apply_track_boolean (std::string name, void (ARDOUR::Track::*func)(bool, void*), bool, void *); void adjust_latency (); void save_as_template (); diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index da0047eefc..92546e5ef4 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -33,6 +33,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace sigc; diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h index 1e2257fc15..f0af31eafe 100644 --- a/gtk2_ardour/selection.h +++ b/gtk2_ardour/selection.h @@ -148,7 +148,7 @@ class Selection : public sigc::trackable void remove (boost::shared_ptr); void remove (boost::shared_ptr); void remove (const std::list >&); - void remove (const list&); + void remove (const std::list&); void remove (Marker*); void replace (uint32_t time_index, nframes_t start, nframes_t end); diff --git a/gtk2_ardour/send_ui.cc b/gtk2_ardour/send_ui.cc index 664092d39f..672d5f3d20 100644 --- a/gtk2_ardour/send_ui.cc +++ b/gtk2_ardour/send_ui.cc @@ -28,6 +28,7 @@ #include "ardour_ui.h" #include "gui_thread.h" +using namespace std; using namespace ARDOUR; using namespace PBD; @@ -132,8 +133,8 @@ SendUIWindow::SendUIWindow (boost::shared_ptr s, Session& ss) mem_fun (*this, &SendUIWindow::send_going_away)); signal_delete_event().connect (bind ( - ptr_fun (just_hide_it), - reinterpret_cast (this))); + sigc::ptr_fun (just_hide_it), + reinterpret_cast (this))); } SendUIWindow::~SendUIWindow () diff --git a/gtk2_ardour/session_import_dialog.cc b/gtk2_ardour/session_import_dialog.cc index 2d1f6a1007..d79f977b3e 100644 --- a/gtk2_ardour/session_import_dialog.cc +++ b/gtk2_ardour/session_import_dialog.cc @@ -34,6 +34,7 @@ #include "prompter.h" #include "i18n.h" +using namespace std; using namespace ARDOUR; SessionImportDialog::SessionImportDialog (ARDOUR::Session & target) : diff --git a/gtk2_ardour/session_import_dialog.h b/gtk2_ardour/session_import_dialog.h index cf1f5b0a4e..74da13855a 100644 --- a/gtk2_ardour/session_import_dialog.h +++ b/gtk2_ardour/session_import_dialog.h @@ -34,8 +34,6 @@ #include "ardour_dialog.h" -using std::string; - namespace ARDOUR { class Session; } @@ -56,16 +54,16 @@ class SessionImportDialog : public ArdourDialog private: - void load_session (const string& filename); + void load_session (const std::string& filename); void fill_list (); void browse (); void do_merge (); void end_dialog (); - void update (string path); + void update (std::string path); void show_info(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column); - std::pair open_rename_dialog (string text, string name); - bool open_prompt_dialog (string text); + std::pair open_rename_dialog (std::string text, std::string name); + bool open_prompt_dialog (std::string text); // Data HandlerList handlers; diff --git a/gtk2_ardour/session_metadata_dialog.cc b/gtk2_ardour/session_metadata_dialog.cc index 6038b8b5ae..18d5eaf1aa 100644 --- a/gtk2_ardour/session_metadata_dialog.cc +++ b/gtk2_ardour/session_metadata_dialog.cc @@ -30,6 +30,9 @@ #include "ardour/session_directory.h" #include "ardour/session_utils.h" +using namespace std; +using namespace Glib; + #define CALL_MEMBER_FN(object,ptrToMember) ((object).*(ptrToMember)) /*** MetadataField ***/ diff --git a/gtk2_ardour/session_metadata_dialog.h b/gtk2_ardour/session_metadata_dialog.h index e06dbe010c..defd540618 100644 --- a/gtk2_ardour/session_metadata_dialog.h +++ b/gtk2_ardour/session_metadata_dialog.h @@ -30,24 +30,21 @@ #include "ardour/session_metadata.h" -using std::string; -using Glib::ustring; - class MetadataField; typedef boost::shared_ptr MetadataPtr; /// Wraps a metadata field to be used in a GUI class MetadataField { public: - MetadataField (ustring const & field_name); + MetadataField (Glib::ustring const & field_name); virtual ~MetadataField(); virtual MetadataPtr copy () = 0; virtual void save_data (ARDOUR::SessionMetadata & data) const = 0; virtual void load_data (ARDOUR::SessionMetadata const & data) = 0; - virtual ustring name() { return _name; } - virtual ustring value() { return _value; } + virtual Glib::ustring name() { return _name; } + virtual Glib::ustring value() { return _value; } /// Get widget containing name of field virtual Gtk::Widget & name_widget () = 0; @@ -56,17 +53,17 @@ class MetadataField { /// Get widget for editing value virtual Gtk::Widget & edit_widget () = 0; protected: - ustring _name; - ustring _value; + Glib::ustring _name; + Glib::ustring _value; }; /// MetadataField that contains text class TextMetadataField : public MetadataField { private: - typedef ustring (ARDOUR::SessionMetadata::*Getter) () const; - typedef void (ARDOUR::SessionMetadata::*Setter) (ustring const &); + typedef Glib::ustring (ARDOUR::SessionMetadata::*Getter) () const; + typedef void (ARDOUR::SessionMetadata::*Setter) (Glib::ustring const &); public: - TextMetadataField (Getter getter, Setter setter, ustring const & field_name, guint width = 50); + TextMetadataField (Getter getter, Setter setter, Glib::ustring const & field_name, guint width = 50); MetadataPtr copy (); void save_data (ARDOUR::SessionMetadata & data) const; @@ -94,7 +91,7 @@ class NumberMetadataField : public MetadataField { typedef uint32_t (ARDOUR::SessionMetadata::*Getter) () const; typedef void (ARDOUR::SessionMetadata::*Setter) (uint32_t); public: - NumberMetadataField (Getter getter, Setter setter, ustring const & field_name, guint numbers, guint width = 50); + NumberMetadataField (Getter getter, Setter setter, Glib::ustring const & field_name, guint numbers, guint width = 50); MetadataPtr copy (); void save_data (ARDOUR::SessionMetadata & data) const; @@ -105,8 +102,8 @@ class NumberMetadataField : public MetadataField { Gtk::Widget & edit_widget (); private: void update_value (); - ustring uint_to_str (uint32_t i) const; - uint32_t str_to_uint (ustring const & str) const; + Glib::ustring uint_to_str (uint32_t i) const; + uint32_t str_to_uint (Glib::ustring const & str) const; Getter getter; Setter setter; @@ -122,7 +119,7 @@ class NumberMetadataField : public MetadataField { /// Interface for MetadataFields class SessionMetadataSet { public: - SessionMetadataSet (ustring const & name); + SessionMetadataSet (Glib::ustring const & name); virtual ~SessionMetadataSet () {}; void add_data_field (MetadataPtr field); @@ -140,14 +137,14 @@ class SessionMetadataSet { protected: typedef std::list DataList; DataList list; - ustring name; + Glib::ustring name; ARDOUR::Session *session; }; /// Contains MetadataFields for editing class SessionMetadataSetEditable : public SessionMetadataSet { public: - SessionMetadataSetEditable (ustring const & name); + SessionMetadataSetEditable (Glib::ustring const & name); Gtk::Widget & get_widget () { return table; } Gtk::Widget & get_tab_widget (); @@ -165,7 +162,7 @@ class SessionMetadataSetEditable : public SessionMetadataSet { /// Contains MetadataFields for importing class SessionMetadataSetImportable : public SessionMetadataSet { public: - SessionMetadataSetImportable (ustring const & name); + SessionMetadataSetImportable (Glib::ustring const & name); Gtk::Widget & get_widget () { return tree_view; } Gtk::Widget & get_tab_widget (); @@ -183,8 +180,8 @@ class SessionMetadataSetImportable : public SessionMetadataSet { struct Columns : public Gtk::TreeModel::ColumnRecord { public: - Gtk::TreeModelColumn field; - Gtk::TreeModelColumn values; + Gtk::TreeModelColumn field; + Gtk::TreeModelColumn values; Gtk::TreeModelColumn import; Gtk::TreeModelColumn data; @@ -199,7 +196,7 @@ class SessionMetadataSetImportable : public SessionMetadataSet { Gtk::CheckButton select_all_check; void select_all (); - void selection_changed (ustring const & path); + void selection_changed (Glib::ustring const & path); }; /// Metadata dialog interface @@ -211,7 +208,7 @@ template class SessionMetadataDialog : public ArdourDialog { public: - SessionMetadataDialog (ustring const & name); + SessionMetadataDialog (Glib::ustring const & name); protected: void init_data (); @@ -222,7 +219,7 @@ class SessionMetadataDialog : public ArdourDialog virtual void save_and_close (); virtual void end_dialog (); - void warn_user (ustring const & string); + void warn_user (Glib::ustring const & string); typedef std::list WidgetList; typedef boost::shared_ptr WidgetListPtr; diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc index e81a987aa1..bf4d9bc27f 100644 --- a/gtk2_ardour/splash.cc +++ b/gtk2_ardour/splash.cc @@ -12,6 +12,7 @@ using namespace Gtk; using namespace Glib; +using namespace PBD; using namespace std; using namespace ARDOUR; diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 27131fa3e3..3251e748f5 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -41,6 +41,7 @@ #include "gui_thread.h" #include "utils.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace Editing; diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h index caea5487ee..546d51dee2 100644 --- a/gtk2_ardour/streamview.h +++ b/gtk2_ardour/streamview.h @@ -89,8 +89,8 @@ public: void foreach_regionview (sigc::slot slot); void set_selected_regionviews (RegionSelection&); - void get_selectables (nframes_t start, nframes_t end, list&); - void get_inverted_selectables (Selection&, list& results); + void get_selectables (nframes_t start, nframes_t end, std::list&); + void get_inverted_selectables (Selection&, std::list& results); virtual void update_contents_metrics(boost::shared_ptr r) {} void add_region_view (boost::shared_ptr); @@ -135,14 +135,14 @@ protected: ArdourCanvas::Group* canvas_group; ArdourCanvas::SimpleRect* canvas_rect; /* frame around the whole thing */ - typedef list RegionViewList; + typedef std::list RegionViewList; RegionViewList region_views; double _samples_per_unit; sigc::connection screen_update_connection; - vector rec_rects; - list< std::pair,RegionView* > > rec_regions; + std::vector rec_rects; + std::list< std::pair,RegionView* > > rec_regions; bool rec_updating; bool rec_active; bool use_rec_regions; @@ -150,7 +150,7 @@ protected: Gdk::Color region_color; ///< Contained region color uint32_t stream_base_color; ///< Background color - vector playlist_connections; + std::vector playlist_connections; sigc::connection playlist_change_connection; ARDOUR::layer_t _layers; @@ -158,7 +158,7 @@ protected: double height; - list rec_data_ready_connections; + std::list rec_data_ready_connections; jack_nframes_t last_rec_data_frame; private: diff --git a/gtk2_ardour/tempo_dialog.cc b/gtk2_ardour/tempo_dialog.cc index 7a59fe9ab0..6bb50469dd 100644 --- a/gtk2_ardour/tempo_dialog.cc +++ b/gtk2_ardour/tempo_dialog.cc @@ -27,6 +27,7 @@ #include "i18n.h" +using namespace std; using namespace Gtk; using namespace Gtkmm2ext; using namespace ARDOUR; diff --git a/gtk2_ardour/tempo_dialog.h b/gtk2_ardour/tempo_dialog.h index 3cdc29a347..5f014ecbfb 100644 --- a/gtk2_ardour/tempo_dialog.h +++ b/gtk2_ardour/tempo_dialog.h @@ -38,7 +38,7 @@ struct TempoDialog : public ArdourDialog { Gtk::ComboBoxText note_types; - vector strings; + std::vector strings; Gtk::Adjustment bpm_adjustment; Gtk::SpinButton bpm_spinner; Gtk::Frame bpm_frame; @@ -54,8 +54,8 @@ struct TempoDialog : public ArdourDialog Gtk::Frame when_frame; char buf[64]; - TempoDialog (ARDOUR::TempoMap&, nframes_t, const string & action); - TempoDialog (ARDOUR::TempoSection&, const string & action); + TempoDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action); + TempoDialog (ARDOUR::TempoSection&, const std::string & action); double get_bpm (); double get_note_type (); @@ -74,7 +74,7 @@ struct MeterDialog : public ArdourDialog { Gtk::Entry bpb_entry; Gtk::ComboBoxText note_types; - vector strings; + std::vector strings; Gtk::Frame bpb_frame; Gtk::Button ok_button; Gtk::Button cancel_button; @@ -82,8 +82,8 @@ struct MeterDialog : public ArdourDialog Gtk::Frame when_frame; char buf[64]; - MeterDialog (ARDOUR::TempoMap&, nframes_t, const string & action); - MeterDialog (ARDOUR::MeterSection&, const string & action); + MeterDialog (ARDOUR::TempoMap&, nframes_t, const std::string & action); + MeterDialog (ARDOUR::MeterSection&, const std::string & action); double get_bpb (); double get_note_type (); diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index f62895c6f7..b2b0bde460 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -54,6 +54,7 @@ #include "i18n.h" +using namespace std; using namespace Gtk; using namespace Gdk; using namespace sigc; diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index 6f0b3310eb..56e7042548 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -193,8 +193,8 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful void order_selection_trims (ArdourCanvas::Item *item, bool put_start_on_top); - virtual void get_selectables (nframes_t start, nframes_t end, double top, double bot, list& results); - virtual void get_inverted_selectables (Selection&, list& results); + virtual void get_selectables (nframes_t start, nframes_t end, double top, double bot, std::list& results); + virtual void get_inverted_selectables (Selection&, std::list& results); void add_ghost (RegionView*); void remove_ghost (RegionView*); @@ -233,8 +233,8 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful uint32_t height; /* in canvas units */ - string controls_base_unselected_name; - string controls_base_selected_name; + std::string controls_base_unselected_name; + std::string controls_base_selected_name; bool name_entry_button_press (GdkEventButton *ev); bool name_entry_button_release (GdkEventButton *ev); @@ -310,10 +310,10 @@ class TimeAxisView : public virtual AxisView, public PBD::Stateful ArdourCanvas::Group *selection_group; - list ghosts; + std::list ghosts; - list free_selection_rects; - list used_selection_rects; + std::list free_selection_rects; + std::list used_selection_rects; SelectionRect* get_selection_rect(uint32_t id); diff --git a/gtk2_ardour/track_selection.h b/gtk2_ardour/track_selection.h index 53f59e67cf..57b8469afb 100644 --- a/gtk2_ardour/track_selection.h +++ b/gtk2_ardour/track_selection.h @@ -24,6 +24,6 @@ class TimeAxisView; -struct TrackSelection : public list {}; +struct TrackSelection : public std::list {}; #endif /* __ardour_gtk_track_selection_h__ */ diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h index 7f4cdce6ec..be95d737fb 100644 --- a/libs/ardour/ardour/audio_diskstream.h +++ b/libs/ardour/ardour/audio_diskstream.h @@ -55,14 +55,14 @@ class IO; class AudioDiskstream : public Diskstream { public: - AudioDiskstream (Session &, const string& name, Diskstream::Flag f = Recordable); + AudioDiskstream (Session &, const std::string& name, Diskstream::Flag f = Recordable); AudioDiskstream (Session &, const XMLNode&); ~AudioDiskstream(); float playback_buffer_load() const; float capture_buffer_load() const; - string input_source (uint32_t n=0) const { + std::string input_source (uint32_t n=0) const { boost::shared_ptr c = channels.reader(); if (n < c->size()) { return (*c)[n]->source ? (*c)[n]->source->name() : ""; @@ -280,7 +280,7 @@ class AudioDiskstream : public Diskstream int use_new_write_source (uint32_t n=0); - int find_and_use_playlist (const string&); + int find_and_use_playlist (const std::string &); void allocate_temporary_buffers (); diff --git a/libs/ardour/ardour/audio_library.h b/libs/ardour/ardour/audio_library.h index 86b5fb3aa2..ed18ae9cbf 100644 --- a/libs/ardour/ardour/audio_library.h +++ b/libs/ardour/ardour/audio_library.h @@ -24,10 +24,6 @@ #include #include -using std::vector; -using std::string; -using std::map; - namespace ARDOUR { class AudioLibrary @@ -36,15 +32,15 @@ class AudioLibrary AudioLibrary (); ~AudioLibrary (); - void set_tags (string member, vector tags); - vector get_tags (string member); + void set_tags (std::string member, std::vector tags); + std::vector get_tags (std::string member); - void search_members_and (vector& results, const vector tags); + void search_members_and (std::vector& results, const std::vector tags); void save_changes(); private: - string src; + std::string src; }; extern AudioLibrary* Library; diff --git a/libs/ardour/ardour/audio_playlist_importer.h b/libs/ardour/ardour/audio_playlist_importer.h index 52d715bcc0..5ae87cea01 100644 --- a/libs/ardour/ardour/audio_playlist_importer.h +++ b/libs/ardour/ardour/audio_playlist_importer.h @@ -48,7 +48,7 @@ class AudioPlaylistImportHandler : public ElementImportHandler AudioPlaylistImportHandler (XMLTree const & source, Session & session, AudioRegionImportHandler & region_handler, const char * nodename = "Playlists"); virtual ~AudioPlaylistImportHandler () {} - virtual string get_info () const; + virtual std::string get_info () const; void get_regions (XMLNode const & node, ElementList & list) const; void update_region_id (XMLProperty* id_prop); @@ -64,7 +64,7 @@ class UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler public: UnusedAudioPlaylistImportHandler (XMLTree const & source, Session & session, AudioRegionImportHandler & region_handler) : AudioPlaylistImportHandler (source, session, region_handler, X_("UnusedPlaylists")) { } - string get_info () const { return _("Audio Playlists (unused)"); } + std::string get_info () const { return _("Audio Playlists (unused)"); } }; class AudioPlaylistImporter : public ElementImporter @@ -74,7 +74,7 @@ class AudioPlaylistImporter : public ElementImporter AudioPlaylistImporter (AudioPlaylistImporter const & other); ~AudioPlaylistImporter (); - string get_info () const; + std::string get_info () const; void set_diskstream (PBD::ID const & id); PBD::ID const & orig_diskstream () const { return orig_diskstream_id; } diff --git a/libs/ardour/ardour/audio_region_importer.h b/libs/ardour/ardour/audio_region_importer.h index ec70627428..71e8718ce8 100644 --- a/libs/ardour/ardour/audio_region_importer.h +++ b/libs/ardour/ardour/audio_region_importer.h @@ -43,14 +43,14 @@ class AudioRegionImportHandler : public ElementImportHandler public: // Inerface implementation AudioRegionImportHandler (XMLTree const & source, Session & session); - string get_info () const; + std::string get_info () const; void create_regions_from_children (XMLNode const & node, ElementList & list); // Source management - bool check_source (string const & filename) const; - void add_source (string const & filename, boost::shared_ptr const & source); - boost::shared_ptr const & get_source (string const & filename) const; + bool check_source (std::string const & filename) const; + void add_source (std::string const & filename, boost::shared_ptr const & source); + boost::shared_ptr const & get_source (std::string const & filename) const; // Id management void register_id (PBD::ID & old_id, PBD::ID & new_id); @@ -58,8 +58,8 @@ class AudioRegionImportHandler : public ElementImportHandler private: // Source management - typedef std::map > SourceMap; - typedef std::pair > SourcePair; + typedef std::map > SourceMap; + typedef std::pair > SourcePair; SourceMap sources; // Id management @@ -75,7 +75,7 @@ class AudioRegionImporter : public ElementImporter ~AudioRegionImporter (); // Interface implementation - string get_info () const; + std::string get_info () const; Session::ImportStatus * get_import_status () { return &status; } // other stuff @@ -93,7 +93,7 @@ class AudioRegionImporter : public ElementImporter AudioRegionImportHandler & handler; PBD::ID old_id; PBD::ID id; - std::list filenames; + std::list filenames; Session::ImportStatus status; bool parse_xml_region (); diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h index 484887e0b7..145272b331 100644 --- a/libs/ardour/ardour/audio_track.h +++ b/libs/ardour/ardour/audio_track.h @@ -32,7 +32,7 @@ class RouteGroup; class AudioTrack : public Track { public: - AudioTrack (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); + AudioTrack (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal); AudioTrack (Session&, const XMLNode&); ~AudioTrack (); @@ -44,7 +44,7 @@ class AudioTrack : public Track boost::shared_ptr audio_diskstream() const; - int use_diskstream (string name); + int use_diskstream (std::string name); int use_diskstream (const PBD::ID& id); int export_stuff (BufferSet& bufs, nframes_t nframes, nframes_t end_frame, bool enable_processing = true); diff --git a/libs/ardour/ardour/audio_track_importer.h b/libs/ardour/ardour/audio_track_importer.h index 6e30f6e25b..59b5b520ac 100644 --- a/libs/ardour/ardour/audio_track_importer.h +++ b/libs/ardour/ardour/audio_track_importer.h @@ -39,7 +39,7 @@ class AudioTrackImportHandler : public ElementImportHandler public: AudioTrackImportHandler (XMLTree const & source, Session & session, AudioPlaylistImportHandler & pl_handler); virtual ~AudioTrackImportHandler () {} - virtual string get_info () const; + virtual std::string get_info () const; private: AudioPlaylistImportHandler & pl_handler; @@ -56,7 +56,7 @@ class AudioTrackImporter : public ElementImporter AudioPlaylistImportHandler & pl_handler); ~AudioTrackImporter (); - string get_info () const; + std::string get_info () const; protected: bool _prepare_move (); diff --git a/libs/ardour/ardour/audiofile_tagger.h b/libs/ardour/ardour/audiofile_tagger.h index 1b4c49ee9b..9da84df561 100644 --- a/libs/ardour/ardour/audiofile_tagger.h +++ b/libs/ardour/ardour/audiofile_tagger.h @@ -27,8 +27,6 @@ #include "taglib/taglib.h" #include "taglib/xiphcomment.h" -using std::string; - namespace ARDOUR { @@ -41,7 +39,7 @@ class AudiofileTagger /* Tags file with metadata, return true on success */ - static bool tag_file (string const & filename, SessionMetadata const & metadata); + static bool tag_file (std::string const & filename, SessionMetadata const & metadata); private: diff --git a/libs/ardour/ardour/audioplaylist.h b/libs/ardour/ardour/audioplaylist.h index 31cdd2ecd4..b2e36a10f7 100644 --- a/libs/ardour/ardour/audioplaylist.h +++ b/libs/ardour/ardour/audioplaylist.h @@ -40,9 +40,9 @@ class AudioPlaylist : public ARDOUR::Playlist public: AudioPlaylist (Session&, const XMLNode&, bool hidden = false); - AudioPlaylist (Session&, string name, bool hidden = false); - AudioPlaylist (boost::shared_ptr, string name, bool hidden = false); - AudioPlaylist (boost::shared_ptr, nframes_t start, nframes_t cnt, string name, bool hidden = false); + AudioPlaylist (Session&, std::string name, bool hidden = false); + AudioPlaylist (boost::shared_ptr, std::string name, bool hidden = false); + AudioPlaylist (boost::shared_ptr, nframes_t start, nframes_t cnt, std::string name, bool hidden = false); ~AudioPlaylist (); diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h index b2e2aa3eef..36b3db0bed 100644 --- a/libs/ardour/ardour/audioregion.h +++ b/libs/ardour/ardour/audioregion.h @@ -36,8 +36,6 @@ class XMLNode; namespace ARDOUR { -using std::vector; - class Route; class Playlist; class Session; @@ -136,7 +134,7 @@ class AudioRegion : public Region void set_envelope_active (bool yn); void set_default_envelope (); - int separate_by_channel (ARDOUR::Session&, vector >&) const; + int separate_by_channel (ARDOUR::Session&, std::vector >&) const; /* automation */ @@ -169,10 +167,10 @@ class AudioRegion : public Region friend class Crossfade; AudioRegion (boost::shared_ptr, nframes_t start, nframes_t length); - AudioRegion (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - AudioRegion (const SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - AudioRegion (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - AudioRegion (boost::shared_ptr, const SourceList&, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); + AudioRegion (boost::shared_ptr, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); + AudioRegion (const SourceList &, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); + AudioRegion (boost::shared_ptr, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); + AudioRegion (boost::shared_ptr, const SourceList&, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); AudioRegion (boost::shared_ptr); AudioRegion (boost::shared_ptr, const XMLNode&); AudioRegion (SourceList &, const XMLNode&); diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index 56a24ab4a5..d097025e52 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -20,9 +20,6 @@ #ifndef __ardour_audio_source_h__ #define __ardour_audio_source_h__ -#include -#include - #include #include @@ -38,9 +35,6 @@ #include "pbd/stateful.h" #include "pbd/xml++.h" -using std::list; -using std::vector; - namespace ARDOUR { class AudioSource : virtual public Source, diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 74b8a54aad..f9b21b932c 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -38,9 +38,9 @@ class AutomationControl : public PBD::Controllable, public Evoral::Control { public: AutomationControl(ARDOUR::Session&, - const Evoral::Parameter& parameter, - boost::shared_ptr l=boost::shared_ptr(), - const string& name=""); + const Evoral::Parameter& parameter, + boost::shared_ptr l=boost::shared_ptr(), + const std::string& name=""); boost::shared_ptr alist() const { return boost::dynamic_pointer_cast(_list); diff --git a/libs/ardour/ardour/broadcast_info.h b/libs/ardour/ardour/broadcast_info.h index dbad062b2b..8dfb697d08 100644 --- a/libs/ardour/ardour/broadcast_info.h +++ b/libs/ardour/ardour/broadcast_info.h @@ -28,8 +28,6 @@ #include "ardour/types.h" -using std::string; - namespace ARDOUR { @@ -44,7 +42,7 @@ class BroadcastInfo ~BroadcastInfo (); /// Returns last error sring from libsndfile - string get_error () const { return error; } + std::string get_error () const { return error; } /* Convenience functions */ @@ -52,25 +50,25 @@ class BroadcastInfo /* Reading */ - bool load_from_file (string const & filename); + bool load_from_file (std::string const & filename); bool load_from_file (SNDFILE* sf); - string get_description () const; + std::string get_description () const; int64_t get_time_reference () const; struct tm get_origination_time () const; - string get_originator () const; - string get_originator_ref () const; + std::string get_originator () const; + std::string get_originator_ref () const; /* Writing */ - bool write_to_file (string const & filename); + bool write_to_file (std::string const & filename); bool write_to_file (SNDFILE* sf); - void set_description (string const & desc); + void set_description (std::string const & desc); void set_time_reference (int64_t when); void set_origination_time (struct tm * now = 0); // if 0, use time generated at construction - void set_originator (string const & str = ""); - void set_originator_ref (string const & str = ""); + void set_originator (std::string const & str = ""); + void set_originator_ref (std::string const & str = ""); /* State info */ @@ -83,7 +81,7 @@ class BroadcastInfo struct tm _time; void update_error (); - string error; + std::string error; bool _has_info; }; diff --git a/libs/ardour/ardour/click.h b/libs/ardour/ardour/click.h index ae744478f1..8488df47a6 100644 --- a/libs/ardour/ardour/click.h +++ b/libs/ardour/ardour/click.h @@ -27,7 +27,7 @@ namespace ARDOUR { class ClickIO : public IO { public: - ClickIO (Session& s, const string& name) : IO (s, name) {} + ClickIO (Session& s, const std::string& name) : IO (s, name) {} ~ClickIO() {} protected: diff --git a/libs/ardour/ardour/configuration_vars.h b/libs/ardour/ardour/configuration_vars.h index c91306d6dd..3091538e38 100644 --- a/libs/ardour/ardour/configuration_vars.h +++ b/libs/ardour/ardour/configuration_vars.h @@ -181,8 +181,8 @@ CONFIG_VARIABLE (DenormalModel, denormal_model, "denormal-model", DenormalNone) /* BWAV */ -CONFIG_VARIABLE (string, bwf_country_code, "bwf-country-code", "US") -CONFIG_VARIABLE (string, bwf_organization_code, "bwf-organization-code", "US") +CONFIG_VARIABLE (std::string, bwf_country_code, "bwf-country-code", "US") +CONFIG_VARIABLE (std::string, bwf_organization_code, "bwf-organization-code", "US") /* these variables have custom set() methods (e.g. path globbing) */ diff --git a/libs/ardour/ardour/control_protocol_search_path.h b/libs/ardour/ardour/control_protocol_search_path.h index a8cd5b3178..69b13c493e 100644 --- a/libs/ardour/ardour/control_protocol_search_path.h +++ b/libs/ardour/ardour/control_protocol_search_path.h @@ -24,8 +24,6 @@ namespace ARDOUR { - using PBD::SearchPath; - /** * return a SearchPath containing directories in which to look for * control surface plugins. @@ -35,7 +33,7 @@ namespace ARDOUR { * contain the user and system directories which may contain control * surface plugins. */ - SearchPath control_protocol_search_path (); + PBD::SearchPath control_protocol_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/cycle_timer.h b/libs/ardour/ardour/cycle_timer.h index 2fccec84cf..2861533025 100644 --- a/libs/ardour/ardour/cycle_timer.h +++ b/libs/ardour/ardour/cycle_timer.h @@ -41,7 +41,7 @@ class CycleTimer { } ~CycleTimer() { _exit = get_cycles(); - std::cerr << _name << ": " << (float) (_exit - _entry) / cycles_per_usec << " (" << _entry << ", " << _exit << ')' << endl; + std::cerr << _name << ": " << (float) (_exit - _entry) / cycles_per_usec << " (" << _entry << ", " << _exit << ')' << std::endl; } static float get_mhz (); diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h index 56400360d2..a78f2e23a7 100644 --- a/libs/ardour/ardour/diskstream.h +++ b/libs/ardour/ardour/diskstream.h @@ -68,11 +68,11 @@ class Diskstream : public SessionObject, public boost::noncopyable NonLayered = 0x8 }; - Diskstream (Session &, const string& name, Flag f = Recordable); + Diskstream (Session &, const std::string& name, Flag f = Recordable); Diskstream (Session &, const XMLNode&); virtual ~Diskstream(); - bool set_name (const string& str); + bool set_name (const std::string& str); ARDOUR::IO* io() const { return _io; } void set_io (ARDOUR::IO& io); @@ -149,7 +149,7 @@ class Diskstream : public SessionObject, public boost::noncopyable void remove_region_from_last_capture (boost::weak_ptr wregion); void move_processor_automation (boost::weak_ptr, - list< Evoral::RangeMove > const &); + std::list< Evoral::RangeMove > const &); sigc::signal RecordEnableChanged; sigc::signal SpeedChanged; @@ -215,7 +215,7 @@ class Diskstream : public SessionObject, public boost::noncopyable virtual void playlist_changed (Change); virtual void playlist_deleted (boost::weak_ptr); - virtual void playlist_ranges_moved (list< Evoral::RangeMove > const &); + virtual void playlist_ranges_moved (std::list< Evoral::RangeMove > const &); virtual void transport_stopped (struct tm&, time_t, bool abort) = 0; virtual void transport_looped (nframes_t transport_frame) = 0; @@ -229,7 +229,7 @@ class Diskstream : public SessionObject, public boost::noncopyable virtual int use_new_write_source (uint32_t n=0) = 0; - virtual int find_and_use_playlist (const string&) = 0; + virtual int find_and_use_playlist (const std::string&) = 0; virtual void allocate_temporary_buffers () = 0; diff --git a/libs/ardour/ardour/element_import_handler.h b/libs/ardour/ardour/element_import_handler.h index f56d3ce76d..2401cf7a06 100644 --- a/libs/ardour/ardour/element_import_handler.h +++ b/libs/ardour/ardour/element_import_handler.h @@ -27,7 +27,6 @@ #include -using std::string; class XMLTree; namespace ARDOUR { @@ -57,7 +56,7 @@ class ElementImportHandler /** Gets a textual representation of the element type * @return textual representation of element type */ - virtual string get_info () const = 0; + virtual std::string get_info () const = 0; /// Elements this handler handles ElementList elements; @@ -68,13 +67,13 @@ class ElementImportHandler * @param name name to check * @return true if name is not used */ - bool check_name (const string & name) const; + bool check_name (const std::string & name) const; /// Adds name to the list of used names - void add_name (string name); + void add_name (std::string name); /// Removes name from the list of used names - void remove_name (const string & name); + void remove_name (const std::string & name); /// Checks wheter or not all elements can be imported cleanly static bool dirty () { return _dirty; } @@ -103,7 +102,7 @@ class ElementImportHandler private: /// Set of names for duplicate checking - std::set names; + std::set names; }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/element_importer.h b/libs/ardour/ardour/element_importer.h index 04f46f7a03..4a69565838 100644 --- a/libs/ardour/ardour/element_importer.h +++ b/libs/ardour/ardour/element_importer.h @@ -29,8 +29,6 @@ #include "ardour/types.h" #include "ardour/session.h" -using std::string; - class XMLTree; namespace ARDOUR { @@ -45,12 +43,12 @@ class ElementImporter /** Returns the element name * @return the name of the element */ - virtual string get_name () const { return name; }; + virtual std::string get_name () const { return name; }; /** Gets a textual representation of the element * @return a textual representation on this specific element */ - virtual string get_info () const = 0; + virtual std::string get_info () const = 0; /** Gets import status, if applicable. */ virtual Session::ImportStatus * get_import_status () { return 0; } @@ -73,10 +71,10 @@ class ElementImporter bool broken () { return _broken; } /// Signal that requests for anew name - static sigc::signal , string, string> Rename; + static sigc::signal , std::string, std::string> Rename; /// Signal for ok/cancel prompting - static sigc::signal Prompt; + static sigc::signal Prompt; protected: @@ -107,19 +105,19 @@ class ElementImporter bool queued () { return _queued; } /// Name of element - string name; + std::string name; /// The sample rate of the session from which we are importing nframes_t sample_rate; /// Converts smpte time to a string - string smpte_to_string(SMPTE::Time & time) const; + std::string smpte_to_string (SMPTE::Time & time) const; /// Converts samples so that times match the sessions sample rate nframes_t rate_convert_samples (nframes_t samples) const; /// Converts samples so that times match the sessions sample rate (for straight use in XML) - string rate_convert_samples (string const & samples) const; + std::string rate_convert_samples (std::string const & samples) const; /// Set element broken void set_broken () { _broken = true; } diff --git a/libs/ardour/ardour/export.h b/libs/ardour/ardour/export.h index e2dfa17e02..ffc6ae5854 100644 --- a/libs/ardour/ardour/export.h +++ b/libs/ardour/ardour/export.h @@ -32,17 +32,12 @@ #include "ardour/ardour.h" #include "ardour/gdither.h" -using std::map; -using std::vector; -using std::string; -using std::pair; - namespace ARDOUR { class Port; - typedef pair PortChannelPair; - typedef map > ExportPortMap; + typedef std::pair PortChannelPair; + typedef std::map > ExportPortMap; struct ExportSpecification : public SF_INFO, public sigc::trackable { @@ -52,14 +47,13 @@ namespace ARDOUR void init (); void clear (); - int prepare (nframes_t blocksize, nframes_t frame_rate); int process (nframes_t nframes); /* set by the user */ - string path; + std::string path; nframes_t sample_rate; int src_quality; diff --git a/libs/ardour/ardour/export_channel_configuration.h b/libs/ardour/ardour/export_channel_configuration.h index 28e5e8e533..70b2bb00d9 100644 --- a/libs/ardour/ardour/export_channel_configuration.h +++ b/libs/ardour/ardour/export_channel_configuration.h @@ -32,8 +32,6 @@ #include "pbd/xml++.h" -using Glib::ustring; - namespace ARDOUR { @@ -84,8 +82,8 @@ class ExportChannelConfiguration ChannelList const & get_channels () const { return channels; } bool all_channels_have_ports () const; - ustring name () const { return _name; } - void set_name (ustring name) { _name = name; } + Glib::ustring name () const { return _name; } + void set_name (Glib::ustring name) { _name = name; } void set_split (bool value) { split = value; } bool get_split () const { return split; } @@ -127,7 +125,7 @@ class ExportChannelConfiguration FileConfigList file_configs; bool split; // Split to mono files - ustring _name; + Glib::ustring _name; }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/export_failed.h b/libs/ardour/ardour/export_failed.h index f6ea1c1323..63256b458e 100644 --- a/libs/ardour/ardour/export_failed.h +++ b/libs/ardour/ardour/export_failed.h @@ -27,8 +27,6 @@ #include "i18n.h" -using namespace PBD; - namespace ARDOUR { @@ -38,7 +36,7 @@ class ExportFailed : public std::exception ExportFailed (std::string const & reason) : reason (reason.c_str()) { - error << string_compose (_("Export failed: %1"), reason) << endmsg; + PBD::error << string_compose (_("Export failed: %1"), reason) << endmsg; } ~ExportFailed () throw() { } diff --git a/libs/ardour/ardour/export_file_io.h b/libs/ardour/ardour/export_file_io.h index 0b314819de..0df2f99e29 100644 --- a/libs/ardour/ardour/export_file_io.h +++ b/libs/ardour/ardour/export_file_io.h @@ -34,8 +34,6 @@ #include "ardour/export_format_specification.h" #include "ardour/export_utilities.h" -using Glib::ustring; - namespace ARDOUR { @@ -45,15 +43,15 @@ class ExportFileWriter public: virtual ~ExportFileWriter () {} - string filename () const { return _filename; } + std::string filename () const { return _filename; } nframes_t position () const { return _position; } void set_position (nframes_t position) { _position = position; } protected: - ExportFileWriter (string filename) : _filename (filename) {} + ExportFileWriter (std::string filename) : _filename (filename) {} - string _filename; + std::string _filename; nframes_t _position; }; @@ -65,7 +63,7 @@ class SndfileWriterBase : public ExportFileWriter SNDFILE * get_sndfile () const { return sndfile; } protected: - SndfileWriterBase (int channels, nframes_t samplerate, int format, string const & path); + SndfileWriterBase (int channels, nframes_t samplerate, int format, std::string const & path); virtual ~SndfileWriterBase (); SF_INFO sf_info; @@ -81,7 +79,7 @@ class SndfileWriter : public SndfileWriterBase, public GraphSink // Should only be created vie ExportFileFactory and derived classes public: // protected friend class ExportFileFactory; - SndfileWriter (int channels, nframes_t samplerate, int format, string const & path); + SndfileWriter (int channels, nframes_t samplerate, int format, std::string const & path); public: nframes_t write (T * data, nframes_t frames); @@ -165,12 +163,12 @@ class ExportFileFactory typedef std::pair FilePair; - static FilePair create (FormatPtr format, uint32_t channels, ustring const & filename); + static FilePair create (FormatPtr format, uint32_t channels, Glib::ustring const & filename); static bool check (FormatPtr format, uint32_t channels); private: - static FilePair create_sndfile (FormatPtr format, unsigned int channels, ustring const & filename); + static FilePair create_sndfile (FormatPtr format, unsigned int channels, Glib::ustring const & filename); static bool check_sndfile (FormatPtr format, unsigned int channels); }; diff --git a/libs/ardour/ardour/export_filename.h b/libs/ardour/ardour/export_filename.h index 94b13b65f0..3dccda728f 100644 --- a/libs/ardour/ardour/export_filename.h +++ b/libs/ardour/ardour/export_filename.h @@ -25,8 +25,6 @@ #include #include "pbd/statefuldestructible.h" -using Glib::ustring; - namespace ARDOUR { @@ -70,25 +68,25 @@ class ExportFilename { /* data access */ - ustring get_path (FormatPtr format) const; - ustring get_folder () const { return folder; } + Glib::ustring get_path (FormatPtr format) const; + Glib::ustring get_folder () const { return folder; } TimeFormat get_time_format () const { return time_format; } DateFormat get_date_format () const { return date_format; } - ustring get_time_format_str (TimeFormat format) const; - ustring get_date_format_str (DateFormat format) const; + Glib::ustring get_time_format_str (TimeFormat format) const; + Glib::ustring get_date_format_str (DateFormat format) const; - ustring get_label () const { return label; } + Glib::ustring get_label () const { return label; } uint32_t get_revision () const { return revision; } /* data modification */ void set_time_format (TimeFormat format); void set_date_format (DateFormat format); - void set_label (ustring value); + void set_label (Glib::ustring value); void set_revision (uint32_t value) { revision = value; } void set_channel (uint32_t value) { channel = value; } - bool set_folder (ustring path); + bool set_folder (Glib::ustring path); void set_timespan (TimespanPtr ts) { timespan = ts; } void set_channel_config (ChannelConfigPtr cc) { channel_config = cc; } @@ -108,16 +106,16 @@ class ExportFilename { Session & session; - ustring label; + Glib::ustring label; uint32_t revision; uint32_t channel; - ustring folder; + Glib::ustring folder; DateFormat date_format; TimeFormat time_format; - ustring get_formatted_time (ustring const & format) const; + Glib::ustring get_formatted_time (Glib::ustring const & format) const; struct tm * time_struct; // Due to static allocation no destructor or copy-ctor is needed because of this TimespanPtr timespan; @@ -125,12 +123,11 @@ class ExportFilename { /* Serialization helpers */ - typedef std::pair FieldPair; + typedef std::pair FieldPair; - void add_field (XMLNode * node, ustring const & name, bool enabled, ustring const & value = ""); - FieldPair get_field (XMLNode const & node, ustring const & name); + void add_field (XMLNode * node, Glib::ustring const & name, bool enabled, Glib::ustring const & value = ""); + FieldPair get_field (XMLNode const & node, Glib::ustring const & name); FieldPair analyse_folder (); - }; diff --git a/libs/ardour/ardour/export_format_base.h b/libs/ardour/ardour/export_format_base.h index 7806a7d093..7d5757a77d 100644 --- a/libs/ardour/ardour/export_format_base.h +++ b/libs/ardour/ardour/export_format_base.h @@ -22,7 +22,6 @@ #define __ardour_export_format_base_h__ #include -#include #include #include #include @@ -32,8 +31,6 @@ #include "ardour/gdither_types.h" #include "ardour/ardour.h" -using std::string; - namespace ARDOUR { diff --git a/libs/ardour/ardour/export_format_manager.h b/libs/ardour/ardour/export_format_manager.h index 4cf68edaa8..f69cfca986 100644 --- a/libs/ardour/ardour/export_format_manager.h +++ b/libs/ardour/ardour/export_format_manager.h @@ -31,8 +31,6 @@ #include "ardour/export_formats.h" -using std::string; - namespace ARDOUR { diff --git a/libs/ardour/ardour/export_format_specification.h b/libs/ardour/ardour/export_format_specification.h index 9a3c8c43f8..a3f4d4fe19 100644 --- a/libs/ardour/ardour/export_format_specification.h +++ b/libs/ardour/ardour/export_format_specification.h @@ -28,8 +28,6 @@ #include "ardour/types.h" #include "ardour/export_format_base.h" -using std::string; - class XMLNode; namespace ARDOUR diff --git a/libs/ardour/ardour/export_formats.h b/libs/ardour/ardour/export_formats.h index 1b571e91fb..b7a7916767 100644 --- a/libs/ardour/ardour/export_formats.h +++ b/libs/ardour/ardour/export_formats.h @@ -132,7 +132,7 @@ class HasSampleFormat { sigc::signal DitherTypeSelectChanged; sigc::signal DitherTypeCompatibleChanged; - static string get_sample_format_name (ExportFormatBase::SampleFormat format); + static std::string get_sample_format_name (ExportFormatBase::SampleFormat format); protected: /* State lists */ diff --git a/libs/ardour/ardour/export_handler.h b/libs/ardour/ardour/export_handler.h index b37ce0ce12..c945070408 100644 --- a/libs/ardour/ardour/export_handler.h +++ b/libs/ardour/ardour/export_handler.h @@ -124,7 +124,7 @@ class ExportHandler : public ExportElementFactory, public sigc::trackable /* CD Marker stuff */ struct CDMarkerStatus { - CDMarkerStatus (string out_file, TimespanPtr timespan, FormatPtr format, string filename) : + CDMarkerStatus (std::string out_file, TimespanPtr timespan, FormatPtr format, std::string filename) : out (out_file.c_str()), timespan (timespan), format (format), filename (filename), track_number (1), track_position (0), track_duration (0), track_start_frame (0), index_number (1), index_position (0) @@ -134,7 +134,7 @@ class ExportHandler : public ExportElementFactory, public sigc::trackable std::ofstream out; TimespanPtr timespan; FormatPtr format; - string filename; + std::string filename; Location * marker; /* Track info */ diff --git a/libs/ardour/ardour/export_preset.h b/libs/ardour/ardour/export_preset.h index 56054ae220..c518a208ea 100644 --- a/libs/ardour/ardour/export_preset.h +++ b/libs/ardour/ardour/export_preset.h @@ -26,8 +26,6 @@ #include "pbd/uuid.h" #include "pbd/xml++.h" -using std::string; - namespace ARDOUR { @@ -35,13 +33,13 @@ class Session; class ExportPreset { public: - ExportPreset (string filename, Session & s); + ExportPreset (std::string filename, Session & s); ~ExportPreset (); PBD::UUID const & id () const { return _id; } - string name () const { return _name; } + std::string name () const { return _name; } - void set_name (string const & name); + void set_name (std::string const & name); // Note: The set_..._state functions take ownership of the XMLNode void set_global_state (XMLNode & state); @@ -55,14 +53,14 @@ class ExportPreset { private: - void set_id (string const & id); + void set_id (std::string const & id); XMLNode * get_instant_xml () const; void save_instant_xml () const; void remove_instant_xml () const; PBD::UUID _id; - string _name; + std::string _name; Session & session; XMLTree global; diff --git a/libs/ardour/ardour/export_processor.h b/libs/ardour/ardour/export_processor.h index ed1690a170..832b200848 100644 --- a/libs/ardour/ardour/export_processor.h +++ b/libs/ardour/ardour/export_processor.h @@ -30,9 +30,6 @@ #include "ardour/export_file_io.h" #include "ardour/export_utilities.h" -using Glib::ustring; -using std::list; - namespace ARDOUR { diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h index 0f0144c0c7..bf261cad46 100644 --- a/libs/ardour/ardour/export_profile_manager.h +++ b/libs/ardour/ardour/export_profile_manager.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -40,10 +39,6 @@ #include "ardour/location.h" #include "ardour/types.h" -using std::string; -using std::list; -using std::set; - namespace ARDOUR { @@ -72,7 +67,7 @@ class ExportProfileManager PresetList const & get_presets () { return preset_list; } bool load_preset (PresetPtr preset); - PresetPtr save_preset (string const & name); + PresetPtr save_preset (std::string const & name); void remove_preset (); private: diff --git a/libs/ardour/ardour/export_timespan.h b/libs/ardour/ardour/export_timespan.h index 6e410cbfae..8c1ce10730 100644 --- a/libs/ardour/ardour/export_timespan.h +++ b/libs/ardour/ardour/export_timespan.h @@ -30,8 +30,6 @@ #include "ardour/export_channel.h" #include "ardour/ardour.h" -using Glib::ustring; - namespace ARDOUR { @@ -53,11 +51,11 @@ class ExportTimespan : public sigc::trackable public: ~ExportTimespan (); - ustring name () const { return _name; } - void set_name (ustring name) { _name = name; } + Glib::ustring name () const { return _name; } + void set_name (Glib::ustring name) { _name = name; } - ustring range_id () const { return _range_id; } - void set_range_id (ustring range_id) { _range_id = range_id; } + Glib::ustring range_id () const { return _range_id; } + void set_range_id (Glib::ustring range_id) { _range_id = range_id; } /// Registers a channel to be read when export starts rolling void register_channel (ExportChannelPtr channel); @@ -89,8 +87,8 @@ class ExportTimespan : public sigc::trackable TempFileMap filemap; - ustring _name; - ustring _range_id; + Glib::ustring _name; + Glib::ustring _range_id; }; diff --git a/libs/ardour/ardour/file_source.h b/libs/ardour/ardour/file_source.h index 91a6988335..d5a4ce1d95 100644 --- a/libs/ardour/ardour/file_source.h +++ b/libs/ardour/ardour/file_source.h @@ -74,7 +74,7 @@ protected: uint16_t _channel; bool _is_embedded; - static map search_paths; + static std::map search_paths; }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h index cebb8c1e4e..7e14c9a4fa 100644 --- a/libs/ardour/ardour/filesystem_paths.h +++ b/libs/ardour/ardour/filesystem_paths.h @@ -25,25 +25,23 @@ namespace ARDOUR { - using namespace PBD; - /** * @return the path to the directory used to store user specific ardour * configuration files. */ - sys::path user_config_directory (); + PBD::sys::path user_config_directory (); /** * @return the path to the directory that contains the system wide ardour * modules. */ - sys::path ardour_module_directory (); + PBD::sys::path ardour_module_directory (); - SearchPath ardour_search_path (); + PBD::SearchPath ardour_search_path (); - SearchPath system_config_search_path (); + PBD::SearchPath system_config_search_path (); - SearchPath system_data_search_path (); + PBD::SearchPath system_data_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index fbaf379a30..8b236eadff 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -45,9 +45,6 @@ #include "ardour/types.h" #include "ardour/utils.h" -using std::string; -using std::vector; - class XMLNode; namespace ARDOUR { @@ -72,9 +69,9 @@ class UserBundle; class IO : public SessionObject, public AutomatableControls, public Latent { public: - static const string state_node_name; + static const std::string state_node_name; - IO (Session&, const string& name, DataType default_type = DataType::AUDIO, + IO (Session&, const std::string& name, DataType default_type = DataType::AUDIO, ChanCount in_min=ChanCount::ZERO, ChanCount in_max=ChanCount::INFINITE, ChanCount out_min=ChanCount::ZERO, ChanCount out_max=ChanCount::INFINITE); @@ -98,7 +95,7 @@ class IO : public SessionObject, public AutomatableControls, public Latent DataType default_type() const { return _default_type; } void set_default_type(DataType t) { _default_type = t; } - bool set_name (const string& str); + bool set_name (const std::string& str); virtual void silence (nframes_t); @@ -140,19 +137,19 @@ class IO : public SessionObject, public AutomatableControls, public Latent boost::shared_ptr bundle_for_inputs () { return _bundle_for_inputs; } boost::shared_ptr bundle_for_outputs () { return _bundle_for_outputs; } - int add_input_port (string source, void *src, DataType type = DataType::NIL); - int add_output_port (string destination, void *src, DataType type = DataType::NIL); + int add_input_port (std::string source, void *src, DataType type = DataType::NIL); + int add_output_port (std::string destination, void *src, DataType type = DataType::NIL); int remove_input_port (Port *, void *src); int remove_output_port (Port *, void *src); int set_input (Port *, void *src); - int connect_input (Port *our_port, string other_port, void *src); - int connect_output (Port *our_port, string other_port, void *src); + int connect_input (Port *our_port, std::string other_port, void *src); + int connect_output (Port *our_port, std::string other_port, void *src); - int disconnect_input (Port *our_port, string other_port, void *src); - int disconnect_output (Port *our_port, string other_port, void *src); + int disconnect_input (Port *our_port, std::string other_port, void *src); + int disconnect_output (Port *our_port, std::string other_port, void *src); int disconnect_inputs (void *src); int disconnect_outputs (void *src); @@ -310,8 +307,8 @@ class IO : public SessionObject, public AutomatableControls, public Latent /* AudioTrack::deprecated_use_diskstream_connections() needs these */ - int set_inputs (const string& str); - int set_outputs (const string& str); + int set_inputs (const std::string& str); + int set_outputs (const std::string& str); void increment_output_offset (nframes_t); void cycle_start (nframes_t); @@ -348,12 +345,12 @@ class IO : public SessionObject, public AutomatableControls, public Latent std::vector _bundles_connected_to_outputs; ///< user bundles connected to our outputs std::vector _bundles_connected_to_inputs; ///< user bundles connected to our inputs - static int parse_io_string (const string&, vector& chns); + static int parse_io_string (const std::string&, std::vector& chns); - static int parse_gain_string (const string&, vector& chns); + static int parse_gain_string (const std::string&, std::vector& chns); - int set_sources (vector&, void *src, bool add); - int set_destinations (vector&, void *src, bool add); + int set_sources (std::vector&, void *src, bool add); + int set_destinations (std::vector&, void *src, bool add); int ensure_inputs (ChanCount, bool clear, bool lockit, void *src); int ensure_outputs (ChanCount, bool clear, bool lockit, void *src); @@ -367,7 +364,7 @@ class IO : public SessionObject, public AutomatableControls, public Latent int get_port_counts (const XMLNode& node); int create_ports (const XMLNode&); int make_connections (const XMLNode&); - boost::shared_ptr find_possible_bundle (const string &desired_name, const string &default_name, const string &connection_type_name); + boost::shared_ptr find_possible_bundle (const std::string &desired_name, const std::string &default_name, const std::string &connection_type_name); virtual void setup_peak_meters (); void meter (); diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index e7dffb3138..7f847c9221 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -31,8 +31,6 @@ #include "ardour/ardour.h" #include "ardour/processor.h" -using std::string; - class XMLNode; namespace ARDOUR { @@ -45,9 +43,9 @@ class IO; class IOProcessor : public Processor { public: - IOProcessor (Session&, const string& proc_name, const string io_name="", + IOProcessor (Session&, const std::string& proc_name, const std::string io_name="", ARDOUR::DataType default_type = DataType::AUDIO); - IOProcessor (Session&, IO* io, const string& proc_name, + IOProcessor (Session&, IO* io, const std::string& proc_name, ARDOUR::DataType default_type = DataType::AUDIO); virtual ~IOProcessor (); diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index 5585711272..5ee565fc1e 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -36,8 +36,6 @@ #include "ardour/ardour.h" -using std::string; - namespace ARDOUR { class Location : public PBD::StatefulDestructible @@ -56,7 +54,7 @@ class Location : public PBD::StatefulDestructible Location (nframes_t sample_start, nframes_t sample_end, - const string &name, + const std::string &name, Flags bits = Flags(0)) : _name (name), @@ -90,8 +88,8 @@ class Location : public PBD::StatefulDestructible int move_to (nframes_t pos); - const string& name() const { return _name; } - void set_name (const string &str) { _name = str; name_changed(this); } + const std::string& name() const { return _name; } + void set_name (const std::string &str) { _name = str; name_changed(this); } void set_auto_punch (bool yn, void *src); void set_auto_loop (bool yn, void *src); @@ -123,14 +121,14 @@ class Location : public PBD::StatefulDestructible /* CD Track / CD-Text info */ - std::map cd_info; - XMLNode& cd_info_node (const string &, const string &); + std::map cd_info; + XMLNode& cd_info_node (const std::string &, const std::string &); XMLNode& get_state (void); int set_state (const XMLNode&); private: - string _name; + std::string _name; nframes_t _start; nframes_t _end; Flags _flags; @@ -165,7 +163,7 @@ class Locations : public PBD::StatefulDestructible Location* end_location() const; Location* start_location() const; - int next_available_name(string& result,string base); + int next_available_name(std::string& result,std::string base); uint32_t num_range_markers() const; int set_current (Location *, bool want_lock = true); diff --git a/libs/ardour/ardour/location_importer.h b/libs/ardour/ardour/location_importer.h index 2924a1de92..37895dbc97 100644 --- a/libs/ardour/ardour/location_importer.h +++ b/libs/ardour/ardour/location_importer.h @@ -36,7 +36,7 @@ class LocationImportHandler : public ElementImportHandler { public: LocationImportHandler (XMLTree const & source, Session & session); - string get_info () const; + std::string get_info () const; }; class LocationImporter : public ElementImporter @@ -45,7 +45,7 @@ class LocationImporter : public ElementImporter LocationImporter (XMLTree const & source, Session & session, LocationImportHandler & handler, XMLNode const & node); ~LocationImporter (); - string get_info () const; + std::string get_info () const; protected: bool _prepare_move (); diff --git a/libs/ardour/ardour/midi_patch_manager.h b/libs/ardour/ardour/midi_patch_manager.h index 2c1df39aa5..057d4f7b1d 100644 --- a/libs/ardour/ardour/midi_patch_manager.h +++ b/libs/ardour/ardour/midi_patch_manager.h @@ -64,8 +64,8 @@ public: { return _master_devices_by_model[model_name]; } boost::shared_ptr find_channel_name_set( - string model, - string custom_device_mode, + std::string model, + std::string custom_device_mode, uint8_t channel) { boost::shared_ptr master_device = master_device_by_model(model); @@ -79,8 +79,8 @@ public: boost::shared_ptr find_patch( - string model, - string custom_device_mode, + std::string model, + std::string custom_device_mode, uint8_t channel, PatchPrimaryKey patch_key) { @@ -94,8 +94,8 @@ public: } boost::shared_ptr previous_patch( - string model, - string custom_device_mode, + std::string model, + std::string custom_device_mode, uint8_t channel, PatchPrimaryKey patch_key) { @@ -109,8 +109,8 @@ public: } boost::shared_ptr next_patch( - string model, - string custom_device_mode, + std::string model, + std::string custom_device_mode, uint8_t channel, PatchPrimaryKey patch_key) { @@ -123,11 +123,11 @@ public: } } - std::list custom_device_mode_names_by_model(std::string model_name) { + std::list custom_device_mode_names_by_model(std::string model_name) { if (model_name != "") { return master_device_by_model(model_name)->custom_device_mode_names(); } else { - return std::list(); + return std::list(); } } diff --git a/libs/ardour/ardour/midi_playlist.h b/libs/ardour/ardour/midi_playlist.h index ad66d7c1d6..da8391a16b 100644 --- a/libs/ardour/ardour/midi_playlist.h +++ b/libs/ardour/ardour/midi_playlist.h @@ -40,10 +40,10 @@ class MidiPlaylist : public ARDOUR::Playlist { public: MidiPlaylist (Session&, const XMLNode&, bool hidden = false); - MidiPlaylist (Session&, string name, bool hidden = false); - MidiPlaylist (boost::shared_ptr other, string name, bool hidden = false); + MidiPlaylist (Session&, std::string name, bool hidden = false); + MidiPlaylist (boost::shared_ptr other, std::string name, bool hidden = false); MidiPlaylist (boost::shared_ptr other, nframes_t start, nframes_t cnt, - string name, bool hidden = false); + std::string name, bool hidden = false); ~MidiPlaylist (); diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h index 34ce562852..6a4d492237 100644 --- a/libs/ardour/ardour/midi_region.h +++ b/libs/ardour/ardour/midi_region.h @@ -35,8 +35,6 @@ class XMLNode; -using std::vector; - namespace ARDOUR { class Route; @@ -72,7 +70,7 @@ class MidiRegion : public Region XMLNode& state (bool); int set_state (const XMLNode&); - int separate_by_channel (ARDOUR::Session&, vector< boost::shared_ptr >&) const; + int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr >&) const; /* automation */ diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index dcb34c8a04..be3de9a5a3 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -34,9 +34,6 @@ #include "ardour/automation_control.h" #include "ardour/processor.h" -using std::istream; -using std::ostream; - namespace ARDOUR { class Route; @@ -84,7 +81,7 @@ class StreamPanner : public sigc::trackable, public PBD::Stateful /* old school automation loading */ - virtual int load (istream&, string path, uint32_t&) = 0; + virtual int load (std::istream&, std::string path, uint32_t&) = 0; protected: friend class Panner; @@ -126,7 +123,7 @@ class BaseStereoPanner : public StreamPanner /* old school automation loading */ - int load (istream&, string path, uint32_t&); + int load (std::istream&, std::string path, uint32_t&); protected: float left; @@ -150,7 +147,7 @@ class EqualPowerStereoPanner : public BaseStereoPanner void get_desired_coefficients (pan_t*) const; static StreamPanner* factory (Panner&, Evoral::Parameter param); - static string name; + static std::string name; XMLNode& state (bool full_state); XMLNode& get_state (void); @@ -171,7 +168,7 @@ class Multi2dPanner : public StreamPanner nframes_t start, nframes_t end, nframes_t nframes, pan_t** buffers); static StreamPanner* factory (Panner&, Evoral::Parameter); - static string name; + static std::string name; XMLNode& state (bool full_state); XMLNode& get_state (void); @@ -179,7 +176,7 @@ class Multi2dPanner : public StreamPanner /* old school automation loading */ - int load (istream&, string path, uint32_t&); + int load (std::istream&, std::string path, uint32_t&); private: void update (); @@ -201,7 +198,7 @@ class Panner : public Processor }; //Panner (std::string name, Session&, int _num_bufs); - Panner (string name, Session&); + Panner (std::string name, Session&); virtual ~Panner (); void clear_panners (); diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index 63edad8805..15aa041ed6 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -55,12 +55,12 @@ class Playlist : public SessionObject, public boost::noncopyable, public boost::enable_shared_from_this { public: - typedef list > RegionList; + typedef std::list > RegionList; Playlist (Session&, const XMLNode&, DataType type, bool hidden = false); - Playlist (Session&, string name, DataType type, bool hidden = false); - Playlist (boost::shared_ptr, string name, bool hidden = false); - Playlist (boost::shared_ptr, nframes_t start, nframes_t cnt, string name, bool hidden = false); + Playlist (Session&, std::string name, DataType type, bool hidden = false); + Playlist (boost::shared_ptr, std::string name, bool hidden = false); + Playlist (boost::shared_ptr, nframes_t start, nframes_t cnt, std::string name, bool hidden = false); virtual ~Playlist (); @@ -73,7 +73,7 @@ class Playlist : public SessionObject, void release(); bool used () const { return _refcnt != 0; } - bool set_name (const string& str); + bool set_name (const std::string& str); const DataType& data_type() const { return _type; } @@ -105,8 +105,8 @@ class Playlist : public SessionObject, void shuffle (boost::shared_ptr, int dir); void update_after_tempo_map_change (); - boost::shared_ptr cut (list&, bool result_is_hidden = true); - boost::shared_ptr copy (list&, bool result_is_hidden = true); + boost::shared_ptr cut (std::list&, bool result_is_hidden = true); + boost::shared_ptr copy (std::list&, bool result_is_hidden = true); int paste (boost::shared_ptr, nframes_t position, float times); RegionList* regions_at (nframes_t frame); @@ -131,9 +131,9 @@ class Playlist : public SessionObject, sigc::signal Modified; sigc::signal NameChanged; sigc::signal LengthChanged; - sigc::signal > const &> RangesMoved; + sigc::signal > const &> RangesMoved; - static string bump_name (string old_name, Session&); + static std::string bump_name (std::string old_name, Session&); void freeze (); void thaw (); @@ -193,9 +193,9 @@ class Playlist : public SessionObject, RegionList pending_bounds; bool pending_modified; bool pending_length; - list< Evoral::RangeMove > pending_range_moves; + std::list< Evoral::RangeMove > pending_range_moves; bool save_on_thaw; - string last_save_reason; + std::string last_save_reason; uint32_t in_set_state; bool first_set_state; bool _hidden; @@ -270,7 +270,7 @@ class Playlist : public SessionObject, nframes_t _get_maximum_extent() const; boost::shared_ptr cut_copy (boost::shared_ptr (Playlist::*pmf)(nframes_t, nframes_t, bool), - list& ranges, bool result_is_hidden); + std::list& ranges, bool result_is_hidden); boost::shared_ptr cut (nframes_t start, nframes_t cnt, bool result_is_hidden); boost::shared_ptr copy (nframes_t start, nframes_t cnt, bool result_is_hidden); diff --git a/libs/ardour/ardour/playlist_factory.h b/libs/ardour/ardour/playlist_factory.h index e0533526c9..46e27d9b87 100644 --- a/libs/ardour/ardour/playlist_factory.h +++ b/libs/ardour/ardour/playlist_factory.h @@ -34,9 +34,9 @@ class PlaylistFactory { static sigc::signal, bool> PlaylistCreated; static boost::shared_ptr create (Session&, const XMLNode&, bool hidden = false, bool unused = false); - static boost::shared_ptr create (DataType type, Session&, string name, bool hidden = false); - static boost::shared_ptr create (boost::shared_ptr, string name, bool hidden = false); - static boost::shared_ptr create (boost::shared_ptr, nframes_t start, nframes_t cnt, string name, bool hidden = false); + static boost::shared_ptr create (DataType type, Session&, std::string name, bool hidden = false); + static boost::shared_ptr create (boost::shared_ptr, std::string name, bool hidden = false); + static boost::shared_ptr create (boost::shared_ptr, nframes_t start, nframes_t cnt, std::string name, bool hidden = false); }; } diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 2cf3d3fc34..f6de29ba41 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -39,11 +39,6 @@ #include #include -using std::string; -using std::vector; -using std::set; -using std::map; - namespace ARDOUR { class AudioEngine; @@ -68,8 +63,8 @@ class PluginInfo { index(o.index) {} virtual ~PluginInfo () { } - string name; - string category; + std::string name; + std::string category; Glib::ustring creator; Glib::ustring path; ChanCount n_inputs; @@ -103,7 +98,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent bool toggled; bool logarithmic; bool sr_dependent; - string label; + std::string label; float lower; float upper; float step; @@ -132,8 +127,8 @@ class Plugin : public PBD::StatefulDestructible, public Latent nframes_t nframes, nframes_t offset) = 0; virtual std::set automatable() const = 0; - virtual string describe_parameter (Evoral::Parameter) = 0; - virtual string state_node_name() const = 0; + virtual std::string describe_parameter (Evoral::Parameter) = 0; + virtual std::string state_node_name() const = 0; virtual void print_parameter (uint32_t, char*, uint32_t len) const = 0; virtual bool parameter_is_audio(uint32_t) const = 0; @@ -141,19 +136,19 @@ class Plugin : public PBD::StatefulDestructible, public Latent virtual bool parameter_is_input(uint32_t) const = 0; virtual bool parameter_is_output(uint32_t) const = 0; - virtual bool save_preset(string uri) = 0; - virtual bool load_preset (const string uri); + virtual bool save_preset (std::string uri) = 0; + virtual bool load_preset (const std::string uri); struct PresetRecord { PresetRecord(const std::string& u, const std::string& l) : uri(u), label(l) {} - string uri; - string label; + std::string uri; + std::string label; }; virtual std::vector get_presets(); - const PresetRecord* preset_by_label(const string& label); - const PresetRecord* preset_by_uri(const string& uri); + const PresetRecord* preset_by_label(const std::string& label); + const PresetRecord* preset_by_uri(const std::string& uri); virtual bool has_editor() const = 0; @@ -199,16 +194,16 @@ class Plugin : public PBD::StatefulDestructible, public Latent virtual void set_parameter (uint32_t which, float val) = 0; - bool save_preset (string uri, string domain /* vst, ladspa etc. */); + bool save_preset (std::string uri, std::string domain /* vst, ladspa etc. */); ARDOUR::AudioEngine& _engine; ARDOUR::Session& _session; PluginInfoPtr _info; uint32_t _cycles; - map presets; + std::map presets; }; -PluginPtr find_plugin(ARDOUR::Session&, string unique_id, ARDOUR::PluginType); +PluginPtr find_plugin(ARDOUR::Session&, std::string unique_id, ARDOUR::PluginType); } // namespace ARDOUR diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index 89512df40c..59ab6de2d8 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -48,7 +48,7 @@ class PluginInsert : public Processor PluginInsert (Session&, const XMLNode&); ~PluginInsert (); - static const string port_automation_node_name; + static const std::string port_automation_node_name; XMLNode& state(bool); XMLNode& get_state(void); @@ -99,7 +99,7 @@ class PluginInsert : public Processor PluginType type (); - string describe_parameter (Evoral::Parameter param); + std::string describe_parameter (Evoral::Parameter param); nframes_t signal_latency() const; diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index 547cc87f88..757af64c87 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -47,9 +47,9 @@ class Route; class Processor : public SessionObject, public AutomatableControls, public Latent { public: - static const string state_node_name; + static const std::string state_node_name; - Processor(Session&, const string& name); + Processor(Session&, const std::string& name); virtual ~Processor() { } diff --git a/libs/ardour/ardour/recent_sessions.h b/libs/ardour/ardour/recent_sessions.h index e32b67bcd8..d713c4f3f1 100644 --- a/libs/ardour/ardour/recent_sessions.h +++ b/libs/ardour/ardour/recent_sessions.h @@ -24,15 +24,11 @@ #include #include -using std::deque; -using std::pair; -using std::string; - namespace ARDOUR { - typedef deque > RecentSessions; + typedef std::deque > RecentSessions; int read_recent_sessions (RecentSessions& rs); - int store_recent_sessions (string name, string path); + int store_recent_sessions (std::string name, std::string path); int write_recent_sessions (RecentSessions& rs); }; // namespace ARDOUR diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index d9a8945bae..b6b80efa84 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -163,7 +163,7 @@ class Region virtual bool should_save_state () const { return !(_flags & DoNotSaveState); }; void freeze (); - void thaw (const string& why); + void thaw (const std::string& why); bool covers (nframes_t frame) const { return first_frame() <= frame && frame <= last_frame(); @@ -226,7 +226,7 @@ class Region const SourceList& sources() const { return _sources; } const SourceList& master_sources() const { return _master_sources; } - std::vector master_source_names(); + std::vector master_source_names(); void set_master_sources (const SourceList&); /* automation */ @@ -270,20 +270,20 @@ class Region friend class RegionFactory; Region (boost::shared_ptr src, nframes_t start, nframes_t length, - const string& name, DataType type, layer_t = 0, Flag flags = DefaultFlags); + const std::string& name, DataType type, layer_t = 0, Flag flags = DefaultFlags); Region (const SourceList& srcs, nframes_t start, nframes_t length, - const string& name, DataType type, layer_t = 0, Flag flags = DefaultFlags); + const std::string& name, DataType type, layer_t = 0, Flag flags = DefaultFlags); - Region (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Flag flags = DefaultFlags); - Region (boost::shared_ptr, nframes_t length, const string& name, layer_t = 0, Flag flags = DefaultFlags); + Region (boost::shared_ptr, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Flag flags = DefaultFlags); + Region (boost::shared_ptr, nframes_t length, const std::string& name, layer_t = 0, Flag flags = DefaultFlags); Region (boost::shared_ptr); Region (boost::shared_ptr src, const XMLNode&); Region (const SourceList& srcs, const XMLNode&); - Region (Session& s, nframes_t start, nframes_t length, const string& name, DataType, layer_t = 0, Flag flags = DefaultFlags); + Region (Session& s, nframes_t start, nframes_t length, const std::string& name, DataType, layer_t = 0, Flag flags = DefaultFlags); protected: - void copy_stuff (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t, Flag flags); + void copy_stuff (boost::shared_ptr, nframes_t start, nframes_t length, const std::string& name, layer_t, Flag flags); XMLNode& get_short_state (); /* used only by Session */ diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h index 8cdf7df955..8da6dde25f 100644 --- a/libs/ardour/ardour/region_factory.h +++ b/libs/ardour/ardour/region_factory.h @@ -54,9 +54,9 @@ class RegionFactory { static boost::shared_ptr create (boost::shared_ptr, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); - static boost::shared_ptr create (boost::shared_ptr, const SourceList&, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); - static boost::shared_ptr create (boost::shared_ptr, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); - static boost::shared_ptr create (const SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); + static boost::shared_ptr create (boost::shared_ptr, const SourceList&, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); + static boost::shared_ptr create (boost::shared_ptr, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); + static boost::shared_ptr create (const SourceList &, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); static boost::shared_ptr create (Session&, XMLNode&, bool); static boost::shared_ptr create (SourceList &, const XMLNode&); }; diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 2b54810577..9537097f74 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -62,7 +62,7 @@ class Route : public IO { protected: - typedef list > ProcessorList; + typedef std::list > ProcessorList; public: @@ -238,7 +238,7 @@ class Route : public IO sigc::signal SelectedChanged; - int set_control_outs (const vector& ports); + int set_control_outs (const std::vector& ports); boost::shared_ptr control_outs() { return _control_outs; } bool feeds (boost::shared_ptr); diff --git a/libs/ardour/ardour/route_group.h b/libs/ardour/ardour/route_group.h index 832d709a33..fa69446528 100644 --- a/libs/ardour/ardour/route_group.h +++ b/libs/ardour/ardour/route_group.h @@ -28,9 +28,6 @@ #include "pbd/stateful.h" #include "ardour/types.h" -using std::string; -using std::list; - namespace ARDOUR { class Route; @@ -46,9 +43,9 @@ class RouteGroup : public PBD::Stateful, public sigc::trackable { Hidden = 0x4 }; - RouteGroup (Session& s, const string &n, Flag f = Flag(0)); + RouteGroup (Session& s, const std::string &n, Flag f = Flag(0)); - const string& name() { return _name; } + const std::string& name() { return _name; } void set_name (std::string str); bool is_active () const { return _flags & Active; } @@ -71,19 +68,19 @@ class RouteGroup : public PBD::Stateful, public sigc::trackable { int remove (Route *); void apply (void (Route::*func)(void *), void *src) { - for (list::iterator i = routes.begin(); i != routes.end(); i++) { + for (std::list::iterator i = routes.begin(); i != routes.end(); i++) { ((*i)->*func)(src); } } template void apply (void (Route::*func)(T, void *), T val, void *src) { - for (list::iterator i = routes.begin(); i != routes.end(); i++) { + for (std::list::iterator i = routes.begin(); i != routes.end(); i++) { ((*i)->*func)(val, src); } } template void foreach_route (T *obj, void (T::*func)(Route&)) { - for (list::iterator i = routes.begin(); i != routes.end(); i++) { + for (std::list::iterator i = routes.begin(); i != routes.end(); i++) { (obj->*func)(**i); } } @@ -101,7 +98,7 @@ class RouteGroup : public PBD::Stateful, public sigc::trackable { changed(); } - const list& route_list() { return routes; } + const std::list& route_list() { return routes; } sigc::signal changed; sigc::signal FlagsChanged; @@ -112,8 +109,8 @@ class RouteGroup : public PBD::Stateful, public sigc::trackable { private: Session& _session; - list routes; - string _name; + std::list routes; + std::string _name; Flag _flags; void remove_when_going_away (Route*); diff --git a/libs/ardour/ardour/route_group_specialized.h b/libs/ardour/ardour/route_group_specialized.h index 73b6c74ee7..b3e50b0869 100644 --- a/libs/ardour/ardour/route_group_specialized.h +++ b/libs/ardour/ardour/route_group_specialized.h @@ -28,7 +28,7 @@ namespace ARDOUR { template void RouteGroup::apply (void (Track::*func)(T, void *), T val, void *src) { - for (list::iterator i = routes.begin(); i != routes.end(); i++) { + for (std::list::iterator i = routes.begin(); i != routes.end(); i++) { Track *at; if ((at = dynamic_cast(*i)) != 0) { (at->*func)(val, this); diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 86a2f778dc..31bbded03b 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -113,18 +113,13 @@ class Source; class TempoMap; class VSTPlugin; -using std::vector; -using std::string; -using std::map; -using std::set; - class Session : public PBD::StatefulDestructible, public boost::noncopyable { private: typedef std::pair,bool> RouteBooleanState; - typedef vector GlobalRouteBooleanState; + typedef std::vector GlobalRouteBooleanState; typedef std::pair,MeterPoint> RouteMeterState; - typedef vector GlobalRouteMeterState; + typedef std::vector GlobalRouteMeterState; public: enum RecordState { @@ -179,8 +174,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable Route* route; }; - list audio_range; - list music_range; + std::list audio_range; + std::list music_range; boost::shared_ptr region; @@ -226,15 +221,15 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* creating from an XML file */ Session (AudioEngine&, - const string& fullpath, - const string& snapshot_name, - string mix_template = ""); + const std::string& fullpath, + const std::string& snapshot_name, + std::string mix_template = ""); /* creating a new Session */ Session (AudioEngine&, - string fullpath, - string snapshot_name, + std::string fullpath, + std::string snapshot_name, AutoConnectOption input_auto_connect, AutoConnectOption output_auto_connect, uint32_t control_out_channels, @@ -245,10 +240,10 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable virtual ~Session (); - string path() const { return _path; } - string name() const { return _name; } - string snap_name() const { return _current_snapshot_name; } - string raid_path () const; + std::string path() const { return _path; } + std::string name() const { return _name; } + std::string snap_name() const { return _current_snapshot_name; } + std::string raid_path () const; void set_snap_name (); @@ -277,12 +272,12 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable Glib::ustring peak_path (Glib::ustring) const; - static string change_source_path_by_name (string oldpath, string oldname, string newname, bool destructive); + static std::string change_source_path_by_name (std::string oldpath, std::string oldname, std::string newname, bool destructive); - string peak_path_from_audio_path (string) const; - string new_audio_source_name (const string&, uint32_t nchans, uint32_t chan, bool destructive); - string new_midi_source_name (const string&); - string new_source_path_from_name (DataType type, const string&); + std::string peak_path_from_audio_path (std::string) const; + std::string new_audio_source_name (const std::string&, uint32_t nchans, uint32_t chan, bool destructive); + std::string new_midi_source_name (const std::string&); + std::string new_source_path_from_name (DataType type, const std::string&); RouteList new_route_from_template (uint32_t how_many, const std::string& template_path); void process (nframes_t nframes); @@ -293,7 +288,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void add_diskstream (boost::shared_ptr); boost::shared_ptr diskstream_by_id (const PBD::ID& id); - boost::shared_ptr diskstream_by_name (string name); + boost::shared_ptr diskstream_by_name (std::string name); bool have_rec_enabled_diskstream () const; bool have_captured() const { return _have_captured; } @@ -330,12 +325,12 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable template void foreach_route (T *obj, void (T::*func)(boost::shared_ptr)); template void foreach_route (T *obj, void (T::*func)(Route&, A), A arg); - boost::shared_ptr route_by_name (string); + boost::shared_ptr route_by_name (std::string); boost::shared_ptr route_by_id (PBD::ID); boost::shared_ptr route_by_remote_id (uint32_t id); - bool route_name_unique (string) const; - bool route_name_internal (string) const; + bool route_name_unique (std::string) const; + bool route_name_internal (std::string) const; bool get_record_enabled() const { return (record_status () >= Enabled); @@ -437,7 +432,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void set_auto_punch_location (Location *); void set_auto_loop_location (Location *); - int location_name(string& result, string base = string("")); + int location_name(std::string& result, std::string base = std::string("")); void reset_input_monitor_state (); @@ -462,11 +457,11 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable static int rename_template (std::string old_name, std::string new_name); static int delete_template (std::string name); - sigc::signal StateSaved; + sigc::signal StateSaved; sigc::signal StateReady; - vector* possible_states() const; - static vector* possible_states(string path); + std::vector* possible_states() const; + static std::vector* possible_states (std::string path); XMLNode& get_state(); int set_state(const XMLNode& node); // not idempotent @@ -488,14 +483,14 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable StateOfTheState state_of_the_state() const { return _state_of_the_state; } - RouteGroup* add_edit_group (string); - RouteGroup* add_mix_group (string); + RouteGroup* add_edit_group (std::string); + RouteGroup* add_mix_group (std::string); void remove_edit_group (RouteGroup&); void remove_mix_group (RouteGroup&); - RouteGroup *mix_group_by_name (string); - RouteGroup *edit_group_by_name (string); + RouteGroup *mix_group_by_name (std::string); + RouteGroup *edit_group_by_name (std::string); sigc::signal edit_group_added; sigc::signal mix_group_added; @@ -503,13 +498,13 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable sigc::signal mix_group_removed; void foreach_edit_group (sigc::slot sl) { - for (list::iterator i = edit_groups.begin(); i != edit_groups.end(); i++) { + for (std::list::iterator i = edit_groups.begin(); i != edit_groups.end(); i++) { sl (*i); } } void foreach_mix_group (sigc::slot sl) { - for (list::iterator i = mix_groups.begin(); i != mix_groups.end(); i++) { + for (std::list::iterator i = mix_groups.begin(); i != mix_groups.end(); i++) { sl (*i); } } @@ -603,9 +598,9 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable sigc::signal >& > RegionsAdded; sigc::signal > RegionRemoved; - int region_name (string& result, string base = string(""), bool newlevel = false); - string new_region_name (string); - string path_from_region_name (DataType type, string name, string identifier); + int region_name (std::string& result, std::string base = std::string(""), bool newlevel = false); + std::string new_region_name (std::string); + std::string path_from_region_name (DataType type, std::string name, std::string identifier); boost::shared_ptr find_whole_file_parent (boost::shared_ptr); @@ -620,7 +615,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* source management */ struct ImportStatus : public InterThreadInfo { - string doing_what; + std::string doing_what; /* control info */ uint32_t total; @@ -634,8 +629,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable }; void import_audiofiles (ImportStatus&); - bool sample_rate_convert (ImportStatus&, string infile, string& outfile); - string build_tmp_convert_name (string file); + bool sample_rate_convert (ImportStatus&, std::string infile, std::string& outfile); + std::string build_tmp_convert_name (std::string file); boost::shared_ptr get_export_handler (); boost::shared_ptr get_export_status (); @@ -650,7 +645,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void remove_source (boost::weak_ptr); struct cleanup_report { - vector paths; + std::vector paths; int64_t space; }; @@ -686,7 +681,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* playlist management */ - boost::shared_ptr playlist_by_name (string name); + boost::shared_ptr playlist_by_name (std::string name); void unassigned_playlists (std::list > & list); void add_playlist (boost::shared_ptr, bool unused = false); sigc::signal > PlaylistAdded; @@ -699,7 +694,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* named selections */ - NamedSelection* named_selection_by_name (string name); + NamedSelection* named_selection_by_name (std::string name); void add_named_selection (NamedSelection *); void remove_named_selection (NamedSelection *); @@ -729,8 +724,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* flattening stuff */ boost::shared_ptr write_one_track (AudioTrack&, nframes_t start, nframes_t end, - bool overwrite, vector >&, InterThreadInfo& wot, - bool enable_processing = true); + bool overwrite, std::vector >&, InterThreadInfo& wot, + bool enable_processing = true); int freeze (InterThreadInfo&); /* session-wide solo/mute/rec-enable */ @@ -779,7 +774,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void add_bundle (boost::shared_ptr); void remove_bundle (boost::shared_ptr); - boost::shared_ptr bundle_by_name (string) const; + boost::shared_ptr bundle_by_name (std::string) const; sigc::signal > BundleAdded; sigc::signal > BundleRemoved; @@ -787,10 +782,10 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* MIDI control */ void midi_panic(void); - int set_mtc_port (string port_tag); - int set_mmc_port (string port_tag); - int set_midi_port (string port_tag); - int set_midi_clock_port (string port_tag); + int set_mtc_port (std::string port_tag); + int set_mmc_port (std::string port_tag); + int set_midi_port (std::string port_tag); + int set_midi_clock_port (std::string port_tag); MIDI::Port *mtc_port() const { return _mtc_port; } MIDI::Port *mmc_port() const { return _mmc_port; } MIDI::Port *midi_port() const { return _midi_port; } @@ -835,10 +830,10 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable uint32_t undo_depth() const { return _history.undo_depth(); } uint32_t redo_depth() const { return _history.redo_depth(); } - string next_undo() const { return _history.next_undo(); } - string next_redo() const { return _history.next_redo(); } + std::string next_undo() const { return _history.next_undo(); } + std::string next_redo() const { return _history.next_redo(); } - void begin_reversible_command (const string& cmd_name); + void begin_reversible_command (const std::string& cmd_name); void commit_reversible_command (Command* cmd = 0); void add_command (Command *const cmd) { @@ -939,8 +934,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* ranges */ - void set_audio_range (list&); - void set_music_range (list&); + void set_audio_range (std::list&); + void set_music_range (std::list&); void request_play_range (bool yn); bool get_play_range () const { return _play_range; } @@ -988,7 +983,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void update_latency_compensation (bool, bool); private: - int create (bool& new_session, const string& mix_template, nframes_t initial_length); + int create (bool& new_session, const std::string& mix_template, nframes_t initial_length); void destroy (); nframes_t compute_initial_length (); @@ -1155,8 +1150,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable MIDI::Port* _mtc_port; MIDI::Port* _midi_port; MIDI::Port* _midi_clock_port; - string _path; - string _name; + std::string _path; + std::string _name; bool session_send_mmc; bool session_send_mtc; bool session_midi_feedback; @@ -1172,7 +1167,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void when_engine_running (); void graph_reordered (); - string _current_snapshot_name; + std::string _current_snapshot_name; XMLTree* state_tree; bool state_was_pending; @@ -1181,7 +1176,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void auto_save(); int load_options (const XMLNode&); XMLNode& get_options () const; - int load_state (string snapshot_name); + int load_state (std::string snapshot_name); bool save_config_options_predicate (ConfigVariableBase::Owner owner) const; nframes_t _last_roll_location; @@ -1276,7 +1271,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable sigc::connection auto_loop_changed_connection; void auto_loop_changed (Location *); - typedef list Events; + typedef std::list Events; Events events; Events immediate_events; Events::iterator next_event; @@ -1297,7 +1292,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable bool _remove_event (Event *); void _clear_event_type (Event::Type); - void first_stage_init (string path, string snapshot_name); + void first_stage_init (std::string path, std::string snapshot_name); int second_stage_init (bool new_tracks); void find_current_end (); void remove_empty_sounds (); @@ -1357,7 +1352,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable double step_speed; typedef sigc::slot MidiTimeoutCallback; - typedef list MidiTimeoutList; + typedef std::list MidiTimeoutList; MidiTimeoutList midi_timeouts; bool mmc_step_timeout (); @@ -1450,8 +1445,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable int load_mix_groups (const XMLNode&); - list edit_groups; - list mix_groups; + std::list edit_groups; + std::list mix_groups; /* disk-streams */ @@ -1481,7 +1476,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void catch_up_on_solo_mute_override (); void update_route_solo_state (); void modify_solo_mute (bool, bool); - void strip_portname_for_solo (string& portname); + void strip_portname_for_solo (std::string& portname); /* REGION MANAGEMENT */ @@ -1489,7 +1484,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void update_region_name_map (boost::shared_ptr); mutable Glib::Mutex region_lock; - typedef map > RegionList; + typedef std::map > RegionList; RegionList regions; void add_region (boost::shared_ptr); @@ -1517,7 +1512,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* PLAYLISTS */ mutable Glib::Mutex playlist_lock; - typedef set > PlaylistList; + typedef std::set > PlaylistList; PlaylistList playlists; PlaylistList unused_playlists; @@ -1526,7 +1521,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void remove_playlist (boost::weak_ptr); void track_playlist (bool, boost::weak_ptr); - boost::shared_ptr playlist_factory (string name); + boost::shared_ptr playlist_factory (std::string name); boost::shared_ptr XMLPlaylistFactory (const XMLNode&); void playlist_length_changed (); @@ -1535,12 +1530,12 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* NAMED SELECTIONS */ mutable Glib::Mutex named_selection_lock; - typedef set NamedSelectionList; + typedef std::set NamedSelectionList; NamedSelectionList named_selections; int load_named_selections (const XMLNode&); - NamedSelection *named_selection_factory (string name); + NamedSelection *named_selection_factory (std::string name); NamedSelection *XMLNamedSelectionFactory (const XMLNode&); /* CURVES and AUTOMATION LISTS */ @@ -1566,10 +1561,10 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* INSERT AND SEND MANAGEMENT */ - list _port_inserts; - list _plugin_inserts; - list _sends; - list _returns; + std::list _port_inserts; + std::list _plugin_inserts; + std::list _sends; + std::list _returns; boost::dynamic_bitset send_bitset; boost::dynamic_bitset return_bitset; boost::dynamic_bitset insert_bitset; @@ -1584,7 +1579,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable struct space_and_path { uint32_t blocks; /* 4kB blocks */ - string path; + std::string path; space_and_path() { blocks = 0; @@ -1597,14 +1592,14 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable } }; - void setup_raid_path (string path); + void setup_raid_path (std::string path); - vector session_dirs; - vector::iterator last_rr_session_dir; + std::vector session_dirs; + std::vector::iterator last_rr_session_dir; uint32_t _total_free_4k_blocks; Glib::Mutex space_lock; - string get_best_session_directory_for_new_source (); + std::string get_best_session_directory_for_new_source (); void refresh_disk_space (); mutable gint _playback_load; @@ -1663,7 +1658,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable static Pool pool; }; - typedef list Clicks; + typedef std::list Clicks; Clicks clicks; bool _clicking; @@ -1684,11 +1679,11 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void clear_clicks (); void click (nframes_t start, nframes_t nframes); - vector master_outs; + std::vector master_outs; /* range playback */ - list current_audio_range; + std::list current_audio_range; bool _play_range; void set_play_range (bool yn); void setup_auto_play (); diff --git a/libs/ardour/ardour/session_directory.h b/libs/ardour/ardour/session_directory.h index 3e35c42de2..9a3f4d4d77 100644 --- a/libs/ardour/ardour/session_directory.h +++ b/libs/ardour/ardour/session_directory.h @@ -26,10 +26,6 @@ namespace ARDOUR { -using std::string; -using std::vector; -using PBD::sys::path; - class SessionDirectory { public: @@ -37,12 +33,12 @@ public: /** * @param session_path An absolute path to a session directory. */ - SessionDirectory (const path& session_path); + SessionDirectory (const PBD::sys::path& session_path); /** * @return the absolute path to the root directory of the session */ - const path root_path() const { return m_root_path; } + const PBD::sys::path root_path() const { return m_root_path; } /** * @return the absolute path to the directory in which @@ -53,47 +49,47 @@ public: * directory otherwise it will return the new location * of root_path()/interchange/session_name/audiofiles */ - const path sound_path () const; + const PBD::sys::path sound_path () const; /** * @return the absolute path to the directory in which * the session stores MIDI files, ie * root_path()/interchange/session_name/midifiles */ - const path midi_path () const; + const PBD::sys::path midi_path () const; /** * @return the absolute path to the directory in which * the session stores MIDNAM patch files, ie * root_path()/interchange/session_name/patchfiles */ - const path midi_patch_path () const; + const PBD::sys::path midi_patch_path () const; /** * @return The absolute path to the directory in which all * peak files are stored for a session. */ - const path peak_path () const; + const PBD::sys::path peak_path () const; /** * @return The absolute path to the directory that audio * files are moved to when they are no longer part of the * session. */ - const path dead_sound_path () const; + const PBD::sys::path dead_sound_path () const; /** * @return The absolute path to the directory that midi * files are moved to when they are no longer part of the * session. */ - const path dead_midi_path () const; + const PBD::sys::path dead_midi_path () const; /** * @return The absolute path to the directory that audio * files are created in by default when exporting. */ - const path export_path () const; + const PBD::sys::path export_path () const; /** * @return true if session directory and all the required @@ -120,22 +116,22 @@ protected: * @return The path to the old style sound directory. * It isn't created by create(). */ - const path old_sound_path () const; + const PBD::sys::path old_sound_path () const; /** * @return The path to the directory under which source directories * are created for different source types. * i.e root_path()/interchange/session_name */ - const path sources_root() const; + const PBD::sys::path sources_root() const; /** * @return a vector containing the fullpath of all subdirectories. */ - const vector sub_directories () const; + const std::vector sub_directories () const; /// The path to the root of the session directory. - const path m_root_path; + const PBD::sys::path m_root_path; }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/session_metadata.h b/libs/ardour/ardour/session_metadata.h index e579c5102b..71dd59904c 100644 --- a/libs/ardour/ardour/session_metadata.h +++ b/libs/ardour/ardour/session_metadata.h @@ -31,9 +31,6 @@ namespace ARDOUR { -using std::string; -using Glib::ustring; - /** Represents metadata associated to a Session * Metadata can be accessed and edited via this class. * Exported files can also be tagged with this data. @@ -45,68 +42,68 @@ class SessionMetadata : public PBD::StatefulDestructible ~SessionMetadata (); /*** Accessing ***/ - ustring comment () const; - ustring copyright () const; - ustring isrc () const; + Glib::ustring comment () const; + Glib::ustring copyright () const; + Glib::ustring isrc () const; uint32_t year () const; - ustring grouping () const; - ustring title () const; - ustring subtitle () const; + Glib::ustring grouping () const; + Glib::ustring title () const; + Glib::ustring subtitle () const; - ustring artist () const; - ustring album_artist () const; - ustring lyricist () const; - ustring composer () const; - ustring conductor () const; - ustring remixer () const; - ustring arranger () const; - ustring engineer () const; - ustring producer () const; - ustring dj_mixer () const; - ustring mixer () const; + Glib::ustring artist () const; + Glib::ustring album_artist () const; + Glib::ustring lyricist () const; + Glib::ustring composer () const; + Glib::ustring conductor () const; + Glib::ustring remixer () const; + Glib::ustring arranger () const; + Glib::ustring engineer () const; + Glib::ustring producer () const; + Glib::ustring dj_mixer () const; + Glib::ustring mixer () const; - ustring album () const; - ustring compilation () const; - ustring disc_subtitle () const; + Glib::ustring album () const; + Glib::ustring compilation () const; + Glib::ustring disc_subtitle () const; uint32_t disc_number () const; uint32_t total_discs () const; uint32_t track_number () const; uint32_t total_tracks () const; - ustring genre () const; + Glib::ustring genre () const; /*** Editing ***/ - void set_comment (const ustring &); - void set_copyright (const ustring &); - void set_isrc (const ustring &); + void set_comment (const Glib::ustring &); + void set_copyright (const Glib::ustring &); + void set_isrc (const Glib::ustring &); void set_year (uint32_t); - void set_grouping (const ustring &); - void set_title (const ustring &); - void set_subtitle (const ustring &); + void set_grouping (const Glib::ustring &); + void set_title (const Glib::ustring &); + void set_subtitle (const Glib::ustring &); - void set_artist (const ustring &); - void set_album_artist (const ustring &); - void set_lyricist (const ustring &); - void set_composer (const ustring &); - void set_conductor (const ustring &); - void set_remixer (const ustring &); - void set_arranger (const ustring &); - void set_engineer (const ustring &); - void set_producer (const ustring &); - void set_dj_mixer (const ustring &); - void set_mixer (const ustring &); + void set_artist (const Glib::ustring &); + void set_album_artist (const Glib::ustring &); + void set_lyricist (const Glib::ustring &); + void set_composer (const Glib::ustring &); + void set_conductor (const Glib::ustring &); + void set_remixer (const Glib::ustring &); + void set_arranger (const Glib::ustring &); + void set_engineer (const Glib::ustring &); + void set_producer (const Glib::ustring &); + void set_dj_mixer (const Glib::ustring &); + void set_mixer (const Glib::ustring &); - void set_album (const ustring &); - void set_compilation (const ustring &); - void set_disc_subtitle (const ustring &); + void set_album (const Glib::ustring &); + void set_compilation (const Glib::ustring &); + void set_disc_subtitle (const Glib::ustring &); void set_disc_number (uint32_t); void set_total_discs (uint32_t); void set_track_number (uint32_t); void set_total_tracks (uint32_t); - void set_genre (const ustring &); + void set_genre (const Glib::ustring &); /*** Serialization ***/ XMLNode & get_state (); @@ -114,17 +111,17 @@ class SessionMetadata : public PBD::StatefulDestructible private: - typedef std::pair Property; - typedef std::map PropertyMap; + typedef std::pair Property; + typedef std::map PropertyMap; PropertyMap map; - XMLNode * get_xml (const ustring & name); + XMLNode * get_xml (const Glib::ustring & name); - ustring get_value (const ustring & name) const; - uint32_t get_uint_value (const ustring & name) const; + Glib::ustring get_value (const Glib::ustring & name) const; + uint32_t get_uint_value (const Glib::ustring & name) const; - void set_value (const ustring & name, const ustring & value); - void set_value (const ustring & name, uint32_t value); + void set_value (const Glib::ustring & name, const Glib::ustring & value); + void set_value (const Glib::ustring & name, uint32_t value); }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/session_state_utils.h b/libs/ardour/ardour/session_state_utils.h index f9b1cdb63f..a41456b8f7 100644 --- a/libs/ardour/ardour/session_state_utils.h +++ b/libs/ardour/ardour/session_state_utils.h @@ -26,10 +26,6 @@ namespace ARDOUR { -using std::string; -using std::vector; -using namespace PBD; - /** * Attempt to create a backup copy of a file. * @@ -38,7 +34,7 @@ using namespace PBD; * * @return true if successful, false otherwise. */ -bool create_backup_file (const sys::path & file_path); +bool create_backup_file (const PBD::sys::path & file_path); /** * Get the absolute paths to all state files in the directory @@ -47,8 +43,8 @@ bool create_backup_file (const sys::path & file_path); * @param directory_path The absolute path to a directory. * @param result vector to contain resulting state files. */ -void get_state_files_in_directory (const sys::path & directory_path, - vector& result); +void get_state_files_in_directory (const PBD::sys::path & directory_path, + std::vector& result); /** * Given a vector of paths to files, return a vector containing @@ -58,7 +54,7 @@ void get_state_files_in_directory (const sys::path & directory_path, * @return a vector containing a list of file names without any * filename extension. */ -vector get_file_names_no_extension (const vector & file_paths); +std::vector get_file_names_no_extension (const std::vector & file_paths); } // namespace ARDOUR diff --git a/libs/ardour/ardour/session_utils.h b/libs/ardour/ardour/session_utils.h index 8a9f6f584c..f7e43e6073 100644 --- a/libs/ardour/ardour/session_utils.h +++ b/libs/ardour/ardour/session_utils.h @@ -6,9 +6,7 @@ namespace ARDOUR { -using std::string; - -int find_session (string str, string& path, string& snapshot, bool& isnew); +int find_session (std::string str, std::string& path, std::string& snapshot, bool& isnew); /** * Create a SessionDirectory at the path specified by @@ -19,7 +17,7 @@ int find_session (string str, string& path, string& snapshot, bool& isnew); * * @see SessionDirectory */ -bool create_session_directory (const string& session_directory_path); +bool create_session_directory (const std::string& session_directory_path); }; diff --git a/libs/ardour/ardour/sndfile_helpers.h b/libs/ardour/ardour/sndfile_helpers.h index cf6b15f3a4..23ece80df2 100644 --- a/libs/ardour/ardour/sndfile_helpers.h +++ b/libs/ardour/ardour/sndfile_helpers.h @@ -23,8 +23,6 @@ #include #include -using std::string; - // Use this define when initializing arrarys for use in sndfile_*_format() #define SNDFILE_STR_LENGTH 32 @@ -44,15 +42,15 @@ extern const char * const sndfile_endian_formats_strings[SNDFILE_ENDIAN_FORMATS+ extern int sndfile_endian_formats[SNDFILE_ENDIAN_FORMATS]; -int sndfile_bitdepth_format_from_string(string); -int sndfile_header_format_from_string(string); -int sndfile_endian_format_from_string(string); -string sndfile_file_ending_from_string(string); +int sndfile_bitdepth_format_from_string (std::string); +int sndfile_header_format_from_string (std::string); +int sndfile_endian_format_from_string (std::string); +std::string sndfile_file_ending_from_string (std::string); int sndfile_data_width (int format); // It'd be nice if libsndfile did this for us -string sndfile_major_format(int); -string sndfile_minor_format(int); +std::string sndfile_major_format (int); +std::string sndfile_minor_format (int); #endif /* __sndfile_helpers_h__ */ diff --git a/libs/ardour/ardour/sndfilesource.h b/libs/ardour/ardour/sndfilesource.h index 6c4e61d569..d50dbad664 100644 --- a/libs/ardour/ardour/sndfilesource.h +++ b/libs/ardour/ardour/sndfilesource.h @@ -60,7 +60,7 @@ class SndFileSource : public AudioFileSource { static void setup_standard_crossfades (nframes_t sample_rate); static const Source::Flag default_writable_flags; - static int get_soundfile_info (const Glib::ustring& path, SoundFileInfo& _info, string& error_msg); + static int get_soundfile_info (const Glib::ustring& path, SoundFileInfo& _info, std::string& error_msg); protected: void set_header_timeline_position (); diff --git a/libs/ardour/ardour/tape_file_matcher.h b/libs/ardour/ardour/tape_file_matcher.h index 59ec18e818..ff6e23dc79 100644 --- a/libs/ardour/ardour/tape_file_matcher.h +++ b/libs/ardour/ardour/tape_file_matcher.h @@ -25,15 +25,13 @@ namespace ARDOUR { -using std::string; - class TapeFileMatcher { public: TapeFileMatcher(); - bool matches (const string& filename) const; + bool matches (const std::string& filename) const; private: diff --git a/libs/ardour/ardour/template_utils.h b/libs/ardour/ardour/template_utils.h index 075bcf1e3c..f40ed1c552 100644 --- a/libs/ardour/ardour/template_utils.h +++ b/libs/ardour/ardour/template_utils.h @@ -8,14 +8,11 @@ namespace ARDOUR { - using std::vector; - using namespace PBD; + PBD::sys::path system_template_directory (); + PBD::sys::path system_route_template_directory (); - sys::path system_template_directory (); - sys::path system_route_template_directory (); - - sys::path user_template_directory (); - sys::path user_route_template_directory (); + PBD::sys::path user_template_directory (); + PBD::sys::path user_route_template_directory (); struct TemplateInfo { std::string name; diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index e82639ef51..d88c5366d2 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -36,9 +36,6 @@ class XMLNode; -using std::list; -using std::vector; - namespace ARDOUR { class Meter; class Tempo { @@ -123,7 +120,7 @@ class MeterSection : public MetricSection, public Meter { : MetricSection (start), Meter (bpb, note_type) {} MeterSection (const XMLNode&); - static const string xml_state_node_name; + static const std::string xml_state_node_name; XMLNode& get_state() const; }; @@ -136,12 +133,12 @@ class TempoSection : public MetricSection, public Tempo { : MetricSection (start), Tempo (qpm, note_type) {} TempoSection (const XMLNode&); - static const string xml_state_node_name; + static const std::string xml_state_node_name; XMLNode& get_state() const; }; -typedef list Metrics; +typedef std::list Metrics; class TempoMap : public PBD::StatefulDestructible { @@ -169,7 +166,7 @@ class TempoMap : public PBD::StatefulDestructible : type (ty), frame (f), meter (&m), tempo (&t), bar (b), beat (e) {} }; - typedef vector BBTPointList; + typedef std::vector BBTPointList; template void apply_with_metrics (T& obj, void (T::*method)(const Metrics&)) { Glib::RWLock::ReaderLock lm (lock); diff --git a/libs/ardour/ardour/tempo_map_importer.h b/libs/ardour/ardour/tempo_map_importer.h index 6351596f74..beacbc1e01 100644 --- a/libs/ardour/ardour/tempo_map_importer.h +++ b/libs/ardour/ardour/tempo_map_importer.h @@ -36,7 +36,7 @@ class TempoMapImportHandler : public ElementImportHandler { public: TempoMapImportHandler (XMLTree const & source, Session & session); - string get_info () const; + std::string get_info () const; }; class TempoMapImporter : public ElementImporter @@ -46,7 +46,7 @@ class TempoMapImporter : public ElementImporter public: TempoMapImporter (XMLTree const & source, Session & session, XMLNode const & node); - virtual string get_info () const; + virtual std::string get_info () const; protected: bool _prepare_move (); diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index 96826e3eaa..700380417b 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -34,7 +34,7 @@ class Region; class Track : public Route { public: - Track (Session&, string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal, DataType default_type = DataType::AUDIO); + Track (Session&, std::string name, Route::Flag f = Route::Flag (0), TrackMode m = Normal, DataType default_type = DataType::AUDIO); virtual ~Track (); @@ -60,7 +60,7 @@ class Track : public Route boost::shared_ptr diskstream() const { return _diskstream; } - virtual int use_diskstream (string name) = 0; + virtual int use_diskstream (std::string name) = 0; virtual int use_diskstream (const PBD::ID& id) = 0; nframes_t update_total_latency(); @@ -122,7 +122,7 @@ class Track : public Route ~FreezeRecord(); boost::shared_ptr playlist; - vector processor_info; + std::vector processor_info; bool have_mementos; FreezeState state; gain_t gain; diff --git a/libs/ardour/ardour/vst_plugin.h b/libs/ardour/ardour/vst_plugin.h index d4ca3b8b60..1cb7e376e4 100644 --- a/libs/ardour/ardour/vst_plugin.h +++ b/libs/ardour/ardour/vst_plugin.h @@ -32,11 +32,6 @@ #include #include "ardour/plugin.h" -using std::string; -using std::vector; -using std::list; -using std::map; - struct _FSTHandle; struct _FST; typedef struct _FSTHandle FSTHandle; @@ -76,8 +71,8 @@ class VSTPlugin : public ARDOUR::Plugin ChanMapping in, ChanMapping out, nframes_t nframes, nframes_t offset); - string describe_parameter (Evoral::Parameter); - string state_node_name() const { return "vst"; } + std::string describe_parameter (Evoral::Parameter); + std::string state_node_name() const { return "vst"; } void print_parameter (uint32_t, char*, uint32_t len) const; bool parameter_is_audio(uint32_t i) const { return false; } @@ -85,8 +80,8 @@ class VSTPlugin : public ARDOUR::Plugin bool parameter_is_input(uint32_t i) const { return true; } bool parameter_is_output(uint32_t i) const { return false; } - bool load_preset (const string preset_label ); - bool save_preset(string name); + bool load_preset (const std::string preset_label ); + bool save_preset (std::string name); bool has_editor () const; diff --git a/libs/ardour/audio_library.cc b/libs/ardour/audio_library.cc index b64a9ee08d..3dc97c622a 100644 --- a/libs/ardour/audio_library.cc +++ b/libs/ardour/audio_library.cc @@ -35,6 +35,7 @@ #include "i18n.h" using namespace std; +using namespace PBD; using namespace ARDOUR; namespace { diff --git a/libs/ardour/audio_playlist_importer.cc b/libs/ardour/audio_playlist_importer.cc index aaa237c860..905169345f 100644 --- a/libs/ardour/audio_playlist_importer.cc +++ b/libs/ardour/audio_playlist_importer.cc @@ -31,6 +31,7 @@ #include "ardour/playlist.h" #include "ardour/playlist_factory.h" +using namespace std; using namespace PBD; using namespace ARDOUR; diff --git a/libs/ardour/audio_region_importer.cc b/libs/ardour/audio_region_importer.cc index 90fc7bac4d..de5d6f7102 100644 --- a/libs/ardour/audio_region_importer.cc +++ b/libs/ardour/audio_region_importer.cc @@ -34,6 +34,7 @@ #include "i18n.h" +using namespace std; using namespace PBD; using namespace ARDOUR; diff --git a/libs/ardour/audio_track_importer.cc b/libs/ardour/audio_track_importer.cc index f822cfb832..dd453f34c3 100644 --- a/libs/ardour/audio_track_importer.cc +++ b/libs/ardour/audio_track_importer.cc @@ -32,6 +32,7 @@ #include "i18n.h" +using namespace std; using namespace PBD; using namespace ARDOUR; diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc index 48aaeb8d08..3f5665ee99 100644 --- a/libs/ardour/audiofilesource.cc +++ b/libs/ardour/audiofilesource.cc @@ -58,6 +58,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace Glib; diff --git a/libs/ardour/broadcast_info.cc b/libs/ardour/broadcast_info.cc index bf8c0b5260..bb8aedae88 100644 --- a/libs/ardour/broadcast_info.cc +++ b/libs/ardour/broadcast_info.cc @@ -81,7 +81,7 @@ BroadcastInfo::set_from_session (Session const & session, int64_t time_ref) } bool -BroadcastInfo::load_from_file (string const & filename) +BroadcastInfo::load_from_file (std::string const & filename) { SNDFILE * file = 0; SF_INFO info; @@ -112,7 +112,7 @@ BroadcastInfo::load_from_file (SNDFILE* sf) return true; } -string +std::string BroadcastInfo::get_description () const { return info->description; @@ -136,12 +136,12 @@ BroadcastInfo::get_origination_time () const { struct tm ret; - string date = info->origination_date; + std::string date = info->origination_date; ret.tm_year = atoi (date.substr (0, 4)) - 1900; ret.tm_mon = atoi (date.substr (5, 2)); ret.tm_mday = atoi (date.substr (8, 2)); - string time = info->origination_time; + std::string time = info->origination_time; ret.tm_hour = atoi (time.substr (0,2)); ret.tm_min = atoi (time.substr (3,2)); ret.tm_sec = atoi (time.substr (6,2)); @@ -149,20 +149,20 @@ BroadcastInfo::get_origination_time () const return ret; } -string +std::string BroadcastInfo::get_originator () const { return info->originator; } -string +std::string BroadcastInfo::get_originator_ref () const { return info->originator_reference; } bool -BroadcastInfo::write_to_file (string const & filename) +BroadcastInfo::write_to_file (std::string const & filename) { SNDFILE * file = 0; SF_INFO info; @@ -192,7 +192,7 @@ BroadcastInfo::write_to_file (SNDFILE* sf) } void -BroadcastInfo::set_description (string const & desc) +BroadcastInfo::set_description (std::string const & desc) { _has_info = true; @@ -229,7 +229,7 @@ BroadcastInfo::set_origination_time (struct tm * now) } void -BroadcastInfo::set_originator (string const & str) +BroadcastInfo::set_originator (std::string const & str) { _has_info = true; @@ -242,7 +242,7 @@ BroadcastInfo::set_originator (string const & str) } void -BroadcastInfo::set_originator_ref (string const & str) +BroadcastInfo::set_originator_ref (std::string const & str) { _has_info = true; diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc index 98d056a8f1..c21f239a45 100644 --- a/libs/ardour/bundle.cc +++ b/libs/ardour/bundle.cc @@ -28,6 +28,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; diff --git a/libs/ardour/chan_count.cc b/libs/ardour/chan_count.cc index e60104dad8..b11c578455 100644 --- a/libs/ardour/chan_count.cc +++ b/libs/ardour/chan_count.cc @@ -26,6 +26,8 @@ static const char* state_node_name = "Channels"; +using namespace std; + namespace ARDOUR { // infinite/zero chan count stuff, for setting minimums and maximums, etc. diff --git a/libs/ardour/control_protocol_search_path.cc b/libs/ardour/control_protocol_search_path.cc index e2b4137565..a74195b4c0 100644 --- a/libs/ardour/control_protocol_search_path.cc +++ b/libs/ardour/control_protocol_search_path.cc @@ -27,6 +27,8 @@ namespace { const char * const surfaces_env_variable_name = "ARDOUR_SURFACES_PATH"; } // anonymous +using namespace PBD; + namespace ARDOUR { SearchPath diff --git a/libs/ardour/element_import_handler.cc b/libs/ardour/element_import_handler.cc index 53b5741622..c360e82206 100644 --- a/libs/ardour/element_import_handler.cc +++ b/libs/ardour/element_import_handler.cc @@ -22,6 +22,7 @@ #include +using namespace std; using namespace ARDOUR; bool ElementImportHandler::_dirty = false; diff --git a/libs/ardour/element_importer.cc b/libs/ardour/element_importer.cc index 500ad87147..eb6e39d13a 100644 --- a/libs/ardour/element_importer.cc +++ b/libs/ardour/element_importer.cc @@ -28,6 +28,7 @@ #include "i18n.h" +using namespace std; using namespace PBD; using namespace ARDOUR; diff --git a/libs/ardour/export_channel_configuration.cc b/libs/ardour/export_channel_configuration.cc index b835cca559..4fe8c09cb6 100644 --- a/libs/ardour/export_channel_configuration.cc +++ b/libs/ardour/export_channel_configuration.cc @@ -34,6 +34,8 @@ #include "pbd/convert.h" #include "pbd/pthread_utils.h" +using namespace PBD; + namespace ARDOUR { diff --git a/libs/ardour/export_file_io.cc b/libs/ardour/export_file_io.cc index ebf6ff53b8..2f8fdeacdf 100644 --- a/libs/ardour/export_file_io.cc +++ b/libs/ardour/export_file_io.cc @@ -27,6 +27,8 @@ #include "i18n.h" +using namespace std; +using namespace Glib; using namespace PBD; namespace ARDOUR diff --git a/libs/ardour/export_filename.cc b/libs/ardour/export_filename.cc index d2453caf37..539d4f2027 100644 --- a/libs/ardour/export_filename.cc +++ b/libs/ardour/export_filename.cc @@ -34,6 +34,7 @@ #include "i18n.h" using namespace PBD; +using namespace Glib; namespace ARDOUR { diff --git a/libs/ardour/export_formats.cc b/libs/ardour/export_formats.cc index d6337b0a5f..a3fa389e8c 100644 --- a/libs/ardour/export_formats.cc +++ b/libs/ardour/export_formats.cc @@ -22,6 +22,8 @@ #include "i18n.h" +using namespace std; + namespace ARDOUR { diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc index c26ba7e1b3..d80001ac88 100644 --- a/libs/ardour/export_handler.cc +++ b/libs/ardour/export_handler.cc @@ -33,8 +33,8 @@ #include "ardour/export_processor.h" #include "ardour/export_failed.h" +using namespace std; using namespace PBD; -using std::ofstream; namespace ARDOUR { diff --git a/libs/ardour/export_preset.cc b/libs/ardour/export_preset.cc index b8e5098767..093803daa6 100644 --- a/libs/ardour/export_preset.cc +++ b/libs/ardour/export_preset.cc @@ -22,6 +22,7 @@ #include "ardour/session.h" +using namespace std; using namespace ARDOUR; ExportPreset::ExportPreset (string filename, Session & s) : diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc index c0a537b927..529a4e3d9f 100644 --- a/libs/ardour/export_profile_manager.cc +++ b/libs/ardour/export_profile_manager.cc @@ -42,6 +42,8 @@ #include "i18n.h" +using namespace std; +using namespace Glib; using namespace PBD; namespace ARDOUR diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc index 38c968a589..0fbea94cc1 100644 --- a/libs/ardour/file_source.cc +++ b/libs/ardour/file_source.cc @@ -46,6 +46,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; using namespace Glib; diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index bc2055c0dc..7372c467a6 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -27,6 +27,8 @@ #define WITH_STATIC_PATHS 1 +using namespace PBD; + namespace ARDOUR { using std::string; diff --git a/libs/ardour/filter.cc b/libs/ardour/filter.cc index 14cec979a9..32e942b924 100644 --- a/libs/ardour/filter.cc +++ b/libs/ardour/filter.cc @@ -32,6 +32,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; diff --git a/libs/ardour/find_session.cc b/libs/ardour/find_session.cc index 417902b805..e28bbe9ccb 100644 --- a/libs/ardour/find_session.cc +++ b/libs/ardour/find_session.cc @@ -14,6 +14,7 @@ #include "i18n.h" +using namespace std; using namespace PBD; int diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index ef9605f467..ff7e665ff1 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -63,10 +63,10 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; - static boost::shared_ptr open_importable_source (const string& path, nframes_t samplerate, ARDOUR::SrcQuality quality) { diff --git a/libs/ardour/jack_slave.cc b/libs/ardour/jack_slave.cc index ebf309ac3b..289b0a8fa9 100644 --- a/libs/ardour/jack_slave.cc +++ b/libs/ardour/jack_slave.cc @@ -28,6 +28,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace sigc; diff --git a/libs/ardour/location_importer.cc b/libs/ardour/location_importer.cc index 48a8cb1f67..31a49e44f5 100644 --- a/libs/ardour/location_importer.cc +++ b/libs/ardour/location_importer.cc @@ -29,6 +29,7 @@ #include "i18n.h" +using namespace std; using namespace PBD; using namespace ARDOUR; diff --git a/libs/ardour/midi_clock_slave.cc b/libs/ardour/midi_clock_slave.cc index c90a7ed0be..f3dbfeace1 100644 --- a/libs/ardour/midi_clock_slave.cc +++ b/libs/ardour/midi_clock_slave.cc @@ -37,6 +37,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace sigc; using namespace MIDI; diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc index 0039d4e536..91a8531b56 100644 --- a/libs/ardour/mtc_slave.cc +++ b/libs/ardour/mtc_slave.cc @@ -33,6 +33,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace sigc; using namespace MIDI; diff --git a/libs/ardour/named_selection.cc b/libs/ardour/named_selection.cc index efd636e7f4..eea726cdca 100644 --- a/libs/ardour/named_selection.cc +++ b/libs/ardour/named_selection.cc @@ -27,6 +27,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; diff --git a/libs/ardour/playlist_factory.cc b/libs/ardour/playlist_factory.cc index 01510fe456..4da4c1b192 100644 --- a/libs/ardour/playlist_factory.cc +++ b/libs/ardour/playlist_factory.cc @@ -26,6 +26,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index 44b2d96532..72e34aec01 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -54,6 +54,7 @@ #include "i18n.h" #include +using namespace std; using namespace ARDOUR; using namespace PBD; diff --git a/libs/ardour/session_directory.cc b/libs/ardour/session_directory.cc index 612e446e08..d56998b550 100644 --- a/libs/ardour/session_directory.cc +++ b/libs/ardour/session_directory.cc @@ -28,6 +28,7 @@ namespace ARDOUR { +using namespace std; using namespace PBD::sys; SessionDirectory::SessionDirectory (const path& session_path) diff --git a/libs/ardour/session_events.cc b/libs/ardour/session_events.cc index ddad759deb..06f4598af7 100644 --- a/libs/ardour/session_events.cc +++ b/libs/ardour/session_events.cc @@ -31,6 +31,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; diff --git a/libs/ardour/session_metadata.cc b/libs/ardour/session_metadata.cc index 8f3680e7b1..8805cf5a0d 100644 --- a/libs/ardour/session_metadata.cc +++ b/libs/ardour/session_metadata.cc @@ -22,9 +22,10 @@ #include #include +using namespace std; +using namespace Glib; using namespace ARDOUR; - SessionMetadata::SessionMetadata () { /*** General ***/ diff --git a/libs/ardour/session_state_utils.cc b/libs/ardour/session_state_utils.cc index 00ab88d0ef..7f12cb4066 100644 --- a/libs/ardour/session_state_utils.cc +++ b/libs/ardour/session_state_utils.cc @@ -27,6 +27,9 @@ #include "i18n.h" +using namespace std; +using namespace PBD; + namespace ARDOUR { bool @@ -52,7 +55,7 @@ create_backup_file (const sys::path & file_path) void get_state_files_in_directory (const sys::path & directory_path, - vector & result) + vector & result) { Glib::PatternSpec state_file_pattern('*' + string(statefile_suffix)); diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc index de86b217ca..264ce10c82 100644 --- a/libs/ardour/session_time.cc +++ b/libs/ardour/session_time.cc @@ -36,6 +36,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; diff --git a/libs/ardour/session_utils.cc b/libs/ardour/session_utils.cc index 3dfa862674..4800d3b099 100644 --- a/libs/ardour/session_utils.cc +++ b/libs/ardour/session_utils.cc @@ -7,6 +7,7 @@ namespace ARDOUR { +using namespace std; using namespace PBD; bool diff --git a/libs/ardour/tape_file_matcher.cc b/libs/ardour/tape_file_matcher.cc index 9661ccf662..bedb7e629b 100644 --- a/libs/ardour/tape_file_matcher.cc +++ b/libs/ardour/tape_file_matcher.cc @@ -22,6 +22,8 @@ #include "i18n.h" +using namespace std; + namespace { const char* const tape_file_regex_string = X_("/T[0-9][0-9][0-9][0-9]-"); diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index 3f380c0fd6..a7a7eee321 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -12,6 +12,9 @@ #include "ardour/filename_extensions.h" #include "ardour/io.h" +using namespace std; +using namespace PBD; + namespace ARDOUR { sys::path diff --git a/libs/ardour/tempo_map_importer.cc b/libs/ardour/tempo_map_importer.cc index d934eac2af..457f8c7b53 100644 --- a/libs/ardour/tempo_map_importer.cc +++ b/libs/ardour/tempo_map_importer.cc @@ -29,6 +29,7 @@ #include "i18n.h" +using namespace std; using namespace PBD; using namespace ARDOUR; diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index f36f6de84f..468aa16f8e 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -21,7 +21,6 @@ #define __pbd_gtk_ui_h__ #include -#include #include #include @@ -42,9 +41,6 @@ #include #include -using std::string; -using std::queue; - class Touchable; namespace Gtkmm2ext { @@ -89,7 +85,7 @@ struct UIRequest : public BaseUI::BaseRequestObject { class UI : public Receiver, public AbstractUI { public: - UI (string name, int *argc, char **argv[]); + UI (std::string name, int *argc, char **argv[]); virtual ~UI (); static UI *instance() { return theGtkUI; } @@ -109,7 +105,7 @@ class UI : public Receiver, public AbstractUI bool running (); void quit (); void kill (); - int load_rcfile (string, bool themechange = false); + int load_rcfile (std::string, bool themechange = false); void run (Receiver &old_receiver); void set_state (Gtk::Widget *w, Gtk::StateType state); @@ -127,7 +123,7 @@ class UI : public Receiver, public AbstractUI Glib::signal_idle().connect (bind (slot (&UI::idle_delete), obj)); } - Gdk::Color get_color (const string& prompt, bool& picked, const Gdk::Color *initial = 0); + Gdk::Color get_color (const std::string& prompt, bool& picked, const Gdk::Color *initial = 0); /* starting is sent just before we enter the main loop, stopping just after we return from it (at the top level) diff --git a/libs/gtkmm2ext/gtkmm2ext/textviewer.h b/libs/gtkmm2ext/gtkmm2ext/textviewer.h index 9cc639cd75..004e2d99db 100644 --- a/libs/gtkmm2ext/gtkmm2ext/textviewer.h +++ b/libs/gtkmm2ext/gtkmm2ext/textviewer.h @@ -24,8 +24,6 @@ #include -using std::string; - namespace Gtkmm2ext { class TextViewer : public Gtk::Window, public Transmitter @@ -46,7 +44,7 @@ class TextViewer : public Gtk::Window, public Transmitter Gtk::TextView& text() { return etext; } Gtk::Button& dismiss_button() { return dismiss; } - void insert_file (const string &); + void insert_file (const std::string &); void scroll_to_bottom (); void deliver (); diff --git a/libs/gtkmm2ext/gtkmm2ext/window_title.h b/libs/gtkmm2ext/gtkmm2ext/window_title.h index 93b47d9d45..62a131c096 100644 --- a/libs/gtkmm2ext/gtkmm2ext/window_title.h +++ b/libs/gtkmm2ext/gtkmm2ext/window_title.h @@ -24,8 +24,6 @@ namespace Gtkmm2ext { -using std::string; - /** * \class The WindowTitle class can be used to maintain the * consistancy of window titles between windows and dialogs. @@ -42,19 +40,19 @@ public: * which will may be the application name or the document * name in a document based application. */ - WindowTitle(const string& title); + WindowTitle(const std::string& title); /** * Add an string element to the window title. */ - void operator+= (const string&); + void operator+= (const std::string&); /// @return The window title string. - const string& get_string () { return m_title;} + const std::string& get_string () { return m_title;} private: - string m_title; + std::string m_title; }; diff --git a/libs/gtkmm2ext/window_title.cc b/libs/gtkmm2ext/window_title.cc index 7c942d7f20..68913aeef6 100644 --- a/libs/gtkmm2ext/window_title.cc +++ b/libs/gtkmm2ext/window_title.cc @@ -21,6 +21,8 @@ #include "i18n.h" +using namespace std; + namespace { // I don't know if this should be translated. diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h index ac2d78e0e3..cd3207cffc 100644 --- a/libs/midi++2/midi++/midnam_patch.h +++ b/libs/midi++2/midi++/midnam_patch.h @@ -89,15 +89,15 @@ class Patch : public PBD::Stateful public: Patch(PatchBank* a_bank = 0) : _bank(a_bank) {}; - Patch(string a_number, string a_name, PatchBank* a_bank = 0) + Patch(std::string a_number, std::string a_name, PatchBank* a_bank = 0) : _number(a_number), _name(a_name), _bank(a_bank) {}; virtual ~Patch() {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } - const string& number() const { return _number; } - void set_number(const string a_number) { _number = a_number; } + const std::string& number() const { return _number; } + void set_number(const std::string a_number) { _number = a_number; } const PatchPrimaryKey& patch_primary_key() const { return _id; } @@ -105,8 +105,8 @@ public: int set_state (const XMLNode& a_node); private: - string _number; - string _name; + std::string _number; + std::string _name; // cannot use a boost::shared_ptr here in order to avoid retain cycles PatchBank* _bank; PatchPrimaryKey _id; @@ -117,12 +117,12 @@ class PatchBank : public PBD::Stateful public: typedef std::list > PatchNameList; - PatchBank() : _id(0) {}; - PatchBank(string a_name, PatchPrimaryKey* an_id = 0) : _name(a_name), _id(an_id) {}; + PatchBank () : _id(0) {}; + PatchBank (std::string a_name, PatchPrimaryKey* an_id = 0) : _name(a_name), _id(an_id) {}; virtual ~PatchBank() { delete _id; }; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } const PatchNameList& patch_name_list() const { return _patch_name_list; } @@ -132,7 +132,7 @@ public: int set_state (const XMLNode& a_node); private: - string _name; + std::string _name; PatchNameList _patch_name_list; PatchPrimaryKey* _id; }; @@ -149,10 +149,10 @@ public: ChannelNameSet() {}; virtual ~ChannelNameSet() {}; - ChannelNameSet(string a_name) : _name(a_name) {}; + ChannelNameSet(std::string a_name) : _name(a_name) {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } const PatchBanks& patch_banks() const { return _patch_banks; } @@ -206,7 +206,7 @@ public: int set_state (const XMLNode& a_node); private: - string _name; + std::string _name; AvailableForChannels _available_for_channels; PatchBanks _patch_banks; PatchMap _patch_map; @@ -217,21 +217,21 @@ class Note : public PBD::Stateful { public: Note() {}; - Note(string a_number, string a_name) : _number(a_number), _name(a_name) {}; + Note(std::string a_number, std::string a_name) : _number(a_number), _name(a_name) {}; ~Note() {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } - const string& number() const { return _number; } - void set_number(const string a_number) { _number = a_number; } + const std::string& number() const { return _number; } + void set_number(const std::string a_number) { _number = a_number; } XMLNode& get_state (void); int set_state (const XMLNode& a_node); private: - string _number; - string _name; + std::string _number; + std::string _name; }; class NoteNameList : public PBD::Stateful @@ -239,11 +239,11 @@ class NoteNameList : public PBD::Stateful public: typedef std::list > Notes; NoteNameList() {}; - NoteNameList(string a_name) : _name(a_name) {}; + NoteNameList (std::string a_name) : _name(a_name) {}; ~NoteNameList() {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } const Notes& notes() const { return _notes; } @@ -251,7 +251,7 @@ public: int set_state (const XMLNode& a_node); private: - string _name; + std::string _name; Notes _notes; }; @@ -261,14 +261,14 @@ public: CustomDeviceMode() {}; virtual ~CustomDeviceMode() {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } XMLNode& get_state (void); int set_state (const XMLNode& a_node); - string channel_name_set_name_by_channel(uint8_t channel) { + std::string channel_name_set_name_by_channel(uint8_t channel) { assert(channel <= 15); return _channel_name_set_assignments[channel]; } @@ -276,8 +276,8 @@ public: private: /// array index = channel number /// string contents = name of channel name set - string _name; - string _channel_name_set_assignments[16]; + std::string _name; + std::string _channel_name_set_assignments[16]; }; class MasterDeviceNames : public PBD::Stateful @@ -295,24 +295,24 @@ public: MasterDeviceNames() {}; virtual ~MasterDeviceNames() {}; - const string& manufacturer() const { return _manufacturer; } - void set_manufacturer(const string a_manufacturer) { _manufacturer = a_manufacturer; } + const std::string& manufacturer() const { return _manufacturer; } + void set_manufacturer(const std::string a_manufacturer) { _manufacturer = a_manufacturer; } const Models& models() const { return _models; } void set_models(const Models some_models) { _models = some_models; } const CustomDeviceModeNames& custom_device_mode_names() const { return _custom_device_mode_names; } - boost::shared_ptr custom_device_mode_by_name(string mode_name) { + boost::shared_ptr custom_device_mode_by_name(std::string mode_name) { assert(mode_name != ""); return _custom_device_modes[mode_name]; } - boost::shared_ptr channel_name_set_by_device_mode_and_channel(string mode, uint8_t channel) { + boost::shared_ptr channel_name_set_by_device_mode_and_channel(std::string mode, uint8_t channel) { return _channel_name_sets[custom_device_mode_by_name(mode)->channel_name_set_name_by_channel(channel)]; } - boost::shared_ptr find_patch(string mode, uint8_t channel, PatchPrimaryKey& key) { + boost::shared_ptr find_patch(std::string mode, uint8_t channel, PatchPrimaryKey& key) { return channel_name_set_by_device_mode_and_channel(mode, channel)->find_patch(key); } @@ -320,7 +320,7 @@ public: int set_state (const XMLNode& a_node); private: - string _manufacturer; + std::string _manufacturer; Models _models; CustomDeviceModes _custom_device_modes; CustomDeviceModeNames _custom_device_mode_names; @@ -335,11 +335,11 @@ public: typedef std::map > MasterDeviceNamesList; MIDINameDocument() {}; - MIDINameDocument(const string &filename) : _document(XMLTree(filename)) { set_state(*_document.root()); }; + MIDINameDocument(const std::string &filename) : _document(XMLTree(filename)) { set_state(*_document.root()); }; virtual ~MIDINameDocument() {}; - const string& author() const { return _author; } - void set_author(const string an_author) { _author = an_author; } + const std::string& author() const { return _author; } + void set_author(const std::string an_author) { _author = an_author; } const MasterDeviceNamesList& master_device_names_by_model() const { return _master_device_names_list; } @@ -349,7 +349,7 @@ public: int set_state (const XMLNode& a_node); private: - string _author; + std::string _author; MasterDeviceNamesList _master_device_names_list; XMLTree _document; MasterDeviceNames::Models _all_models; diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc index 1e9ff03c6f..3705600b22 100644 --- a/libs/pbd/file_utils.cc +++ b/libs/pbd/file_utils.cc @@ -27,6 +27,8 @@ #include "pbd/error.h" +using namespace std; + namespace PBD { void diff --git a/libs/pbd/filesystem.cc b/libs/pbd/filesystem.cc index 4d82ed2fe6..9c05962a6b 100644 --- a/libs/pbd/filesystem.cc +++ b/libs/pbd/filesystem.cc @@ -33,6 +33,8 @@ #include "i18n.h" +using namespace std; + namespace PBD { namespace sys { diff --git a/libs/pbd/filesystem_paths.cc b/libs/pbd/filesystem_paths.cc index a5c3c65c16..7f0ac62d0f 100644 --- a/libs/pbd/filesystem_paths.cc +++ b/libs/pbd/filesystem_paths.cc @@ -22,10 +22,10 @@ namespace PBD { -vector +std::vector system_data_directories () { - vector tmp; + std::vector tmp; const char * const * dirs; dirs = g_get_system_data_dirs (); @@ -40,10 +40,10 @@ system_data_directories () return tmp; } -vector +std::vector system_config_directories () { - vector tmp; + std::vector tmp; const char * const * dirs; dirs = g_get_system_config_dirs (); diff --git a/libs/pbd/pathscanner.cc b/libs/pbd/pathscanner.cc index 9b41de9544..e391708175 100644 --- a/libs/pbd/pathscanner.cc +++ b/libs/pbd/pathscanner.cc @@ -30,6 +30,7 @@ #include "pbd/pathscanner.h" #include "pbd/stl_delete.h" +using namespace std; using namespace PBD; vector * diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index ce5422db13..d63f02f787 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -29,9 +29,6 @@ namespace PBD { -using std::string; -using std::vector; - /** * Get a list of files in a directory. * @note You must join path with result to get the absolute path @@ -42,7 +39,7 @@ using std::vector; */ void get_files_in_directory (const sys::path& path, - vector& result); + std::vector& result); /** * Takes a directory path and returns all the files in the directory @@ -55,7 +52,7 @@ get_files_in_directory (const sys::path& path, void find_matching_files_in_directory (const sys::path& directory, const Glib::PatternSpec& pattern, - vector& result); + std::vector& result); /** * Takes a number of directory paths and returns all the files matching @@ -66,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 vector& directory_paths, +find_matching_files_in_directories (const std::vector& directory_paths, const Glib::PatternSpec& pattern, - vector& result); + std::vector& result); /** * Takes a SearchPath and puts a list of all the files in the search path @@ -81,7 +78,7 @@ find_matching_files_in_directories (const vector& directory_paths, void find_matching_files_in_search_path (const SearchPath& search_path, const Glib::PatternSpec& pattern, - vector& result); + std::vector& result); /** * Takes a search path and a file name and place the full path @@ -91,7 +88,7 @@ find_matching_files_in_search_path (const SearchPath& search_path, */ bool find_file_in_search_path (const SearchPath& search_path, - const string& filename, + const std::string& filename, sys::path& result); } // namespace PBD diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h index 2d21a3fafc..f7cf1882fd 100644 --- a/libs/pbd/pbd/filesystem.h +++ b/libs/pbd/pbd/filesystem.h @@ -66,31 +66,29 @@ namespace PBD { namespace sys { -using std::string; - class path { public: path() : m_path("") { } path(const path & p) : m_path(p.m_path) { } - path(const string & s) : m_path(s) { } + path(const std::string & s) : m_path(s) { } path(const char* s) : m_path(s) { } path& operator=(const path& p) { m_path = p.m_path; return *this;} - path& operator=(const string& s) { m_path = s; return *this; } + path& operator=(const std::string& s) { m_path = s; return *this; } path& operator=(const char* s) { m_path = s; return *this; } path& operator/=(const path& rhs); - path& operator/=(const string& s); + path& operator/=(const std::string& s); path& operator/=(const char* s); - const string to_string() const { return m_path; } + const std::string to_string() const { return m_path; } /** * @return the last component of the path, if the path refers to * a file then it will be the entire filename including any extension. */ - string leaf() const; + std::string leaf () const; /** * @returns the directory component of a path without any trailing @@ -101,7 +99,7 @@ public: private: - string m_path; + std::string m_path; }; class filesystem_error : public std::runtime_error @@ -184,7 +182,7 @@ void copy_file(const path & from_path, const path & to_path); * ::basename and most other forms of basename in that it removes the * extension from the filename if the filename has one. */ -string basename (const path& p); +std::string basename (const path& p); /** * @return If the filename contains a dot, return a substring of the @@ -193,7 +191,7 @@ string basename (const path& p); * * @param p a file path. */ -string extension (const path& p); +std::string extension (const path& p); } // namespace sys diff --git a/libs/pbd/pbd/filesystem_paths.h b/libs/pbd/pbd/filesystem_paths.h index 8b767a3dfc..a31de8c64e 100644 --- a/libs/pbd/pbd/filesystem_paths.h +++ b/libs/pbd/pbd/filesystem_paths.h @@ -25,11 +25,9 @@ namespace PBD { - using std::vector; + std::vector system_data_directories (); - vector system_data_directories (); - - vector system_config_directories (); + std::vector system_config_directories (); } // namespace PBD diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h index e89da70c20..b1347c169d 100644 --- a/libs/pbd/pbd/memento_command.h +++ b/libs/pbd/pbd/memento_command.h @@ -65,7 +65,7 @@ public: } virtual XMLNode &get_state() { - string name; + std::string name; if (before && after) { name = "MementoCommand"; } else if (before) { diff --git a/libs/pbd/pbd/pathscanner.h b/libs/pbd/pbd/pathscanner.h index 550aab163a..1b7ef58655 100644 --- a/libs/pbd/pbd/pathscanner.h +++ b/libs/pbd/pbd/pathscanner.h @@ -24,22 +24,19 @@ #include #include -using std::string; -using std::vector; - class PathScanner { public: - vector *operator() (const string &dirpath, - bool (*filter)(const string &, void *arg), - void *arg, - bool match_fullpath = true, - bool return_fullpath = true, - long limit = -1, - bool recurse = false) { + std::vector *operator() (const std::string &dirpath, + bool (*filter)(const std::string &, void *arg), + void *arg, + bool match_fullpath = true, + bool return_fullpath = true, + long limit = -1, + bool recurse = false) { return run_scan (dirpath, - (bool (PathScanner::*)(const string &)) 0, + (bool (PathScanner::*)(const std::string &)) 0, filter, arg, match_fullpath, @@ -47,49 +44,49 @@ class PathScanner limit, recurse); } - vector *operator() (const string &dirpath, - const string ®exp, - bool match_fullpath = true, - bool return_fullpath = true, - long limit = -1, - bool recurse = false); - - string *find_first (const string &dirpath, - const string ®exp, - bool match_fullpath = true, - bool return_fullpath = true); + std::vector *operator() (const std::string &dirpath, + const std::string ®exp, + bool match_fullpath = true, + bool return_fullpath = true, + long limit = -1, + bool recurse = false); + + std::string *find_first (const std::string &dirpath, + const std::string ®exp, + bool match_fullpath = true, + bool return_fullpath = true); - string *find_first (const string &dirpath, - bool (*filter)(const string &, void *), - void *arg, - bool match_fullpath = true, - bool return_fullpath = true); + std::string *find_first (const std::string &dirpath, + bool (*filter)(const std::string &, void *), + void *arg, + bool match_fullpath = true, + bool return_fullpath = true); private: regex_t compiled_pattern; - bool regexp_filter (const string &str) { + bool regexp_filter (const std::string &str) { return regexec (&compiled_pattern, str.c_str(), 0, 0, 0) == 0; } - vector *run_scan (const string &dirpath, - bool (PathScanner::*mfilter) (const string &), - bool (*filter)(const string &, void *), - void *arg, - bool match_fullpath, - bool return_fullpath, - long limit, - bool recurse = false); + std::vector *run_scan (const std::string &dirpath, + bool (PathScanner::*mfilter) (const std::string &), + bool (*filter)(const std::string &, void *), + void *arg, + bool match_fullpath, + bool return_fullpath, + long limit, + bool recurse = false); - vector *run_scan_internal (vector*, - const string &dirpath, - bool (PathScanner::*mfilter) (const string &), - bool (*filter)(const string &, void *), - void *arg, - bool match_fullpath, - bool return_fullpath, - long limit, - bool recurse = false); + std::vector *run_scan_internal (std::vector*, + const std::string &dirpath, + bool (PathScanner::*mfilter) (const std::string &), + bool (*filter)(const std::string &, void *), + void *arg, + bool match_fullpath, + bool return_fullpath, + long limit, + bool recurse = false); }; #endif // __libmisc_pathscanner_h__ diff --git a/libs/pbd/pbd/receiver.h b/libs/pbd/pbd/receiver.h index 93192ce787..5e32c7d67f 100644 --- a/libs/pbd/pbd/receiver.h +++ b/libs/pbd/pbd/receiver.h @@ -26,8 +26,6 @@ #include "transmitter.h" -using std::vector; - class strstream; class Receiver : virtual public sigc::trackable @@ -43,7 +41,7 @@ class Receiver : virtual public sigc::trackable virtual void receive (Transmitter::Channel, const char *) = 0; private: - vector connections; + std::vector connections; }; #endif // __libmisc_receiver_h__ diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h index 6163aae607..1148384daa 100644 --- a/libs/pbd/pbd/search_path.h +++ b/libs/pbd/pbd/search_path.h @@ -27,9 +27,6 @@ namespace PBD { -using std::string; -using std::vector; - /** * @class The SearchPath class is a helper class for getting a * vector of paths contained in a search path string where a @@ -39,7 +36,7 @@ using std::vector; * The SearchPath class does not test whether the paths exist * or are directories. It is basically just a container. */ -class SearchPath : public vector +class SearchPath : public std::vector { public: /** @@ -58,14 +55,14 @@ public: * * @param search_path A path string. */ - SearchPath (const string& search_path); + SearchPath (const std::string& search_path); /** * Initialize SearchPath from a sys::path. * * @param directory_path A directory path. */ - SearchPath (const sys::path& directory_path); + SearchPath (const PBD::sys::path& directory_path); /** * Initialize SearchPath from a vector of paths that may or may @@ -73,7 +70,7 @@ public: * * @param path A path. */ - SearchPath (const vector& paths); + SearchPath (const std::vector& paths); /** * @return a search path string. @@ -81,7 +78,7 @@ public: * The string that is returned contains the platform specific * path separator. */ - const string to_string () const; + const std::string to_string () const; /** * Add all the directories in path to this. @@ -91,7 +88,7 @@ public: /** * Add another directory path to the search path. */ - SearchPath& operator+= (const sys::path& directory_path); + SearchPath& operator+= (const PBD::sys::path& directory_path); /** * Concatenate another SearchPath onto this. @@ -101,18 +98,18 @@ public: /** * Add another path to the search path. */ - SearchPath& operator+ (const sys::path& directory_path); + SearchPath& operator+ (const PBD::sys::path& 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 string& subdir); + SearchPath& add_subdirectory_to_paths (const std::string& subdir); protected: void add_directory (const sys::path& directory_path); - void add_directories (const vector& paths); + void add_directories (const std::vector& paths); }; } // namespace PBD diff --git a/libs/pbd/pbd/textreceiver.h b/libs/pbd/pbd/textreceiver.h index e5900fc652..c9a1d0aecc 100644 --- a/libs/pbd/pbd/textreceiver.h +++ b/libs/pbd/pbd/textreceiver.h @@ -24,20 +24,16 @@ #include "receiver.h" -using std::string; -using std::cout; -using std::endl; - class TextReceiver : public Receiver { public: - TextReceiver (const string &n); + TextReceiver (const std::string &n); protected: void receive (Transmitter::Channel, const char *); private: - string name; + std::string name; }; #endif //__libmisc_textreceiver_h__ diff --git a/libs/pbd/pbd/transmitter.h b/libs/pbd/pbd/transmitter.h index 61ac9bd8d8..6da521dd26 100644 --- a/libs/pbd/pbd/transmitter.h +++ b/libs/pbd/pbd/transmitter.h @@ -25,10 +25,6 @@ #include -using std::cout; -using std::cerr; -using std::endl; - class Transmitter : public std::stringstream { @@ -82,11 +78,11 @@ endmsg (std::ostream &ostr) see if ostr == cout, and handle it specially. */ - if (&ostr == &cout) { - cout << endl; + if (&ostr == &std::cout) { + std::cout << std::endl; return ostr; - } else if (&ostr == &cerr) { - cerr << endl; + } else if (&ostr == &std::cerr) { + std::cerr << std::endl; return ostr; } @@ -97,7 +93,7 @@ endmsg (std::ostream &ostr) it and assume that that will be enough. */ - ostr << endl; + ostr << std::endl; } return ostr; diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h index 9427c7070c..65ab0f2c03 100644 --- a/libs/pbd/pbd/xml++.h +++ b/libs/pbd/pbd/xml++.h @@ -18,75 +18,71 @@ #ifndef __XML_H #define __XML_H -using std::string; -using std::map; -using std::list; - class XMLTree; class XMLNode; class XMLProperty; -typedef list XMLNodeList; -typedef list > XMLSharedNodeList; -typedef XMLNodeList::iterator XMLNodeIterator; -typedef XMLNodeList::const_iterator XMLNodeConstIterator; -typedef list XMLPropertyList; -typedef XMLPropertyList::iterator XMLPropertyIterator; -typedef XMLPropertyList::const_iterator XMLPropertyConstIterator; -typedef map XMLPropertyMap; +typedef std::list XMLNodeList; +typedef std::list > XMLSharedNodeList; +typedef XMLNodeList::iterator XMLNodeIterator; +typedef XMLNodeList::const_iterator XMLNodeConstIterator; +typedef std::list XMLPropertyList; +typedef XMLPropertyList::iterator XMLPropertyIterator; +typedef XMLPropertyList::const_iterator XMLPropertyConstIterator; +typedef std::map XMLPropertyMap; class XMLTree { public: XMLTree(); - XMLTree(const string& fn, bool validate = false); + XMLTree(const std::string& fn, bool validate = false); XMLTree(const XMLTree*); ~XMLTree(); XMLNode* root() const { return _root; } XMLNode* set_root(XMLNode* n) { return _root = n; } - const string& filename() const { return _filename; } - const string& set_filename(const string& fn) { return _filename = fn; } + const std::string& filename() const { return _filename; } + const std::string& set_filename(const std::string& fn) { return _filename = fn; } int compression() const { return _compression; } int set_compression(int); bool read() { return read_internal(false); } - bool read(const string& fn) { set_filename(fn); return read_internal(false); } + bool read(const std::string& fn) { set_filename(fn); return read_internal(false); } bool read_and_validate() { return read_internal(true); } - bool read_and_validate(const string& fn) { set_filename(fn); return read_internal(true); } - bool read_buffer(const string&); + bool read_and_validate(const std::string& fn) { set_filename(fn); return read_internal(true); } + bool read_buffer(const std::string&); bool write() const; - bool write(const string& fn) { set_filename(fn); return write(); } + bool write(const std::string& fn) { set_filename(fn); return write(); } void debug (FILE*) const; - const string& write_buffer() const; + const std::string& write_buffer() const; private: bool read_internal(bool validate); - string _filename; - XMLNode* _root; - int _compression; + std::string _filename; + XMLNode* _root; + int _compression; }; class XMLNode { public: - XMLNode(const string& name); - XMLNode(const string& name, const string& content); + XMLNode(const std::string& name); + XMLNode(const std::string& name, const std::string& content); XMLNode(const XMLNode& other); ~XMLNode(); - const string& name() const { return _name; } + const std::string& name() const { return _name; } bool is_content() const { return _is_content; } - const string& content() const { return _content; } - const string& set_content(const string&); - XMLNode* add_content(const string& s = string()); + const std::string& content() const { return _content; } + const std::string& set_content(const std::string&); + XMLNode* add_content(const std::string& s = std::string()); - const XMLNodeList& children(const string& str = string()) const; + const XMLNodeList& children(const std::string& str = std::string()) const; XMLNode* child(const char*) const; XMLNode* add_child(const char *); XMLNode* add_child_copy(const XMLNode&); @@ -97,27 +93,27 @@ public: const XMLPropertyList& properties() const { return _proplist; } XMLProperty* property(const char*); - XMLProperty* property(const string&); + XMLProperty* property(const std::string&); const XMLProperty* property(const char* n) const { return ((XMLNode*)this)->property(n); } - const XMLProperty* property(const string& n) const { return ((XMLNode*)this)->property(n); } + const XMLProperty* property(const std::string& n) const { return ((XMLNode*)this)->property(n); } - XMLProperty* add_property(const char* name, const string& value); + XMLProperty* add_property(const char* name, const std::string& value); XMLProperty* add_property(const char* name, const char* value = ""); XMLProperty* add_property(const char* name, const long value); - void remove_property(const string&); + void remove_property(const std::string&); /** Remove all nodes with the name passed to remove_nodes */ - void remove_nodes(const string&); + void remove_nodes(const std::string&); /** Remove and delete all nodes with the name passed to remove_nodes */ - void remove_nodes_and_delete(const string&); + void remove_nodes_and_delete(const std::string&); /** Remove and delete all nodes with property prop matching val */ - void remove_nodes_and_delete(const string& propname, const string& val); + void remove_nodes_and_delete(const std::string& propname, const std::string& val); private: - string _name; + std::string _name; bool _is_content; - string _content; + std::string _content; XMLNodeList _children; XMLPropertyList _proplist; XMLPropertyMap _propmap; @@ -126,27 +122,27 @@ private: class XMLProperty { public: - XMLProperty(const string& n, const string& v = string()); + XMLProperty(const std::string& n, const std::string& v = std::string()); ~XMLProperty(); - const string& name() const { return _name; } - const string& value() const { return _value; } - const string& set_value(const string& v) { return _value = v; } + const std::string& name() const { return _name; } + const std::string& value() const { return _value; } + const std::string& set_value(const std::string& v) { return _value = v; } private: - string _name; - string _value; + std::string _name; + std::string _value; }; class XMLException: public std::exception { public: - explicit XMLException(const string msg) : _message(msg) {} + explicit XMLException(const std::string msg) : _message(msg) {} virtual ~XMLException() throw() {} virtual const char* what() const throw() { return _message.c_str(); } private: - string _message; + std::string _message; }; #endif /* __XML_H */ diff --git a/libs/pbd/receiver.cc b/libs/pbd/receiver.cc index 456ff3ae79..c9df4595db 100644 --- a/libs/pbd/receiver.cc +++ b/libs/pbd/receiver.cc @@ -23,6 +23,7 @@ #include "pbd/receiver.h" #include "pbd/transmitter.h" +using namespace std; using namespace sigc; Receiver::Receiver () {} diff --git a/libs/pbd/search_path.cc b/libs/pbd/search_path.cc index 2238b233fe..f305e24f90 100644 --- a/libs/pbd/search_path.cc +++ b/libs/pbd/search_path.cc @@ -21,6 +21,8 @@ #include "pbd/search_path.h" #include "pbd/error.h" +using namespace std; + namespace { #ifdef WIN32 diff --git a/libs/pbd/stateful.cc b/libs/pbd/stateful.cc index 8846226ad3..12ae4306ed 100644 --- a/libs/pbd/stateful.cc +++ b/libs/pbd/stateful.cc @@ -27,6 +27,8 @@ #include "i18n.h" +using namespace std; + namespace PBD { Stateful::Stateful () diff --git a/libs/pbd/textreceiver.cc b/libs/pbd/textreceiver.cc index 2cd1cf3712..19c84c6b14 100644 --- a/libs/pbd/textreceiver.cc +++ b/libs/pbd/textreceiver.cc @@ -23,6 +23,8 @@ #include "pbd/textreceiver.h" +using namespace std; + TextReceiver::TextReceiver (const string &n) { diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc index 9f7ef6007f..ec1c8a7b60 100644 --- a/libs/pbd/xml++.cc +++ b/libs/pbd/xml++.cc @@ -12,6 +12,8 @@ #define XML_VERSION "1.0" +using namespace std; + static XMLNode* readnode(xmlNodePtr); static void writenode(xmlDocPtr, XMLNode*, xmlNodePtr, int); static XMLSharedNodeList* find_impl(xmlXPathContext* ctxt, const string& xpath);