(Source List) Add forall_regions function, used by Region and Source lists.

This commit is contained in:
Ben Loftis 2019-05-31 13:35:40 -05:00
parent 80c32236c5
commit 73e6af51a8

View file

@ -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<void( boost::shared_ptr<Region> )> 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);