From: Ben Loftis Date: Fri, 31 May 2019 18:35:40 +0000 (-0500) Subject: (Source List) Add forall_regions function, used by Region and Source lists. X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=ed325b52b2e4d81e090069a3c952f8216dacd5b5;p=ardour.git (Source List) Add forall_regions function, used by Region and Source lists. --- diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h index e0041a1072..e7c56e0b50 100644 --- a/libs/ardour/ardour/region_factory.h +++ b/libs/ardour/ardour/region_factory.h @@ -95,6 +95,15 @@ public: static void delete_all_regions (); static const RegionMap& regions() { return region_map; } static uint32_t nregions (); + + static void foreach_region (boost::function )> f) { + Glib::Threads::Mutex::Lock ls (region_map_lock); + for (RegionMap::const_iterator i = region_map.begin(); i != region_map.end(); ++i) { + f ( (*i).second ); + } + } + + static int region_name (std::string &, std::string, bool new_level = false); static std::string new_region_name (std::string);