Merged with trunk (painfully)
[ardour.git] / libs / ardour / ardour / session_region.h
1 #ifndef __ardour_session_region_h__
2 #define __ardour_session_region_h__
3
4 #include <ardour/session.h>
5 #include <ardour/audioregion.h>
6
7 namespace ARDOUR {
8
9 template<class T> void Session::foreach_audio_region (T *obj, void (T::*func)(AudioRegion *))
10 {
11         Glib::Mutex::Lock lm (region_lock);
12         for (AudioRegionList::iterator i = audio_regions.begin(); i != audio_regions.end(); i++) {
13                 (obj->*func) ((*i).second);
14         }
15 }
16
17 }
18
19 #endif /* __ardour_session_region_h__ */