From 3b89d9eaa03406a5e03648f47734211f09b89d62 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 12 May 2009 17:03:42 +0000 Subject: Remove most using declarations from header files. git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/audio_diskstream.h | 6 +- libs/ardour/ardour/audio_library.h | 12 +- libs/ardour/ardour/audio_playlist_importer.h | 6 +- libs/ardour/ardour/audio_region_importer.h | 16 +-- libs/ardour/ardour/audio_track.h | 4 +- libs/ardour/ardour/audio_track_importer.h | 4 +- libs/ardour/ardour/audiofile_tagger.h | 4 +- libs/ardour/ardour/audioplaylist.h | 6 +- libs/ardour/ardour/audioregion.h | 12 +- libs/ardour/ardour/audiosource.h | 6 - libs/ardour/ardour/automation_control.h | 6 +- libs/ardour/ardour/broadcast_info.h | 22 ++- libs/ardour/ardour/click.h | 2 +- libs/ardour/ardour/configuration_vars.h | 4 +- libs/ardour/ardour/control_protocol_search_path.h | 4 +- libs/ardour/ardour/cycle_timer.h | 2 +- libs/ardour/ardour/diskstream.h | 10 +- libs/ardour/ardour/element_import_handler.h | 11 +- libs/ardour/ardour/element_importer.h | 16 +-- libs/ardour/ardour/export.h | 12 +- libs/ardour/ardour/export_channel_configuration.h | 8 +- libs/ardour/ardour/export_failed.h | 4 +- libs/ardour/ardour/export_file_io.h | 16 +-- libs/ardour/ardour/export_filename.h | 29 ++-- libs/ardour/ardour/export_format_base.h | 3 - libs/ardour/ardour/export_format_manager.h | 2 - libs/ardour/ardour/export_format_specification.h | 2 - libs/ardour/ardour/export_formats.h | 2 +- libs/ardour/ardour/export_handler.h | 4 +- libs/ardour/ardour/export_preset.h | 12 +- libs/ardour/ardour/export_processor.h | 3 - libs/ardour/ardour/export_profile_manager.h | 7 +- libs/ardour/ardour/export_timespan.h | 14 +- libs/ardour/ardour/file_source.h | 2 +- libs/ardour/ardour/filesystem_paths.h | 12 +- libs/ardour/ardour/io.h | 35 +++-- libs/ardour/ardour/io_processor.h | 6 +- libs/ardour/ardour/location.h | 16 +-- libs/ardour/ardour/location_importer.h | 4 +- libs/ardour/ardour/midi_patch_manager.h | 20 +-- libs/ardour/ardour/midi_playlist.h | 6 +- libs/ardour/ardour/midi_region.h | 4 +- libs/ardour/ardour/panner.h | 15 +- libs/ardour/ardour/playlist.h | 24 ++-- libs/ardour/ardour/playlist_factory.h | 6 +- libs/ardour/ardour/plugin.h | 33 ++--- libs/ardour/ardour/plugin_insert.h | 4 +- libs/ardour/ardour/processor.h | 4 +- libs/ardour/ardour/recent_sessions.h | 8 +- libs/ardour/ardour/region.h | 16 +-- libs/ardour/ardour/region_factory.h | 6 +- libs/ardour/ardour/route.h | 4 +- libs/ardour/ardour/route_group.h | 19 ++- libs/ardour/ardour/route_group_specialized.h | 2 +- libs/ardour/ardour/session.h | 167 +++++++++++----------- libs/ardour/ardour/session_directory.h | 30 ++-- libs/ardour/ardour/session_metadata.h | 101 +++++++------ libs/ardour/ardour/session_state_utils.h | 12 +- libs/ardour/ardour/session_utils.h | 6 +- libs/ardour/ardour/sndfile_helpers.h | 14 +- libs/ardour/ardour/sndfilesource.h | 2 +- libs/ardour/ardour/tape_file_matcher.h | 4 +- libs/ardour/ardour/template_utils.h | 11 +- libs/ardour/ardour/tempo.h | 11 +- libs/ardour/ardour/tempo_map_importer.h | 4 +- libs/ardour/ardour/track.h | 6 +- libs/ardour/ardour/vst_plugin.h | 13 +- libs/ardour/audio_library.cc | 1 + libs/ardour/audio_playlist_importer.cc | 1 + libs/ardour/audio_region_importer.cc | 1 + libs/ardour/audio_track_importer.cc | 1 + libs/ardour/audiofilesource.cc | 1 + libs/ardour/broadcast_info.cc | 20 +-- libs/ardour/bundle.cc | 1 + libs/ardour/chan_count.cc | 2 + libs/ardour/control_protocol_search_path.cc | 2 + libs/ardour/element_import_handler.cc | 1 + libs/ardour/element_importer.cc | 1 + libs/ardour/export_channel_configuration.cc | 2 + libs/ardour/export_file_io.cc | 2 + libs/ardour/export_filename.cc | 1 + libs/ardour/export_formats.cc | 2 + libs/ardour/export_handler.cc | 2 +- libs/ardour/export_preset.cc | 1 + libs/ardour/export_profile_manager.cc | 2 + libs/ardour/file_source.cc | 1 + libs/ardour/filesystem_paths.cc | 2 + libs/ardour/filter.cc | 1 + libs/ardour/find_session.cc | 1 + libs/ardour/import.cc | 2 +- libs/ardour/jack_slave.cc | 1 + libs/ardour/location_importer.cc | 1 + libs/ardour/midi_clock_slave.cc | 1 + libs/ardour/mtc_slave.cc | 1 + libs/ardour/named_selection.cc | 1 + libs/ardour/playlist_factory.cc | 1 + libs/ardour/plugin.cc | 1 + libs/ardour/session_directory.cc | 1 + libs/ardour/session_events.cc | 1 + libs/ardour/session_metadata.cc | 3 +- libs/ardour/session_state_utils.cc | 5 +- libs/ardour/session_time.cc | 1 + libs/ardour/session_utils.cc | 1 + libs/ardour/tape_file_matcher.cc | 2 + libs/ardour/template_utils.cc | 3 + libs/ardour/tempo_map_importer.cc | 1 + 106 files changed, 454 insertions(+), 520 deletions(-) (limited to 'libs/ardour') 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; -- cgit v1.2.3