mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence and ExportPortChannel.
This commit is contained in:
parent
90c5524e7b
commit
b35518e212
819 changed files with 9736 additions and 9709 deletions
|
|
@ -448,7 +448,7 @@ BasicUI::trigger_cue_row (int cue_idx)
|
|||
void
|
||||
BasicUI::trigger_stop_col (int col, bool immediately)
|
||||
{
|
||||
boost::shared_ptr<TriggerBox> tb = session->triggerbox_at (col);
|
||||
std::shared_ptr<TriggerBox> tb = session->triggerbox_at (col);
|
||||
if (tb) {
|
||||
if (immediately) {
|
||||
tb->stop_all_immediately ();
|
||||
|
|
@ -615,7 +615,7 @@ void
|
|||
BasicUI::toggle_monitor_mute ()
|
||||
{
|
||||
if (session->monitor_out()) {
|
||||
boost::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
||||
std::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
||||
if (mon->cut_all ()) {
|
||||
mon->set_cut_all (false);
|
||||
} else {
|
||||
|
|
@ -628,7 +628,7 @@ void
|
|||
BasicUI::toggle_monitor_dim ()
|
||||
{
|
||||
if (session->monitor_out()) {
|
||||
boost::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
||||
std::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
||||
if (mon->dim_all ()) {
|
||||
mon->set_dim_all (false);
|
||||
} else {
|
||||
|
|
@ -641,7 +641,7 @@ void
|
|||
BasicUI::toggle_monitor_mono ()
|
||||
{
|
||||
if (session->monitor_out()) {
|
||||
boost::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
||||
std::shared_ptr<MonitorProcessor> mon = session->monitor_out()->monitor_control();
|
||||
if (mon->mono()) {
|
||||
mon->set_mono (false);
|
||||
} else {
|
||||
|
|
@ -845,11 +845,11 @@ BasicUI::goto_nth_marker (int n)
|
|||
ARDOUR::TriggerPtr
|
||||
BasicUI::find_trigger (int x, int y)
|
||||
{
|
||||
boost::shared_ptr<Route> r = session->get_remote_nth_route (x);
|
||||
std::shared_ptr<Route> r = session->get_remote_nth_route (x);
|
||||
if (!r) {
|
||||
return TriggerPtr();
|
||||
}
|
||||
boost::shared_ptr<TriggerBox> tb = r->triggerbox();
|
||||
std::shared_ptr<TriggerBox> tb = r->triggerbox();
|
||||
|
||||
if (!tb || !tb->active()) {
|
||||
return TriggerPtr();
|
||||
|
|
@ -867,7 +867,7 @@ BasicUI::find_trigger (int x, int y)
|
|||
float
|
||||
BasicUI::trigger_progress_at (int x)
|
||||
{
|
||||
boost::shared_ptr<TriggerBox> tb = session->triggerbox_at (_tbank_start_route + x);
|
||||
std::shared_ptr<TriggerBox> tb = session->triggerbox_at (_tbank_start_route + x);
|
||||
if (tb) {
|
||||
ARDOUR::TriggerPtr trigger = tb->currently_playing ();
|
||||
if (trigger) {
|
||||
|
|
@ -882,7 +882,7 @@ BasicUI::trigger_display_at (int x, int y)
|
|||
{
|
||||
TriggerDisplay disp;
|
||||
|
||||
boost::shared_ptr<TriggerBox> tb = session->triggerbox_at (_tbank_start_route + x);
|
||||
std::shared_ptr<TriggerBox> tb = session->triggerbox_at (_tbank_start_route + x);
|
||||
if (tb) {
|
||||
ARDOUR::TriggerPtr current = tb->currently_playing ();
|
||||
TriggerPtr tp = tb->trigger (_tbank_start_row + y);
|
||||
|
|
@ -916,12 +916,12 @@ BasicUI::unbang_trigger_at (int x, int y)
|
|||
this stuff is waiting to go in so that all UIs can offer complex solo/mute functionality
|
||||
|
||||
void
|
||||
BasicUI::solo_release (boost::shared_ptr<Route> r)
|
||||
BasicUI::solo_release (std::shared_ptr<Route> r)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
BasicUI::solo_press (boost::shared_ptr<Route> r, bool momentary, bool global, bool exclusive, bool isolate, bool solo_group)
|
||||
BasicUI::solo_press (std::shared_ptr<Route> r, bool momentary, bool global, bool exclusive, bool isolate, bool solo_group)
|
||||
{
|
||||
if (momentary) {
|
||||
_solo_release = new SoloMuteRelease (_route->soloed());
|
||||
|
|
@ -944,7 +944,7 @@ BasicUI::solo_press (boost::shared_ptr<Route> r, bool momentary, bool global, bo
|
|||
if (_solo_release) {
|
||||
_solo_release->exclusive = true;
|
||||
|
||||
boost::shared_ptr<RouteList> routes = _session->get_routes();
|
||||
std::shared_ptr<RouteList> routes = _session->get_routes();
|
||||
|
||||
for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
|
||||
if ((*i)->soloed ()) {
|
||||
|
|
@ -992,7 +992,7 @@ BasicUI::solo_press (boost::shared_ptr<Route> r, bool momentary, bool global, bo
|
|||
|
||||
/* click: solo this route */
|
||||
|
||||
boost::shared_ptr<RouteList> rl (new RouteList);
|
||||
std::shared_ptr<RouteList> rl (new RouteList);
|
||||
rl->push_back (route());
|
||||
|
||||
if (_solo_release) {
|
||||
|
|
|
|||
|
|
@ -119,12 +119,12 @@ void
|
|||
ControlProtocol::set_route_table_size (uint32_t size)
|
||||
{
|
||||
while (route_table.size() < size) {
|
||||
route_table.push_back (boost::shared_ptr<Route> ((Route*) 0));
|
||||
route_table.push_back (std::shared_ptr<Route> ((Route*) 0));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::set_route_table (uint32_t table_index, boost::shared_ptr<ARDOUR::Route> r)
|
||||
ControlProtocol::set_route_table (uint32_t table_index, std::shared_ptr<ARDOUR::Route> r)
|
||||
{
|
||||
if (table_index >= route_table.size()) {
|
||||
return;
|
||||
|
|
@ -139,7 +139,7 @@ bool
|
|||
ControlProtocol::set_route_table (uint32_t table_index, uint32_t remote_control_id)
|
||||
{
|
||||
#if 0 // STRIPABLE
|
||||
boost::shared_ptr<Route> r = session->route_by_remote_id (remote_control_id);
|
||||
std::shared_ptr<Route> r = session->route_by_remote_id (remote_control_id);
|
||||
|
||||
if (!r) {
|
||||
return false;
|
||||
|
|
@ -157,9 +157,9 @@ ControlProtocol::route_set_rec_enable (uint32_t table_index, bool yn)
|
|||
return;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack>(r);
|
||||
std::shared_ptr<AudioTrack> at = std::dynamic_pointer_cast<AudioTrack>(r);
|
||||
|
||||
if (at) {
|
||||
at->rec_enable_control()->set_value (1.0, Controllable::UseGroup);
|
||||
|
|
@ -173,9 +173,9 @@ ControlProtocol::route_get_rec_enable (uint32_t table_index)
|
|||
return false;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
boost::shared_ptr<AudioTrack> at = boost::dynamic_pointer_cast<AudioTrack>(r);
|
||||
std::shared_ptr<AudioTrack> at = std::dynamic_pointer_cast<AudioTrack>(r);
|
||||
|
||||
if (at) {
|
||||
return at->rec_enable_control()->get_value();
|
||||
|
|
@ -192,7 +192,7 @@ ControlProtocol::route_get_gain (uint32_t table_index)
|
|||
return 0.0f;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
if (r == 0) {
|
||||
return 0.0f;
|
||||
|
|
@ -208,7 +208,7 @@ ControlProtocol::route_set_gain (uint32_t table_index, float gain)
|
|||
return;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
if (r != 0) {
|
||||
r->gain_control()->set_value (gain, Controllable::UseGroup);
|
||||
|
|
@ -222,7 +222,7 @@ ControlProtocol::route_get_effective_gain (uint32_t table_index)
|
|||
return 0.0f;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
if (r == 0) {
|
||||
return 0.0f;
|
||||
|
|
@ -239,7 +239,7 @@ ControlProtocol::route_get_peak_input_power (uint32_t table_index, uint32_t whic
|
|||
return 0.0f;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
if (r == 0) {
|
||||
return 0.0f;
|
||||
|
|
@ -255,7 +255,7 @@ ControlProtocol::route_get_muted (uint32_t table_index)
|
|||
return false;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
if (r == 0) {
|
||||
return false;
|
||||
|
|
@ -271,7 +271,7 @@ ControlProtocol::route_set_muted (uint32_t table_index, bool yn)
|
|||
return;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
if (r != 0) {
|
||||
r->mute_control()->set_value (yn ? 1.0 : 0.0, Controllable::UseGroup);
|
||||
|
|
@ -286,7 +286,7 @@ ControlProtocol::route_get_soloed (uint32_t table_index)
|
|||
return false;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
if (r == 0) {
|
||||
return false;
|
||||
|
|
@ -302,7 +302,7 @@ ControlProtocol::route_set_soloed (uint32_t table_index, bool yn)
|
|||
return;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
if (r != 0) {
|
||||
session->set_control (r->solo_control(), yn ? 1.0 : 0.0, Controllable::UseGroup);
|
||||
|
|
@ -316,7 +316,7 @@ ControlProtocol:: route_get_name (uint32_t table_index)
|
|||
return "";
|
||||
}
|
||||
|
||||
boost::shared_ptr<Route> r = route_table[table_index];
|
||||
std::shared_ptr<Route> r = route_table[table_index];
|
||||
|
||||
if (r == 0) {
|
||||
return "";
|
||||
|
|
@ -325,10 +325,10 @@ ControlProtocol:: route_get_name (uint32_t table_index)
|
|||
return r->name();
|
||||
}
|
||||
|
||||
list<boost::shared_ptr<Bundle> >
|
||||
list<std::shared_ptr<Bundle> >
|
||||
ControlProtocol::bundles ()
|
||||
{
|
||||
return list<boost::shared_ptr<Bundle> > ();
|
||||
return list<std::shared_ptr<Bundle> > ();
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
|
|
@ -353,49 +353,49 @@ ControlProtocol::set_state (XMLNode const & node, int /* version */)
|
|||
return 0;
|
||||
}
|
||||
|
||||
boost::shared_ptr<Stripable>
|
||||
std::shared_ptr<Stripable>
|
||||
ControlProtocol::first_selected_stripable () const
|
||||
{
|
||||
return session->selection().first_selected_stripable ();
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::add_stripable_to_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
||||
ControlProtocol::add_stripable_to_selection (std::shared_ptr<ARDOUR::Stripable> s)
|
||||
{
|
||||
session->selection().add (s, boost::shared_ptr<AutomationControl>());
|
||||
session->selection().add (s, std::shared_ptr<AutomationControl>());
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::set_stripable_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
||||
ControlProtocol::set_stripable_selection (std::shared_ptr<ARDOUR::Stripable> s)
|
||||
{
|
||||
session->selection().select_stripable_and_maybe_group (s, true, true, 0);
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::toggle_stripable_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
||||
ControlProtocol::toggle_stripable_selection (std::shared_ptr<ARDOUR::Stripable> s)
|
||||
{
|
||||
session->selection().toggle (s, boost::shared_ptr<AutomationControl>());
|
||||
session->selection().toggle (s, std::shared_ptr<AutomationControl>());
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::remove_stripable_from_selection (boost::shared_ptr<ARDOUR::Stripable> s)
|
||||
ControlProtocol::remove_stripable_from_selection (std::shared_ptr<ARDOUR::Stripable> s)
|
||||
{
|
||||
session->selection().remove (s, boost::shared_ptr<AutomationControl>());
|
||||
session->selection().remove (s, std::shared_ptr<AutomationControl>());
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::add_rid_to_selection (int rid)
|
||||
{
|
||||
boost::shared_ptr<Stripable> s = session->get_remote_nth_stripable (rid, PresentationInfo::MixerStripables);
|
||||
std::shared_ptr<Stripable> s = session->get_remote_nth_stripable (rid, PresentationInfo::MixerStripables);
|
||||
if (s) {
|
||||
session->selection().add (s, boost::shared_ptr<AutomationControl>());
|
||||
session->selection().add (s, std::shared_ptr<AutomationControl>());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::set_rid_selection (int rid)
|
||||
{
|
||||
boost::shared_ptr<Stripable> s = session->get_remote_nth_stripable (rid, PresentationInfo::MixerStripables);
|
||||
std::shared_ptr<Stripable> s = session->get_remote_nth_stripable (rid, PresentationInfo::MixerStripables);
|
||||
if (s) {
|
||||
session->selection().select_stripable_and_maybe_group (s, true, true, 0);
|
||||
}
|
||||
|
|
@ -404,18 +404,18 @@ ControlProtocol::set_rid_selection (int rid)
|
|||
void
|
||||
ControlProtocol::toggle_rid_selection (int rid)
|
||||
{
|
||||
boost::shared_ptr<Stripable> s = session->get_remote_nth_stripable (rid, PresentationInfo::MixerStripables);
|
||||
std::shared_ptr<Stripable> s = session->get_remote_nth_stripable (rid, PresentationInfo::MixerStripables);
|
||||
if (s) {
|
||||
session->selection().toggle (s, boost::shared_ptr<AutomationControl>());
|
||||
session->selection().toggle (s, std::shared_ptr<AutomationControl>());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::remove_rid_from_selection (int rid)
|
||||
{
|
||||
boost::shared_ptr<Stripable> s = session->get_remote_nth_stripable (rid, PresentationInfo::MixerStripables);
|
||||
std::shared_ptr<Stripable> s = session->get_remote_nth_stripable (rid, PresentationInfo::MixerStripables);
|
||||
if (s) {
|
||||
session->selection().remove (s, boost::shared_ptr<AutomationControl>());
|
||||
session->selection().remove (s, std::shared_ptr<AutomationControl>());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ class LIBCONTROLCP_API BasicUI {
|
|||
void unbang_trigger_at (int x, int y);
|
||||
|
||||
/* it would be nice to use TriggerPtr here but that implies including ardour/triggerbox.h */
|
||||
boost::shared_ptr<ARDOUR::Trigger> find_trigger (int x, int y);
|
||||
std::shared_ptr<ARDOUR::Trigger> find_trigger (int x, int y);
|
||||
|
||||
protected:
|
||||
BasicUI ();
|
||||
|
|
|
|||
|
|
@ -83,10 +83,10 @@ public:
|
|||
static PBD::Signal0<void> StepTracksDown;
|
||||
static PBD::Signal0<void> StepTracksUp;
|
||||
|
||||
void add_stripable_to_selection (boost::shared_ptr<ARDOUR::Stripable>);
|
||||
void set_stripable_selection (boost::shared_ptr<ARDOUR::Stripable>);
|
||||
void toggle_stripable_selection (boost::shared_ptr<ARDOUR::Stripable>);
|
||||
void remove_stripable_from_selection (boost::shared_ptr<ARDOUR::Stripable>);
|
||||
void add_stripable_to_selection (std::shared_ptr<ARDOUR::Stripable>);
|
||||
void set_stripable_selection (std::shared_ptr<ARDOUR::Stripable>);
|
||||
void toggle_stripable_selection (std::shared_ptr<ARDOUR::Stripable>);
|
||||
void remove_stripable_from_selection (std::shared_ptr<ARDOUR::Stripable>);
|
||||
void clear_stripable_selection ();
|
||||
|
||||
virtual void add_rid_to_selection (int rid);
|
||||
|
|
@ -94,7 +94,7 @@ public:
|
|||
virtual void toggle_rid_selection (int rid);
|
||||
virtual void remove_rid_from_selection (int rid);
|
||||
|
||||
boost::shared_ptr<ARDOUR::Stripable> first_selected_stripable () const;
|
||||
std::shared_ptr<ARDOUR::Stripable> first_selected_stripable () const;
|
||||
|
||||
/* the model here is as follows:
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ public:
|
|||
*/
|
||||
|
||||
void set_route_table_size (uint32_t size);
|
||||
void set_route_table (uint32_t table_index, boost::shared_ptr<ARDOUR::Route>);
|
||||
void set_route_table (uint32_t table_index, std::shared_ptr<ARDOUR::Route>);
|
||||
bool set_route_table (uint32_t table_index, uint32_t remote_control_id);
|
||||
|
||||
void route_set_rec_enable (uint32_t table_index, bool yn);
|
||||
|
|
@ -133,7 +133,7 @@ public:
|
|||
|
||||
std::string route_get_name (uint32_t table_index);
|
||||
|
||||
virtual std::list<boost::shared_ptr<ARDOUR::Bundle> > bundles ();
|
||||
virtual std::list<std::shared_ptr<ARDOUR::Bundle> > bundles ();
|
||||
|
||||
virtual bool has_editor () const { return false; }
|
||||
virtual void* get_gui () const { return 0; }
|
||||
|
|
@ -151,7 +151,7 @@ protected:
|
|||
void next_track (uint32_t initial_id);
|
||||
void prev_track (uint32_t initial_id);
|
||||
|
||||
std::vector<boost::shared_ptr<ARDOUR::Route> > route_table;
|
||||
std::vector<std::shared_ptr<ARDOUR::Route> > route_table;
|
||||
std::string _name;
|
||||
GlibEventLoopCallback glib_event_callback;
|
||||
virtual void event_loop_precall ();
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ namespace ARDOUR {
|
|||
class Route;
|
||||
class Stripable;
|
||||
|
||||
typedef std::vector<boost::weak_ptr<ARDOUR::Route> > RouteNotificationList;
|
||||
typedef boost::shared_ptr<RouteNotificationList> RouteNotificationListPtr;
|
||||
typedef std::vector<boost::shared_ptr<ARDOUR::Route> > StrongRouteNotificationList;
|
||||
typedef std::vector<std::weak_ptr<ARDOUR::Route> > RouteNotificationList;
|
||||
typedef std::shared_ptr<RouteNotificationList> RouteNotificationListPtr;
|
||||
typedef std::vector<std::shared_ptr<ARDOUR::Route> > StrongRouteNotificationList;
|
||||
|
||||
typedef std::vector<boost::weak_ptr<ARDOUR::Stripable> > StripableNotificationList;
|
||||
typedef boost::shared_ptr<StripableNotificationList> StripableNotificationListPtr;
|
||||
typedef std::vector<boost::shared_ptr<ARDOUR::Stripable> > StrongStripableNotificationList;
|
||||
typedef std::vector<std::weak_ptr<ARDOUR::Stripable> > StripableNotificationList;
|
||||
typedef std::shared_ptr<StripableNotificationList> StripableNotificationListPtr;
|
||||
typedef std::vector<std::shared_ptr<ARDOUR::Stripable> > StrongStripableNotificationList;
|
||||
}
|
||||
|
||||
#endif /* __ardour_control_protocol_types_h__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue