13
0

Add API to query registered controllers

This commit is contained in:
Robin Gareus 2022-05-17 23:29:08 +02:00
parent 276172b8b1
commit a811583380
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 15 additions and 0 deletions

View File

@ -145,6 +145,17 @@ Controllable::by_id (const ID& id)
return boost::shared_ptr<Controllable>();
}
Controllable::ControllableSet
Controllable::registered_controllables ()
{
ControllableSet rv;
Glib::Threads::RWLock::ReaderLock lm (registry_lock);
for (auto const& i : registry) {
rv.insert (i->shared_from_this ());
}
return rv;
}
void
Controllable::dump_registry ()
{

View File

@ -169,6 +169,10 @@ public:
static boost::shared_ptr<Controllable> by_id (const PBD::ID&);
static void dump_registry ();
typedef std::set<boost::shared_ptr<Controllable>> ControllableSet;
static ControllableSet registered_controllables ();
static const std::string xml_node_name;
protected: