diff options
author | Carl Hetherington <carl@carlh.net> | 2009-05-12 17:03:42 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-05-12 17:03:42 +0000 |
commit | 3b89d9eaa03406a5e03648f47734211f09b89d62 (patch) | |
tree | 1c8d151bca327d4a5cb7047c8591aa814b9b4ec8 /libs | |
parent | 2e5c935990d6ea5cc6e9a5a6de0fd8c52e68657c (diff) |
Remove most using declarations from header files.
git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
130 files changed, 643 insertions, 728 deletions
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<ChannelList> 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 <map> #include <vector> -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<string> tags); - vector<string> get_tags (string member); + void set_tags (std::string member, std::vector<std::string> tags); + std::vector<std::string> get_tags (std::string member); - void search_members_and (vector<string>& results, const vector<string> tags); + void search_members_and (std::vector<std::string>& results, const std::vector<std::string> 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<Source> const & source); - boost::shared_ptr<Source> 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<Source> const & source); + boost::shared_ptr<Source> 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<string, boost::shared_ptr<Source> > SourceMap; - typedef std::pair<string, boost::shared_ptr<Source> > SourcePair; + typedef std::map<std::string, boost::shared_ptr<Source> > SourceMap; + typedef std::pair<std::string, boost::shared_ptr<Source> > 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<string> filenames; + std::list<std::string> 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<AudioDiskstream> 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<const AudioPlaylist>, string name, bool hidden = false); - AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, nframes_t start, nframes_t cnt, string name, bool hidden = false); + AudioPlaylist (Session&, std::string name, bool hidden = false); + AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, std::string name, bool hidden = false); + AudioPlaylist (boost::shared_ptr<const AudioPlaylist>, 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<boost::shared_ptr<Region> >&) const; + int separate_by_channel (ARDOUR::Session&, std::vector<boost::shared_ptr<Region> >&) const; /* automation */ @@ -169,10 +167,10 @@ class AudioRegion : public Region friend class Crossfade; AudioRegion (boost::shared_ptr<AudioSource>, nframes_t start, nframes_t length); - AudioRegion (boost::shared_ptr<AudioSource>, 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<const AudioRegion>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); - AudioRegion (boost::shared_ptr<const AudioRegion>, const SourceList&, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); + AudioRegion (boost::shared_ptr<AudioSource>, 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<const AudioRegion>, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); + AudioRegion (boost::shared_ptr<const AudioRegion>, const SourceList&, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags); AudioRegion (boost::shared_ptr<const AudioRegion>); AudioRegion (boost::shared_ptr<AudioSource>, 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 <list> -#include <vector> - #include <boost/shared_ptr.hpp> #include <boost/enable_shared_from_this.hpp> @@ -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<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(), - const string& name=""); + const Evoral::Parameter& parameter, + boost::shared_ptr<ARDOUR::AutomationList> l=boost::shared_ptr<ARDOUR::AutomationList>(), + const std::string& name=""); boost::shared_ptr<AutomationList> alist() const { return boost::dynamic_pointer_cast<AutomationList>(_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<Region> wregion); void move_processor_automation (boost::weak_ptr<Processor>, - list< Evoral::RangeMove<nframes_t> > const &); + std::list< Evoral::RangeMove<nframes_t> > const &); sigc::signal<void> RecordEnableChanged; sigc::signal<void> SpeedChanged; @@ -215,7 +215,7 @@ class Diskstream : public SessionObject, public boost::noncopyable virtual void playlist_changed (Change); virtual void playlist_deleted (boost::weak_ptr<Playlist>); - virtual void playlist_ranges_moved (list< Evoral::RangeMove<nframes_t> > const &); + virtual void playlist_ranges_moved (std::list< Evoral::RangeMove<nframes_t> > 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 <boost/shared_ptr.hpp> -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<string> names; + std::set<std::string> 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 <std::pair<bool, string>, string, string> Rename; + static sigc::signal <std::pair<bool, std::string>, std::string, std::string> Rename; /// Signal for ok/cancel prompting - static sigc::signal <bool, string> Prompt; + static sigc::signal <bool, std::string> 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<Port *, uint32_t> PortChannelPair; - typedef map<uint32_t, vector<PortChannelPair> > ExportPortMap; + typedef std::pair<Port *, uint32_t> PortChannelPair; + typedef std::map<uint32_t, std::vector<PortChannelPair> > 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<T> // 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<FloatSinkPtr, FileWriterPtr> 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 <glibmm/ustring.h> #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<bool, ustring> FieldPair; + typedef std::pair<bool, Glib::ustring> 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 <set> -#include <string> #include <algorithm> #include <boost/shared_ptr.hpp> #include <glibmm/ustring.h> @@ -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<void, bool, WeakDitherTypePtr> DitherTypeSelectChanged; sigc::signal<void, bool, WeakDitherTypePtr> 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 <list> #include <vector> #include <map> -#include <set> #include <stdexcept> #include <boost/shared_ptr.hpp> @@ -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<DataType, Glib::ustring> search_paths; + static std::map<DataType, Glib::ustring> 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> bundle_for_inputs () { return _bundle_for_inputs; } boost::shared_ptr<Bundle> 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<UserBundleInfo> _bundles_connected_to_outputs; ///< user bundles connected to our outputs std::vector<UserBundleInfo> _bundles_connected_to_inputs; ///< user bundles connected to our inputs - static int parse_io_string (const string&, vector<string>& chns); + static int parse_io_string (const std::string&, std::vector<std::string>& chns); - static int parse_gain_string (const string&, vector<string>& chns); + static int parse_gain_string (const std::string&, std::vector<std::string>& chns); - int set_sources (vector<string>&, void *src, bool add); - int set_destinations (vector<string>&, void *src, bool add); + int set_sources (std::vector<std::string>&, void *src, bool add); + int set_destinations (std::vector<std::string>&, 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<Bundle> find_possible_bundle (const string &desired_name, const string &default_name, const string &connection_type_name); + boost::shared_ptr<Bundle> 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<string, string> cd_info; - XMLNode& cd_info_node (const string &, const string &); + std::map<std::string, std::string> 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<ChannelNameSet> find_channel_name_set( - string model, - string custom_device_mode, + std::string model, + std::string custom_device_mode, uint8_t channel) { boost::shared_ptr<MIDI::Name::MasterDeviceNames> master_device = master_device_by_model(model); @@ -79,8 +79,8 @@ public: boost::shared_ptr<Patch> 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<Patch> 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<Patch> 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<string> custom_device_mode_names_by_model(std::string model_name) { + std::list<std::string> 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<string>(); + return std::list<std::string>(); } } 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<const MidiPlaylist> other, string name, bool hidden = false); + MidiPlaylist (Session&, std::string name, bool hidden = false); + MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, std::string name, bool hidden = false); MidiPlaylist (boost::shared_ptr<const MidiPlaylist> 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<Region> >&) const; + int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr<Region> >&) 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<Playlist> { public: - typedef list<boost::shared_ptr<Region> > RegionList; + typedef std::list<boost::shared_ptr<Region> > RegionList; Playlist (Session&, const XMLNode&, DataType type, bool hidden = false); - Playlist (Session&, string name, DataType type, bool hidden = false); - Playlist (boost::shared_ptr<const Playlist>, string name, bool hidden = false); - Playlist (boost::shared_ptr<const Playlist>, 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<const Playlist>, std::string name, bool hidden = false); + Playlist (boost::shared_ptr<const Playlist>, 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<Region>, int dir); void update_after_tempo_map_change (); - boost::shared_ptr<Playlist> cut (list<AudioRange>&, bool result_is_hidden = true); - boost::shared_ptr<Playlist> copy (list<AudioRange>&, bool result_is_hidden = true); + boost::shared_ptr<Playlist> cut (std::list<AudioRange>&, bool result_is_hidden = true); + boost::shared_ptr<Playlist> copy (std::list<AudioRange>&, bool result_is_hidden = true); int paste (boost::shared_ptr<Playlist>, nframes_t position, float times); RegionList* regions_at (nframes_t frame); @@ -131,9 +131,9 @@ class Playlist : public SessionObject, sigc::signal<void> Modified; sigc::signal<void> NameChanged; sigc::signal<void> LengthChanged; - sigc::signal<void, list< Evoral::RangeMove<nframes_t> > const &> RangesMoved; + sigc::signal<void, std::list< Evoral::RangeMove<nframes_t> > 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<nframes_t> > pending_range_moves; + std::list< Evoral::RangeMove<nframes_t> > 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<Playlist> cut_copy (boost::shared_ptr<Playlist> (Playlist::*pmf)(nframes_t, nframes_t, bool), - list<AudioRange>& ranges, bool result_is_hidden); + std::list<AudioRange>& ranges, bool result_is_hidden); boost::shared_ptr<Playlist> cut (nframes_t start, nframes_t cnt, bool result_is_hidden); boost::shared_ptr<Playlist> 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<void,boost::shared_ptr<Playlist>, bool> PlaylistCreated; static boost::shared_ptr<Playlist> create (Session&, const XMLNode&, bool hidden = false, bool unused = false); - static boost::shared_ptr<Playlist> create (DataType type, Session&, string name, bool hidden = false); - static boost::shared_ptr<Playlist> create (boost::shared_ptr<const Playlist>, string name, bool hidden = false); - static boost::shared_ptr<Playlist> create (boost::shared_ptr<const Playlist>, nframes_t start, nframes_t cnt, string name, bool hidden = false); + static boost::shared_ptr<Playlist> create (DataType type, Session&, std::string name, bool hidden = false); + static boost::shared_ptr<Playlist> create (boost::shared_ptr<const Playlist>, std::string name, bool hidden = false); + static boost::shared_ptr<Playlist> create (boost::shared_ptr<const Playlist>, 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 <set> #include <map> -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<Evoral::Parameter> 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<PresetRecord> 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<string,PresetRecord> presets; + std::map<std::string,PresetRecord> 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 <utility> #include <string> -using std::deque; -using std::pair; -using std::string; - namespace ARDOUR { - typedef deque<pair<string,string> > RecentSessions; + typedef std::deque<std::pair<std::string,std::string> > 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<string> master_source_names(); + std::vector<std::string> master_source_names(); void set_master_sources (const SourceList&); /* automation */ @@ -270,20 +270,20 @@ class Region friend class RegionFactory; Region (boost::shared_ptr<Source> 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<const Region>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Flag flags = DefaultFlags); - Region (boost::shared_ptr<const Region>, nframes_t length, const string& name, layer_t = 0, Flag flags = DefaultFlags); + Region (boost::shared_ptr<const Region>, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Flag flags = DefaultFlags); + Region (boost::shared_ptr<const Region>, nframes_t length, const std::string& name, layer_t = 0, Flag flags = DefaultFlags); Region (boost::shared_ptr<const Region>); Region (boost::shared_ptr<Source> 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<const Region>, nframes_t start, nframes_t length, const string& name, layer_t, Flag flags); + void copy_stuff (boost::shared_ptr<const Region>, 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<Region> create (boost::shared_ptr<AudioRegion>, 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<Region> create (boost::shared_ptr<Region>, const SourceList&, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); - static boost::shared_ptr<Region> create (boost::shared_ptr<Source>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); - static boost::shared_ptr<Region> 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<Region> create (boost::shared_ptr<Region>, const SourceList&, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true); + static boost::shared_ptr<Region> create (boost::shared_ptr<Source>, 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<Region> 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<Region> create (Session&, XMLNode&, bool); static boost::shared_ptr<Region> 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<boost::shared_ptr<Processor> > ProcessorList; + typedef std::list<boost::shared_ptr<Processor> > ProcessorList; public: @@ -238,7 +238,7 @@ class Route : public IO sigc::signal<void,void*> SelectedChanged; - int set_control_outs (const vector<std::string>& ports); + int set_control_outs (const std::vector<std::string>& ports); boost::shared_ptr<ControlOutputs> control_outs() { return _control_outs; } bool feeds (boost::shared_ptr<Route>); 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<Route *>::iterator i = routes.begin(); i != routes.end(); i++) { + for (std::list<Route *>::iterator i = routes.begin(); i != routes.end(); i++) { ((*i)->*func)(src); } } template<class T> void apply (void (Route::*func)(T, void *), T val, void *src) { - for (list<Route *>::iterator i = routes.begin(); i != routes.end(); i++) { + for (std::list<Route *>::iterator i = routes.begin(); i != routes.end(); i++) { ((*i)->*func)(val, src); } } template<class T> void foreach_route (T *obj, void (T::*func)(Route&)) { - for (list<Route *>::iterator i = routes.begin(); i != routes.end(); i++) { + for (std::list<Route *>::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*>& route_list() { return routes; } + const std::list<Route*>& route_list() { return routes; } sigc::signal<void> changed; sigc::signal<void,void*> FlagsChanged; @@ -112,8 +109,8 @@ class RouteGroup : public PBD::Stateful, public sigc::trackable { private: Session& _session; - list<Route *> routes; - string _name; + std::list<Route *> 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<class T> void RouteGroup::apply (void (Track::*func)(T, void *), T val, void *src) { - for (list<Route *>::iterator i = routes.begin(); i != routes.end(); i++) { + for (std::list<Route *>::iterator i = routes.begin(); i != routes.end(); i++) { Track *at; if ((at = dynamic_cast<Track*>(*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<boost::weak_ptr<Route>,bool> RouteBooleanState; - typedef vector<RouteBooleanState> GlobalRouteBooleanState; + typedef std::vector<RouteBooleanState> GlobalRouteBooleanState; typedef std::pair<boost::weak_ptr<Route>,MeterPoint> RouteMeterState; - typedef vector<RouteMeterState> GlobalRouteMeterState; + typedef std::vector<RouteMeterState> GlobalRouteMeterState; public: enum RecordState { @@ -179,8 +174,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable Route* route; }; - list<AudioRange> audio_range; - list<MusicRange> music_range; + std::list<AudioRange> audio_range; + std::list<MusicRange> music_range; boost::shared_ptr<Region> 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<Diskstream>); boost::shared_ptr<Diskstream> diskstream_by_id (const PBD::ID& id); - boost::shared_ptr<Diskstream> diskstream_by_name (string name); + boost::shared_ptr<Diskstream> 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<class T> void foreach_route (T *obj, void (T::*func)(boost::shared_ptr<Route>)); template<class T, class A> void foreach_route (T *obj, void (T::*func)(Route&, A), A arg); - boost::shared_ptr<Route> route_by_name (string); + boost::shared_ptr<Route> route_by_name (std::string); boost::shared_ptr<Route> route_by_id (PBD::ID); boost::shared_ptr<Route> 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<void,string> StateSaved; + sigc::signal<void,std::string> StateSaved; sigc::signal<void> StateReady; - vector<string*>* possible_states() const; - static vector<string*>* possible_states(string path); + std::vector<std::string*>* possible_states() const; + static std::vector<std::string*>* 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<void,RouteGroup*> edit_group_added; sigc::signal<void,RouteGroup*> mix_group_added; @@ -503,13 +498,13 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable sigc::signal<void> mix_group_removed; void foreach_edit_group (sigc::slot<void,RouteGroup*> sl) { - for (list<RouteGroup *>::iterator i = edit_groups.begin(); i != edit_groups.end(); i++) { + for (std::list<RouteGroup *>::iterator i = edit_groups.begin(); i != edit_groups.end(); i++) { sl (*i); } } void foreach_mix_group (sigc::slot<void,RouteGroup*> sl) { - for (list<RouteGroup *>::iterator i = mix_groups.begin(); i != mix_groups.end(); i++) { + for (std::list<RouteGroup *>::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<void,std::vector<boost::weak_ptr<Region> >& > RegionsAdded; sigc::signal<void,boost::weak_ptr<Region> > 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<Region> find_whole_file_parent (boost::shared_ptr<Region const>); @@ -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<ExportHandler> get_export_handler (); boost::shared_ptr<ExportStatus> get_export_status (); @@ -650,7 +645,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void remove_source (boost::weak_ptr<Source>); struct cleanup_report { - vector<string> paths; + std::vector<std::string> paths; int64_t space; }; @@ -686,7 +681,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* playlist management */ - boost::shared_ptr<Playlist> playlist_by_name (string name); + boost::shared_ptr<Playlist> playlist_by_name (std::string name); void unassigned_playlists (std::list<boost::shared_ptr<Playlist> > & list); void add_playlist (boost::shared_ptr<Playlist>, bool unused = false); sigc::signal<void,boost::shared_ptr<Playlist> > 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<Region> write_one_track (AudioTrack&, nframes_t start, nframes_t end, - bool overwrite, vector<boost::shared_ptr<Source> >&, InterThreadInfo& wot, - bool enable_processing = true); + bool overwrite, std::vector<boost::shared_ptr<Source> >&, 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<Bundle>); void remove_bundle (boost::shared_ptr<Bundle>); - boost::shared_ptr<Bundle> bundle_by_name (string) const; + boost::shared_ptr<Bundle> bundle_by_name (std::string) const; sigc::signal<void,boost::shared_ptr<Bundle> > BundleAdded; sigc::signal<void,boost::shared_ptr<Bundle> > 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<AudioRange>&); - void set_music_range (list<MusicRange>&); + void set_audio_range (std::list<AudioRange>&); + void set_music_range (std::list<MusicRange>&); 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<Event *> Events; + typedef std::list<Event *> 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<bool> MidiTimeoutCallback; - typedef list<MidiTimeoutCallback> MidiTimeoutList; + typedef std::list<MidiTimeoutCallback> 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<RouteGroup *> edit_groups; - list<RouteGroup *> mix_groups; + std::list<RouteGroup *> edit_groups; + std::list<RouteGroup *> 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<Region>); mutable Glib::Mutex region_lock; - typedef map<PBD::ID,boost::shared_ptr<Region> > RegionList; + typedef std::map<PBD::ID,boost::shared_ptr<Region> > RegionList; RegionList regions; void add_region (boost::shared_ptr<Region>); @@ -1517,7 +1512,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* PLAYLISTS */ mutable Glib::Mutex playlist_lock; - typedef set<boost::shared_ptr<Playlist> > PlaylistList; + typedef std::set<boost::shared_ptr<Playlist> > PlaylistList; PlaylistList playlists; PlaylistList unused_playlists; @@ -1526,7 +1521,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable void remove_playlist (boost::weak_ptr<Playlist>); void track_playlist (bool, boost::weak_ptr<Playlist>); - boost::shared_ptr<Playlist> playlist_factory (string name); + boost::shared_ptr<Playlist> playlist_factory (std::string name); boost::shared_ptr<Playlist> 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<NamedSelection *> NamedSelectionList; + typedef std::set<NamedSelection *> 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<PortInsert *> _port_inserts; - list<PluginInsert *> _plugin_inserts; - list<Send *> _sends; - list<Return *> _returns; + std::list<PortInsert *> _port_inserts; + std::list<PluginInsert *> _plugin_inserts; + std::list<Send *> _sends; + std::list<Return *> _returns; boost::dynamic_bitset<uint32_t> send_bitset; boost::dynamic_bitset<uint32_t> return_bitset; boost::dynamic_bitset<uint32_t> 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<space_and_path> session_dirs; - vector<space_and_path>::iterator last_rr_session_dir; + std::vector<space_and_path> session_dirs; + std::vector<space_and_path>::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<Click*> Clicks; + typedef std::list<Click*> 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<Route*> master_outs; + std::vector<Route*> master_outs; /* range playback */ - list<AudioRange> current_audio_range; + std::list<AudioRange> 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<PBD::sys::path> sub_directories () const; + const std::vector<PBD::sys::path> 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<ustring, ustring> Property; - typedef std::map<ustring, ustring> PropertyMap; + typedef std::pair<Glib::ustring, Glib::ustring> Property; + typedef std::map<Glib::ustring, Glib::ustring> 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<sys::path>& result); +void get_state_files_in_directory (const PBD::sys::path & directory_path, + std::vector<PBD::sys::path>& 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<string> get_file_names_no_extension (const vector<sys::path> & file_paths); +std::vector<std::string> get_file_names_no_extension (const std::vector<PBD::sys::path> & 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 <string> #include <stdint.h> -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<MetricSection*> Metrics; +typedef std::list<MetricSection*> 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<BBTPoint> BBTPointList; + typedef std::vector<BBTPoint> BBTPointList; template<class T> 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> 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> playlist; - vector<FreezeRecordProcessorInfo*> processor_info; + std::vector<FreezeRecordProcessorInfo*> 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 <jack/types.h> #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 <algorithm> +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<ImportableSource> 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 <locale.h> +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 <iostream> #include <sstream> +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<sys::path> & result) + vector<sys::path> & result) { Glib::PatternSpec state_file_pattern('*' + string(statefile_suffix)); diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc index de86b217ca..264ce10c82 100644 --- a/libs/ardour/session_time.cc +++ b/libs/ardour/session_time.cc @@ -36,6 +36,7 @@ #include "i18n.h" +using namespace std; using namespace ARDOUR; using namespace PBD; diff --git a/libs/ardour/session_utils.cc b/libs/ardour/session_utils.cc index 3dfa862674..4800d3b099 100644 --- a/libs/ardour/session_utils.cc +++ b/libs/ardour/session_utils.cc @@ -7,6 +7,7 @@ namespace ARDOUR { +using namespace std; using namespace PBD; bool diff --git a/libs/ardour/tape_file_matcher.cc b/libs/ardour/tape_file_matcher.cc index 9661ccf662..bedb7e629b 100644 --- a/libs/ardour/tape_file_matcher.cc +++ b/libs/ardour/tape_file_matcher.cc @@ -22,6 +22,8 @@ #include "i18n.h" +using namespace std; + namespace { const char* const tape_file_regex_string = X_("/T[0-9][0-9][0-9][0-9]-"); diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index 3f380c0fd6..a7a7eee321 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -12,6 +12,9 @@ #include "ardour/filename_extensions.h" #include "ardour/io.h" +using namespace std; +using namespace PBD; + namespace ARDOUR { sys::path diff --git a/libs/ardour/tempo_map_importer.cc b/libs/ardour/tempo_map_importer.cc index d934eac2af..457f8c7b53 100644 --- a/libs/ardour/tempo_map_importer.cc +++ b/libs/ardour/tempo_map_importer.cc @@ -29,6 +29,7 @@ #include "i18n.h" +using namespace std; using namespace PBD; using namespace ARDOUR; diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index f36f6de84f..468aa16f8e 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -21,7 +21,6 @@ #define __pbd_gtk_ui_h__ #include <string> -#include <queue> #include <map> #include <stdint.h> @@ -42,9 +41,6 @@ #include <pbd/error.h> #include <pbd/receiver.h> -using std::string; -using std::queue; - class Touchable; namespace Gtkmm2ext { @@ -89,7 +85,7 @@ struct UIRequest : public BaseUI::BaseRequestObject { class UI : public Receiver, public AbstractUI<UIRequest> { public: - UI (string name, int *argc, char **argv[]); + UI (std::string name, int *argc, char **argv[]); virtual ~UI (); static UI *instance() { return theGtkUI; } @@ -109,7 +105,7 @@ class UI : public Receiver, public AbstractUI<UIRequest> bool running (); void quit (); void kill (); - int load_rcfile (string, bool themechange = false); + int load_rcfile (std::string, bool themechange = false); void run (Receiver &old_receiver); void set_state (Gtk::Widget *w, Gtk::StateType state); @@ -127,7 +123,7 @@ class UI : public Receiver, public AbstractUI<UIRequest> Glib::signal_idle().connect (bind (slot (&UI::idle_delete<T>), obj)); } - Gdk::Color get_color (const string& prompt, bool& picked, const Gdk::Color *initial = 0); + Gdk::Color get_color (const std::string& prompt, bool& picked, const Gdk::Color *initial = 0); /* starting is sent just before we enter the main loop, stopping just after we return from it (at the top level) diff --git a/libs/gtkmm2ext/gtkmm2ext/textviewer.h b/libs/gtkmm2ext/gtkmm2ext/textviewer.h index 9cc639cd75..004e2d99db 100644 --- a/libs/gtkmm2ext/gtkmm2ext/textviewer.h +++ b/libs/gtkmm2ext/gtkmm2ext/textviewer.h @@ -24,8 +24,6 @@ #include <pbd/transmitter.h> -using std::string; - namespace Gtkmm2ext { class TextViewer : public Gtk::Window, public Transmitter @@ -46,7 +44,7 @@ class TextViewer : public Gtk::Window, public Transmitter Gtk::TextView& text() { return etext; } Gtk::Button& dismiss_button() { return dismiss; } - void insert_file (const string &); + void insert_file (const std::string &); void scroll_to_bottom (); void deliver (); diff --git a/libs/gtkmm2ext/gtkmm2ext/window_title.h b/libs/gtkmm2ext/gtkmm2ext/window_title.h index 93b47d9d45..62a131c096 100644 --- a/libs/gtkmm2ext/gtkmm2ext/window_title.h +++ b/libs/gtkmm2ext/gtkmm2ext/window_title.h @@ -24,8 +24,6 @@ namespace Gtkmm2ext { -using std::string; - /** * \class The WindowTitle class can be used to maintain the * consistancy of window titles between windows and dialogs. @@ -42,19 +40,19 @@ public: * which will may be the application name or the document * name in a document based application. */ - WindowTitle(const string& title); + WindowTitle(const std::string& title); /** * Add an string element to the window title. */ - void operator+= (const string&); + void operator+= (const std::string&); /// @return The window title string. - const string& get_string () { return m_title;} + const std::string& get_string () { return m_title;} private: - string m_title; + std::string m_title; }; diff --git a/libs/gtkmm2ext/window_title.cc b/libs/gtkmm2ext/window_title.cc index 7c942d7f20..68913aeef6 100644 --- a/libs/gtkmm2ext/window_title.cc +++ b/libs/gtkmm2ext/window_title.cc @@ -21,6 +21,8 @@ #include "i18n.h" +using namespace std; + namespace { // I don't know if this should be translated. diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h index ac2d78e0e3..cd3207cffc 100644 --- a/libs/midi++2/midi++/midnam_patch.h +++ b/libs/midi++2/midi++/midnam_patch.h @@ -89,15 +89,15 @@ class Patch : public PBD::Stateful public: Patch(PatchBank* a_bank = 0) : _bank(a_bank) {}; - Patch(string a_number, string a_name, PatchBank* a_bank = 0) + Patch(std::string a_number, std::string a_name, PatchBank* a_bank = 0) : _number(a_number), _name(a_name), _bank(a_bank) {}; virtual ~Patch() {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } - const string& number() const { return _number; } - void set_number(const string a_number) { _number = a_number; } + const std::string& number() const { return _number; } + void set_number(const std::string a_number) { _number = a_number; } const PatchPrimaryKey& patch_primary_key() const { return _id; } @@ -105,8 +105,8 @@ public: int set_state (const XMLNode& a_node); private: - string _number; - string _name; + std::string _number; + std::string _name; // cannot use a boost::shared_ptr here in order to avoid retain cycles PatchBank* _bank; PatchPrimaryKey _id; @@ -117,12 +117,12 @@ class PatchBank : public PBD::Stateful public: typedef std::list<boost::shared_ptr<Patch> > PatchNameList; - PatchBank() : _id(0) {}; - PatchBank(string a_name, PatchPrimaryKey* an_id = 0) : _name(a_name), _id(an_id) {}; + PatchBank () : _id(0) {}; + PatchBank (std::string a_name, PatchPrimaryKey* an_id = 0) : _name(a_name), _id(an_id) {}; virtual ~PatchBank() { delete _id; }; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } const PatchNameList& patch_name_list() const { return _patch_name_list; } @@ -132,7 +132,7 @@ public: int set_state (const XMLNode& a_node); private: - string _name; + std::string _name; PatchNameList _patch_name_list; PatchPrimaryKey* _id; }; @@ -149,10 +149,10 @@ public: ChannelNameSet() {}; virtual ~ChannelNameSet() {}; - ChannelNameSet(string a_name) : _name(a_name) {}; + ChannelNameSet(std::string a_name) : _name(a_name) {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } const PatchBanks& patch_banks() const { return _patch_banks; } @@ -206,7 +206,7 @@ public: int set_state (const XMLNode& a_node); private: - string _name; + std::string _name; AvailableForChannels _available_for_channels; PatchBanks _patch_banks; PatchMap _patch_map; @@ -217,21 +217,21 @@ class Note : public PBD::Stateful { public: Note() {}; - Note(string a_number, string a_name) : _number(a_number), _name(a_name) {}; + Note(std::string a_number, std::string a_name) : _number(a_number), _name(a_name) {}; ~Note() {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } - const string& number() const { return _number; } - void set_number(const string a_number) { _number = a_number; } + const std::string& number() const { return _number; } + void set_number(const std::string a_number) { _number = a_number; } XMLNode& get_state (void); int set_state (const XMLNode& a_node); private: - string _number; - string _name; + std::string _number; + std::string _name; }; class NoteNameList : public PBD::Stateful @@ -239,11 +239,11 @@ class NoteNameList : public PBD::Stateful public: typedef std::list<boost::shared_ptr<Note> > Notes; NoteNameList() {}; - NoteNameList(string a_name) : _name(a_name) {}; + NoteNameList (std::string a_name) : _name(a_name) {}; ~NoteNameList() {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } const Notes& notes() const { return _notes; } @@ -251,7 +251,7 @@ public: int set_state (const XMLNode& a_node); private: - string _name; + std::string _name; Notes _notes; }; @@ -261,14 +261,14 @@ public: CustomDeviceMode() {}; virtual ~CustomDeviceMode() {}; - const string& name() const { return _name; } - void set_name(const string a_name) { _name = a_name; } + const std::string& name() const { return _name; } + void set_name(const std::string a_name) { _name = a_name; } XMLNode& get_state (void); int set_state (const XMLNode& a_node); - string channel_name_set_name_by_channel(uint8_t channel) { + std::string channel_name_set_name_by_channel(uint8_t channel) { assert(channel <= 15); return _channel_name_set_assignments[channel]; } @@ -276,8 +276,8 @@ public: private: /// array index = channel number /// string contents = name of channel name set - string _name; - string _channel_name_set_assignments[16]; + std::string _name; + std::string _channel_name_set_assignments[16]; }; class MasterDeviceNames : public PBD::Stateful @@ -295,24 +295,24 @@ public: MasterDeviceNames() {}; virtual ~MasterDeviceNames() {}; - const string& manufacturer() const { return _manufacturer; } - void set_manufacturer(const string a_manufacturer) { _manufacturer = a_manufacturer; } + const std::string& manufacturer() const { return _manufacturer; } + void set_manufacturer(const std::string a_manufacturer) { _manufacturer = a_manufacturer; } const Models& models() const { return _models; } void set_models(const Models some_models) { _models = some_models; } const CustomDeviceModeNames& custom_device_mode_names() const { return _custom_device_mode_names; } - boost::shared_ptr<CustomDeviceMode> custom_device_mode_by_name(string mode_name) { + boost::shared_ptr<CustomDeviceMode> custom_device_mode_by_name(std::string mode_name) { assert(mode_name != ""); return _custom_device_modes[mode_name]; } - boost::shared_ptr<ChannelNameSet> channel_name_set_by_device_mode_and_channel(string mode, uint8_t channel) { + boost::shared_ptr<ChannelNameSet> channel_name_set_by_device_mode_and_channel(std::string mode, uint8_t channel) { return _channel_name_sets[custom_device_mode_by_name(mode)->channel_name_set_name_by_channel(channel)]; } - boost::shared_ptr<Patch> find_patch(string mode, uint8_t channel, PatchPrimaryKey& key) { + boost::shared_ptr<Patch> find_patch(std::string mode, uint8_t channel, PatchPrimaryKey& key) { return channel_name_set_by_device_mode_and_channel(mode, channel)->find_patch(key); } @@ -320,7 +320,7 @@ public: int set_state (const XMLNode& a_node); private: - string _manufacturer; + std::string _manufacturer; Models _models; CustomDeviceModes _custom_device_modes; CustomDeviceModeNames _custom_device_mode_names; @@ -335,11 +335,11 @@ public: typedef std::map<std::string, boost::shared_ptr<MasterDeviceNames> > MasterDeviceNamesList; MIDINameDocument() {}; - MIDINameDocument(const string &filename) : _document(XMLTree(filename)) { set_state(*_document.root()); }; + MIDINameDocument(const std::string &filename) : _document(XMLTree(filename)) { set_state(*_document.root()); }; virtual ~MIDINameDocument() {}; - const string& author() const { return _author; } - void set_author(const string an_author) { _author = an_author; } + const std::string& author() const { return _author; } + void set_author(const std::string an_author) { _author = an_author; } const MasterDeviceNamesList& master_device_names_by_model() const { return _master_device_names_list; } @@ -349,7 +349,7 @@ public: int set_state (const XMLNode& a_node); private: - string _author; + std::string _author; MasterDeviceNamesList _master_device_names_list; XMLTree _document; MasterDeviceNames::Models _all_models; diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc index 1e9ff03c6f..3705600b22 100644 --- a/libs/pbd/file_utils.cc +++ b/libs/pbd/file_utils.cc @@ -27,6 +27,8 @@ #include "pbd/error.h" +using namespace std; + namespace PBD { void diff --git a/libs/pbd/filesystem.cc b/libs/pbd/filesystem.cc index 4d82ed2fe6..9c05962a6b 100644 --- a/libs/pbd/filesystem.cc +++ b/libs/pbd/filesystem.cc @@ -33,6 +33,8 @@ #include "i18n.h" +using namespace std; + namespace PBD { namespace sys { diff --git a/libs/pbd/filesystem_paths.cc b/libs/pbd/filesystem_paths.cc index a5c3c65c16..7f0ac62d0f 100644 --- a/libs/pbd/filesystem_paths.cc +++ b/libs/pbd/filesystem_paths.cc @@ -22,10 +22,10 @@ namespace PBD { -vector<sys::path> +std::vector<sys::path> system_data_directories () { - vector<sys::path> tmp; + std::vector<sys::path> tmp; const char * const * dirs; dirs = g_get_system_data_dirs (); @@ -40,10 +40,10 @@ system_data_directories () return tmp; } -vector<sys::path> +std::vector<sys::path> system_config_directories () { - vector<sys::path> tmp; + std::vector<sys::path> tmp; const char * const * dirs; dirs = g_get_system_config_dirs (); diff --git a/libs/pbd/pathscanner.cc b/libs/pbd/pathscanner.cc index 9b41de9544..e391708175 100644 --- a/libs/pbd/pathscanner.cc +++ b/libs/pbd/pathscanner.cc @@ -30,6 +30,7 @@ #include "pbd/pathscanner.h" #include "pbd/stl_delete.h" +using namespace std; using namespace PBD; vector<string *> * diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index ce5422db13..d63f02f787 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -29,9 +29,6 @@ namespace PBD { -using std::string; -using std::vector; - /** * Get a list of files in a directory. * @note You must join path with result to get the absolute path @@ -42,7 +39,7 @@ using std::vector; */ void get_files_in_directory (const sys::path& path, - vector<string>& result); + std::vector<std::string>& result); /** * Takes a directory path and returns all the files in the directory @@ -55,7 +52,7 @@ get_files_in_directory (const sys::path& path, void find_matching_files_in_directory (const sys::path& directory, const Glib::PatternSpec& pattern, - vector<sys::path>& result); + std::vector<sys::path>& result); /** * Takes a number of directory paths and returns all the files matching @@ -66,9 +63,9 @@ find_matching_files_in_directory (const sys::path& directory, * @param result A vector in which to place the resulting matches. */ void -find_matching_files_in_directories (const vector<sys::path>& directory_paths, +find_matching_files_in_directories (const std::vector<sys::path>& directory_paths, const Glib::PatternSpec& pattern, - vector<sys::path>& result); + std::vector<sys::path>& result); /** * Takes a SearchPath and puts a list of all the files in the search path @@ -81,7 +78,7 @@ find_matching_files_in_directories (const vector<sys::path>& directory_paths, void find_matching_files_in_search_path (const SearchPath& search_path, const Glib::PatternSpec& pattern, - vector<sys::path>& result); + std::vector<sys::path>& result); /** * Takes a search path and a file name and place the full path @@ -91,7 +88,7 @@ find_matching_files_in_search_path (const SearchPath& search_path, */ bool find_file_in_search_path (const SearchPath& search_path, - const string& filename, + const std::string& filename, sys::path& result); } // namespace PBD diff --git a/libs/pbd/pbd/filesystem.h b/libs/pbd/pbd/filesystem.h index 2d21a3fafc..f7cf1882fd 100644 --- a/libs/pbd/pbd/filesystem.h +++ b/libs/pbd/pbd/filesystem.h @@ -66,31 +66,29 @@ namespace PBD { namespace sys { -using std::string; - class path { public: path() : m_path("") { } path(const path & p) : m_path(p.m_path) { } - path(const string & s) : m_path(s) { } + path(const std::string & s) : m_path(s) { } path(const char* s) : m_path(s) { } path& operator=(const path& p) { m_path = p.m_path; return *this;} - path& operator=(const string& s) { m_path = s; return *this; } + path& operator=(const std::string& s) { m_path = s; return *this; } path& operator=(const char* s) { m_path = s; return *this; } path& operator/=(const path& rhs); - path& operator/=(const string& s); + path& operator/=(const std::string& s); path& operator/=(const char* s); - const string to_string() const { return m_path; } + const std::string to_string() const { return m_path; } /** * @return the last component of the path, if the path refers to * a file then it will be the entire filename including any extension. */ - string leaf() const; + std::string leaf () const; /** * @returns the directory component of a path without any trailing @@ -101,7 +99,7 @@ public: private: - string m_path; + std::string m_path; }; class filesystem_error : public std::runtime_error @@ -184,7 +182,7 @@ void copy_file(const path & from_path, const path & to_path); * ::basename and most other forms of basename in that it removes the * extension from the filename if the filename has one. */ -string basename (const path& p); +std::string basename (const path& p); /** * @return If the filename contains a dot, return a substring of the @@ -193,7 +191,7 @@ string basename (const path& p); * * @param p a file path. */ -string extension (const path& p); +std::string extension (const path& p); } // namespace sys diff --git a/libs/pbd/pbd/filesystem_paths.h b/libs/pbd/pbd/filesystem_paths.h index 8b767a3dfc..a31de8c64e 100644 --- a/libs/pbd/pbd/filesystem_paths.h +++ b/libs/pbd/pbd/filesystem_paths.h @@ -25,11 +25,9 @@ namespace PBD { - using std::vector; + std::vector<sys::path> system_data_directories (); - vector<sys::path> system_data_directories (); - - vector<sys::path> system_config_directories (); + std::vector<sys::path> system_config_directories (); } // namespace PBD diff --git a/libs/pbd/pbd/memento_command.h b/libs/pbd/pbd/memento_command.h index e89da70c20..b1347c169d 100644 --- a/libs/pbd/pbd/memento_command.h +++ b/libs/pbd/pbd/memento_command.h @@ -65,7 +65,7 @@ public: } virtual XMLNode &get_state() { - string name; + std::string name; if (before && after) { name = "MementoCommand"; } else if (before) { diff --git a/libs/pbd/pbd/pathscanner.h b/libs/pbd/pbd/pathscanner.h index 550aab163a..1b7ef58655 100644 --- a/libs/pbd/pbd/pathscanner.h +++ b/libs/pbd/pbd/pathscanner.h @@ -24,22 +24,19 @@ #include <string> #include <regex.h> -using std::string; -using std::vector; - class PathScanner { public: - vector<string *> *operator() (const string &dirpath, - bool (*filter)(const string &, void *arg), - void *arg, - bool match_fullpath = true, - bool return_fullpath = true, - long limit = -1, - bool recurse = false) { + std::vector<std::string *> *operator() (const std::string &dirpath, + bool (*filter)(const std::string &, void *arg), + void *arg, + bool match_fullpath = true, + bool return_fullpath = true, + long limit = -1, + bool recurse = false) { return run_scan (dirpath, - (bool (PathScanner::*)(const string &)) 0, + (bool (PathScanner::*)(const std::string &)) 0, filter, arg, match_fullpath, @@ -47,49 +44,49 @@ class PathScanner limit, recurse); } - vector<string *> *operator() (const string &dirpath, - const string ®exp, - bool match_fullpath = true, - bool return_fullpath = true, - long limit = -1, - bool recurse = false); - - string *find_first (const string &dirpath, - const string ®exp, - bool match_fullpath = true, - bool return_fullpath = true); + std::vector<std::string *> *operator() (const std::string &dirpath, + const std::string ®exp, + bool match_fullpath = true, + bool return_fullpath = true, + long limit = -1, + bool recurse = false); + + std::string *find_first (const std::string &dirpath, + const std::string ®exp, + bool match_fullpath = true, + bool return_fullpath = true); - string *find_first (const string &dirpath, - bool (*filter)(const string &, void *), - void *arg, - bool match_fullpath = true, - bool return_fullpath = true); + std::string *find_first (const std::string &dirpath, + bool (*filter)(const std::string &, void *), + void *arg, + bool match_fullpath = true, + bool return_fullpath = true); private: regex_t compiled_pattern; - bool regexp_filter (const string &str) { + bool regexp_filter (const std::string &str) { return regexec (&compiled_pattern, str.c_str(), 0, 0, 0) == 0; } - vector<string *> *run_scan (const string &dirpath, - bool (PathScanner::*mfilter) (const string &), - bool (*filter)(const string &, void *), - void *arg, - bool match_fullpath, - bool return_fullpath, - long limit, - bool recurse = false); + std::vector<std::string *> *run_scan (const std::string &dirpath, + bool (PathScanner::*mfilter) (const std::string &), + bool (*filter)(const std::string &, void *), + void *arg, + bool match_fullpath, + bool return_fullpath, + long limit, + bool recurse = false); - vector<string *> *run_scan_internal (vector<string*>*, - const string &dirpath, - bool (PathScanner::*mfilter) (const string &), - bool (*filter)(const string &, void *), - void *arg, - bool match_fullpath, - bool return_fullpath, - long limit, - bool recurse = false); + std::vector<std::string *> *run_scan_internal (std::vector<std::string*>*, + const std::string &dirpath, + bool (PathScanner::*mfilter) (const std::string &), + bool (*filter)(const std::string &, void *), + void *arg, + bool match_fullpath, + bool return_fullpath, + long limit, + bool recurse = false); }; #endif // __libmisc_pathscanner_h__ diff --git a/libs/pbd/pbd/receiver.h b/libs/pbd/pbd/receiver.h index 93192ce787..5e32c7d67f 100644 --- a/libs/pbd/pbd/receiver.h +++ b/libs/pbd/pbd/receiver.h @@ -26,8 +26,6 @@ #include "transmitter.h" -using std::vector; - class strstream; class Receiver : virtual public sigc::trackable @@ -43,7 +41,7 @@ class Receiver : virtual public sigc::trackable virtual void receive (Transmitter::Channel, const char *) = 0; private: - vector<sigc::connection *> connections; + std::vector<sigc::connection *> connections; }; #endif // __libmisc_receiver_h__ diff --git a/libs/pbd/pbd/search_path.h b/libs/pbd/pbd/search_path.h index 6163aae607..1148384daa 100644 --- a/libs/pbd/pbd/search_path.h +++ b/libs/pbd/pbd/search_path.h @@ -27,9 +27,6 @@ namespace PBD { -using std::string; -using std::vector; - /** * @class The SearchPath class is a helper class for getting a * vector of paths contained in a search path string where a @@ -39,7 +36,7 @@ using std::vector; * The SearchPath class does not test whether the paths exist * or are directories. It is basically just a container. */ -class SearchPath : public vector<sys::path> +class SearchPath : public std::vector<sys::path> { public: /** @@ -58,14 +55,14 @@ public: * * @param search_path A path string. */ - SearchPath (const string& search_path); + SearchPath (const std::string& search_path); /** * Initialize SearchPath from a sys::path. * * @param directory_path A directory path. */ - SearchPath (const sys::path& directory_path); + SearchPath (const PBD::sys::path& directory_path); /** * Initialize SearchPath from a vector of paths that may or may @@ -73,7 +70,7 @@ public: * * @param path A path. */ - SearchPath (const vector<sys::path>& paths); + SearchPath (const std::vector<PBD::sys::path>& paths); /** * @return a search path string. @@ -81,7 +78,7 @@ public: * The string that is returned contains the platform specific * path separator. */ - const string to_string () const; + const std::string to_string () const; /** * Add all the directories in path to this. @@ -91,7 +88,7 @@ public: /** * Add another directory path to the search path. */ - SearchPath& operator+= (const sys::path& directory_path); + SearchPath& operator+= (const PBD::sys::path& directory_path); /** * Concatenate another SearchPath onto this. @@ -101,18 +98,18 @@ public: /** * Add another path to the search path. */ - SearchPath& operator+ (const sys::path& directory_path); + SearchPath& operator+ (const PBD::sys::path& directory_path); /** * Add a sub-directory to each path in the search path. * @param subdir The directory name, it should not contain * any path separating tokens. */ - SearchPath& add_subdirectory_to_paths (const string& subdir); + SearchPath& add_subdirectory_to_paths (const std::string& subdir); protected: void add_directory (const sys::path& directory_path); - void add_directories (const vector<sys::path>& paths); + void add_directories (const std::vector<PBD::sys::path>& paths); }; } // namespace PBD diff --git a/libs/pbd/pbd/textreceiver.h b/libs/pbd/pbd/textreceiver.h index e5900fc652..c9a1d0aecc 100644 --- a/libs/pbd/pbd/textreceiver.h +++ b/libs/pbd/pbd/textreceiver.h @@ -24,20 +24,16 @@ #include "receiver.h" -using std::string; -using std::cout; -using std::endl; - class TextReceiver : public Receiver { public: - TextReceiver (const string &n); + TextReceiver (const std::string &n); protected: void receive (Transmitter::Channel, const char *); private: - string name; + std::string name; }; #endif //__libmisc_textreceiver_h__ diff --git a/libs/pbd/pbd/transmitter.h b/libs/pbd/pbd/transmitter.h index 61ac9bd8d8..6da521dd26 100644 --- a/libs/pbd/pbd/transmitter.h +++ b/libs/pbd/pbd/transmitter.h @@ -25,10 +25,6 @@ #include <sigc++/sigc++.h> -using std::cout; -using std::cerr; -using std::endl; - class Transmitter : public std::stringstream { @@ -82,11 +78,11 @@ endmsg (std::ostream &ostr) see if ostr == cout, and handle it specially. */ - if (&ostr == &cout) { - cout << endl; + if (&ostr == &std::cout) { + std::cout << std::endl; return ostr; - } else if (&ostr == &cerr) { - cerr << endl; + } else if (&ostr == &std::cerr) { + std::cerr << std::endl; return ostr; } @@ -97,7 +93,7 @@ endmsg (std::ostream &ostr) it and assume that that will be enough. */ - ostr << endl; + ostr << std::endl; } return ostr; diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h index 9427c7070c..65ab0f2c03 100644 --- a/libs/pbd/pbd/xml++.h +++ b/libs/pbd/pbd/xml++.h @@ -18,75 +18,71 @@ #ifndef __XML_H #define __XML_H -using std::string; -using std::map; -using std::list; - class XMLTree; class XMLNode; class XMLProperty; -typedef list<XMLNode *> XMLNodeList; -typedef list<boost::shared_ptr<XMLNode> > XMLSharedNodeList; -typedef XMLNodeList::iterator XMLNodeIterator; -typedef XMLNodeList::const_iterator XMLNodeConstIterator; -typedef list<XMLProperty*> XMLPropertyList; -typedef XMLPropertyList::iterator XMLPropertyIterator; -typedef XMLPropertyList::const_iterator XMLPropertyConstIterator; -typedef map<string, XMLProperty*> XMLPropertyMap; +typedef std::list<XMLNode *> XMLNodeList; +typedef std::list<boost::shared_ptr<XMLNode> > XMLSharedNodeList; +typedef XMLNodeList::iterator XMLNodeIterator; +typedef XMLNodeList::const_iterator XMLNodeConstIterator; +typedef std::list<XMLProperty*> XMLPropertyList; +typedef XMLPropertyList::iterator XMLPropertyIterator; +typedef XMLPropertyList::const_iterator XMLPropertyConstIterator; +typedef std::map<std::string, XMLProperty*> XMLPropertyMap; class XMLTree { public: XMLTree(); - XMLTree(const string& fn, bool validate = false); + XMLTree(const std::string& fn, bool validate = false); XMLTree(const XMLTree*); ~XMLTree(); XMLNode* root() const { return _root; } XMLNode* set_root(XMLNode* n) { return _root = n; } - const string& filename() const { return _filename; } - const string& set_filename(const string& fn) { return _filename = fn; } + const std::string& filename() const { return _filename; } + const std::string& set_filename(const std::string& fn) { return _filename = fn; } int compression() const { return _compression; } int set_compression(int); bool read() { return read_internal(false); } - bool read(const string& fn) { set_filename(fn); return read_internal(false); } + bool read(const std::string& fn) { set_filename(fn); return read_internal(false); } bool read_and_validate() { return read_internal(true); } - bool read_and_validate(const string& fn) { set_filename(fn); return read_internal(true); } - bool read_buffer(const string&); + bool read_and_validate(const std::string& fn) { set_filename(fn); return read_internal(true); } + bool read_buffer(const std::string&); bool write() const; - bool write(const string& fn) { set_filename(fn); return write(); } + bool write(const std::string& fn) { set_filename(fn); return write(); } void debug (FILE*) const; - const string& write_buffer() const; + const std::string& write_buffer() const; private: bool read_internal(bool validate); - string _filename; - XMLNode* _root; - int _compression; + std::string _filename; + XMLNode* _root; + int _compression; }; class XMLNode { public: - XMLNode(const string& name); - XMLNode(const string& name, const string& content); + XMLNode(const std::string& name); + XMLNode(const std::string& name, const std::string& content); XMLNode(const XMLNode& other); ~XMLNode(); - const string& name() const { return _name; } + const std::string& name() const { return _name; } bool is_content() const { return _is_content; } - const string& content() const { return _content; } - const string& set_content(const string&); - XMLNode* add_content(const string& s = string()); + const std::string& content() const { return _content; } + const std::string& set_content(const std::string&); + XMLNode* add_content(const std::string& s = std::string()); - const XMLNodeList& children(const string& str = string()) const; + const XMLNodeList& children(const std::string& str = std::string()) const; XMLNode* child(const char*) const; XMLNode* add_child(const char *); XMLNode* add_child_copy(const XMLNode&); @@ -97,27 +93,27 @@ public: const XMLPropertyList& properties() const { return _proplist; } XMLProperty* property(const char*); - XMLProperty* property(const string&); + XMLProperty* property(const std::string&); const XMLProperty* property(const char* n) const { return ((XMLNode*)this)->property(n); } - const XMLProperty* property(const string& n) const { return ((XMLNode*)this)->property(n); } + const XMLProperty* property(const std::string& n) const { return ((XMLNode*)this)->property(n); } - XMLProperty* add_property(const char* name, const string& value); + XMLProperty* add_property(const char* name, const std::string& value); XMLProperty* add_property(const char* name, const char* value = ""); XMLProperty* add_property(const char* name, const long value); - void remove_property(const string&); + void remove_property(const std::string&); /** Remove all nodes with the name passed to remove_nodes */ - void remove_nodes(const string&); + void remove_nodes(const std::string&); /** Remove and delete all nodes with the name passed to remove_nodes */ - void remove_nodes_and_delete(const string&); + void remove_nodes_and_delete(const std::string&); /** Remove and delete all nodes with property prop matching val */ - void remove_nodes_and_delete(const string& propname, const string& val); + void remove_nodes_and_delete(const std::string& propname, const std::string& val); private: - string _name; + std::string _name; bool _is_content; - string _content; + std::string _content; XMLNodeList _children; XMLPropertyList _proplist; XMLPropertyMap _propmap; @@ -126,27 +122,27 @@ private: class XMLProperty { public: - XMLProperty(const string& n, const string& v = string()); + XMLProperty(const std::string& n, const std::string& v = std::string()); ~XMLProperty(); - const string& name() const { return _name; } - const string& value() const { return _value; } - const string& set_value(const string& v) { return _value = v; } + const std::string& name() const { return _name; } + const std::string& value() const { return _value; } + const std::string& set_value(const std::string& v) { return _value = v; } private: - string _name; - string _value; + std::string _name; + std::string _value; }; class XMLException: public std::exception { public: - explicit XMLException(const string msg) : _message(msg) {} + explicit XMLException(const std::string msg) : _message(msg) {} virtual ~XMLException() throw() {} virtual const char* what() const throw() { return _message.c_str(); } private: - string _message; + std::string _message; }; #endif /* __XML_H */ diff --git a/libs/pbd/receiver.cc b/libs/pbd/receiver.cc index 456ff3ae79..c9df4595db 100644 --- a/libs/pbd/receiver.cc +++ b/libs/pbd/receiver.cc @@ -23,6 +23,7 @@ #include "pbd/receiver.h" #include "pbd/transmitter.h" +using namespace std; using namespace sigc; Receiver::Receiver () {} diff --git a/libs/pbd/search_path.cc b/libs/pbd/search_path.cc index 2238b233fe..f305e24f90 100644 --- a/libs/pbd/search_path.cc +++ b/libs/pbd/search_path.cc @@ -21,6 +21,8 @@ #include "pbd/search_path.h" #include "pbd/error.h" +using namespace std; + namespace { #ifdef WIN32 diff --git a/libs/pbd/stateful.cc b/libs/pbd/stateful.cc index 8846226ad3..12ae4306ed 100644 --- a/libs/pbd/stateful.cc +++ b/libs/pbd/stateful.cc @@ -27,6 +27,8 @@ #include "i18n.h" +using namespace std; + namespace PBD { Stateful::Stateful () diff --git a/libs/pbd/textreceiver.cc b/libs/pbd/textreceiver.cc index 2cd1cf3712..19c84c6b14 100644 --- a/libs/pbd/textreceiver.cc +++ b/libs/pbd/textreceiver.cc @@ -23,6 +23,8 @@ #include "pbd/textreceiver.h" +using namespace std; + TextReceiver::TextReceiver (const string &n) { diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc index 9f7ef6007f..ec1c8a7b60 100644 --- a/libs/pbd/xml++.cc +++ b/libs/pbd/xml++.cc @@ -12,6 +12,8 @@ #define XML_VERSION "1.0" +using namespace std; + static XMLNode* readnode(xmlNodePtr); static void writenode(xmlDocPtr, XMLNode*, xmlNodePtr, int); static XMLSharedNodeList* find_impl(xmlXPathContext* ctxt, const string& xpath); |