Allow to get a route reference from SessionObject*
The motivation is to allow a Processor (here Lua) to get a pointer to the owning Route without resorting to iterative lookup.
This commit is contained in:
@@ -378,6 +378,8 @@ public:
|
||||
XMLNode& get_processor_state ();
|
||||
virtual void set_processor_state (const XMLNode&);
|
||||
|
||||
boost::weak_ptr<Route> weakroute ();
|
||||
|
||||
int save_as_template (const std::string& path, const std::string& name);
|
||||
|
||||
PBD::Signal1<void,void*> SelectedChanged;
|
||||
|
||||
@@ -117,6 +117,11 @@ Route::Route (Session& sess, string name, PresentationInfo::Flag flag, DataType
|
||||
processor_max_streams.reset();
|
||||
}
|
||||
|
||||
boost::weak_ptr<Route>
|
||||
Route::weakroute () {
|
||||
return boost::weak_ptr<Route> (shared_from_this ());
|
||||
}
|
||||
|
||||
int
|
||||
Route::init ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user